TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_PolyMAC_HFV.h
1/****************************************************************************
2* Copyright (c) 2023, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Domaine_PolyMAC_HFV_included
17#define Domaine_PolyMAC_HFV_included
18
19#include <Domaine_PolyMAC_CDO.h>
20#include <TRUSTLists.h>
21#include <Conds_lim.h>
22
24{
25 Declare_instanciable(Domaine_PolyMAC_HFV);
26public :
27 void discretiser() override;
28 void calculer_volumes_entrelaces() override;
29
30 //for each element, normal * dual area associated with each of its edges (oriented like the edge)
31 const DoubleTab& surf_elem_arete() const;
32
33 //local matrices per element (Hodge operators) for performing interpolations:
34 void M1(const DoubleTab *nu, int e, DoubleTab& m1) const; //dual edge normals -> edge tangentials: (nu|a|t_a.v) = m1 (S_ea.v)
35 void W1(const DoubleTab *nu, int e, DoubleTab& w1, DoubleTab& v_e, DoubleTab& v_ea) const; //edge tangentials -> dual edge normals: (nu S_ea.v) = w1 (|a|t_a.v)
36 //options for the nu tensor:
37 //null -> nu = Id below
38 //isotropic -> nu(n_e, N) with n_e = 1 (constant tensor) / nb_elem_tot() (per-element tensor), and N a number of components
39 //anisotropic -> nu(n_e, N, D) (diagonal anisotropic) or nu(n_e, N, D, D) (full anisotropic)
40 //the output matrix is of size (n_f, n_f, N) (for M2/W2) or (n_a, n_a, N) (for M1/W1)
41
42private:
43 mutable DoubleTab surf_elem_arete_; // normal * dual area vector
44};
45
46#endif /* Domaine_PolyMAC_HFV_included */
void W1(const DoubleTab *nu, int e, DoubleTab &w1, DoubleTab &v_e, DoubleTab &v_ea) const
const DoubleTab & surf_elem_arete() const
void M1(const DoubleTab *nu, int e, DoubleTab &m1) const
void calculer_volumes_entrelaces() override