v0.9.0
CoreDataStructures.hpp
Go to the documentation of this file.
1 /** \file CoreDataStructures.hpp
2  * \brief Myltindex containers, data structures and other low-level functions
3  */
4 
5 /* MoFEM is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the
7  * Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
17  */
18 
19 #ifndef __DATASTRUCTURES_HPP__
20 #define __DATASTRUCTURES_HPP__
21 
22 namespace MoFEM {
23 
24 const int prism_adj_edges[] = {6, 7, 8, -1, -1, -1, 0, 1, 2};
25 const int prism_edges_conn[6][2] = {{0, 1}, {1, 2}, {2, 0},
26  {3, 4}, {4, 5}, {5, 3}};
27 
28 inline int fNBENTITY_GENERIC(int P) {
29  (void)P;
30  return 0;
31 }
32 inline int fNBENTITYSET_NOFIELD(int P) {
33  (void)P;
34  return 1;
35 }
36 inline int fNBVERTEX_L2(int P) {
37  (void)P;
38  return 1;
39 }
40 inline int fNBVOLUMETET_L2(int P) { return NBVOLUMETET_L2(P); }
41 inline int fNBFACETRI_L2(int P) { return NBFACETRI_L2(P); }
42 inline int fNBEDGE_L2(int P) { return NBEDGE_L2(P); }
43 
44 /// number of approx. functions for H1 space on vertex
45 inline int fNBVERTEX_H1(int P) { return (P > 0) ? 1 : 0; }
46 /// number of approx. functions for H1 space on edge
47 inline int fNBEDGE_H1(int P) { return NBEDGE_H1(P); }
48 /// number of approx. functions for H1 space on face
49 inline int fNBFACETRI_H1(int P) { return NBFACETRI_H1(P); }
50 inline int fNBFACEQUAD_H1(int P) { return NBFACEQUAD_H1(P); }
51 /// number of approx. functions for H1 space on volume
52 inline int fNBVOLUMETET_H1(int P) { return NBVOLUMETET_H1(P); }
53 inline int fNBVOLUMEPRISM_H1(int P) { return NBVOLUMEPRISM_H1(P); }
54 
55 /// number of approx. functions for HCURL space on vertex
56 inline int fNBVERTEX_HCURL(int P) {
57  (void)P;
58  return 0;
59 }
60 inline int fNBEDGE_AINSWORTH_HCURL(int P) { return NBEDGE_AINSWORTH_HCURL(P); }
61 inline int fNBFACETRI_AINSWORTH_HCURL(int P) {
62  return NBFACETRI_AINSWORTH_HCURL(P);
63 }
64 inline int fNBVOLUMETET_AINSWORTH_HCURL(int P) {
66 }
67 
68 inline int fNBEDGE_DEMKOWICZ_HCURL(int P) { return NBEDGE_DEMKOWICZ_HCURL(P); }
69 inline int fNBFACETRI_DEMKOWICZ_HCURL(int P) {
70  return NBFACETRI_DEMKOWICZ_HCURL(P);
71 }
72 inline int fNBVOLUMETET_DEMKOWICZ_HCURL(int P) {
74 }
75 
76 /// \brief number of approx. functions for HDIV space on vertex
77 ///
78 /// zero number of digrees of freedom on vertex for that space
79 inline int fNBVERTEX_HDIV(int P) {
80  (void)P;
81  return 0;
82 }
83 /// number of approx. functions for HDIV space on edge
84 inline int fNBEDGE_HDIV(int P) {
85  (void)P;
86  return NBEDGE_HDIV(P);
87 }
88 /// number of approx. functions for HDIV space on face
89 inline int fNBFACETRI_AINSWORTH_HDIV(int P) {
90  return NBFACETRI_AINSWORTH_HDIV(P);
91 }
92 /// number of approx. functions for HDIV space on volume
93 inline int fNBVOLUMETET_AINSWORTH_HDIV(int P) {
95 }
96 
97 inline int fNBFACETRI_DEMKOWICZ_HDIV(int P) {
98  return NBFACETRI_DEMKOWICZ_HDIV(P);
99 }
100 /// number of approx. functions for HDIV space on volume
101 inline int fNBVOLUMETET_DEMKOWICZ_HDIV(int P) {
102  return NBVOLUMETET_DEMKOWICZ_HDIV(P);
103 }
104 
105 /** \brief Test MoAB entity handle if has structure as is assumed by MoFEM
106  */
107 MoFEMErrorCode test_moab(Interface &moab, const EntityHandle ent);
108 
109 } // namespace MoFEM
110 
111 #endif //__DATASTRUCTURES_HPP__
int fNBFACETRI_AINSWORTH_HDIV(int P)
number of approx. functions for HDIV space on face
const int prism_adj_edges[]
int fNBVERTEX_L2(int P)
#define NBVOLUMETET_L2(P)
Number of base functions on tetrahedron for L2 space.
#define NBEDGE_H1(P)
Numer of base function on edge for H1 space.
int fNBEDGE_DEMKOWICZ_HCURL(int P)
#define NBVOLUMETET_H1(P)
Number of base functions on tetrahedron for H1 space.
int fNBEDGE_H1(int P)
number of approx. functions for H1 space on edge
int fNBENTITY_GENERIC(int P)
int fNBFACETRI_AINSWORTH_HCURL(int P)
int fNBVOLUMEPRISM_H1(int P)
MoFEMErrorCode test_moab(Interface &moab, const EntityHandle ent)
Test MoAB entity handle if has structure as is assumed by MoFEM.
int fNBVOLUMETET_L2(int P)
int fNBFACETRI_DEMKOWICZ_HDIV(int P)
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
int fNBEDGE_AINSWORTH_HCURL(int P)
int fNBVOLUMETET_H1(int P)
number of approx. functions for H1 space on volume
int fNBVOLUMETET_DEMKOWICZ_HCURL(int P)
const int prism_edges_conn[6][2]
#define NBFACETRI_DEMKOWICZ_HDIV(P)
int fNBFACEQUAD_H1(int P)
int fNBVOLUMETET_DEMKOWICZ_HDIV(int P)
number of approx. functions for HDIV space on volume
#define NBFACEQUAD_H1(P)
Number of base functions on quad for H1 space.
#define NBEDGE_AINSWORTH_HCURL(P)
int fNBEDGE_L2(int P)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
#define NBEDGE_L2(P)
Number of base functions on edge fro L2 space.
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
int fNBFACETRI_DEMKOWICZ_HCURL(int P)
#define NBVOLUMETET_DEMKOWICZ_HDIV(P)
#define NBFACETRI_DEMKOWICZ_HCURL(P)
#define NBEDGE_DEMKOWICZ_HCURL(P)
int fNBFACETRI_H1(int P)
number of approx. functions for H1 space on face
#define NBVOLUMETET_AINSWORTH_HDIV(P)
int fNBVERTEX_HCURL(int P)
number of approx. functions for HCURL space on vertex
int fNBVOLUMETET_AINSWORTH_HCURL(int P)
#define NBVOLUMETET_AINSWORTH_HCURL(P)
#define NBVOLUMEPRISM_H1(P)
Number of base functions on prism for H1 space.
#define NBFACETRI_AINSWORTH_HCURL(P)
int fNBVERTEX_H1(int P)
number of approx. functions for H1 space on vertex
#define NBEDGE_HDIV(P)
#define NBFACETRI_AINSWORTH_HDIV(P)
int fNBFACETRI_L2(int P)
int fNBENTITYSET_NOFIELD(int P)
int fNBVERTEX_HDIV(int P)
number of approx. functions for HDIV space on vertex
#define NBVOLUMETET_DEMKOWICZ_HCURL(P)
int fNBVOLUMETET_AINSWORTH_HDIV(int P)
number of approx. functions for HDIV space on volume
int fNBEDGE_HDIV(int P)
number of approx. functions for HDIV space on edge