23 #ifndef __H2D_COMMON_H_
24 #define __H2D_COMMON_H_
26 #include "hermes_common.h"
30 #define H2D_MAX_ELEMENT_SONS 4
31 #define H2D_MAX_NUMBER_EDGES 4
32 #define H2D_MAX_NUMBER_VERTICES 4
34 #define H2D_NUM_MODES 2
36 #define H2D_SOLUTION_ELEMENT_CACHE_SIZE 4
37 #define H2D_MAX_NODE_ID 10000000
38 #define H2D_MAX_SOLUTION_COMPONENTS 2
39 #ifdef H2D_USE_SECOND_DERIVATIVES
40 #define H2D_NUM_FUNCTION_VALUES 6
42 #define H2D_NUM_FUNCTION_VALUES 3
44 static const std::string H2D_DG_INNER_EDGE =
"-1234567";
47 #define CENTROID_QUAD_X 0.
48 #define CENTROID_QUAD_Y 0.
49 #define CENTROID_TRI_X -0.3333333333333333
51 #define CENTROID_TRI_Y -0.3333333333333333
54 #define ELEMENT_DELTA_X 2.0
55 #define ELEMENT_DELTA_Y 2.0
58 static const int H2D_TRF_TRI_NUM = 4;
60 static const int H2D_TRF_QUAD_NUM = 8;
62 static const int H2D_TRF_NUM = (H2D_TRF_QUAD_NUM + 1);
64 static const int H2D_TRF_IDENTITY = H2D_TRF_QUAD_NUM;
66 #define H2DRS_ASSUMED_MAX_CANDS 512
68 #define H2DRS_INTR_GIP_ORDER 20
69 #define H2DRS_MAX_ORDER_INC 1
71 #define H2DRS_ORDER_ANY -1
73 # define H2DRS_DEFAULT_ERR_WEIGHT_H 2.0
74 # define H2DRS_DEFAULT_ERR_WEIGHT_P 1.0
75 # define H2DRS_DEFAULT_ERR_WEIGHT_ANISO 1.414214
76 # define MAX_NUMBER_FUNCTION_VALUES_FOR_SELECTORS 3
83 template<
typename Scalar>
class DiscreteProblem;
84 template<
typename Scalar>
class MeshFunctionSharedPtr;
85 template<
typename Scalar>
class Space;
88 template<
typename Scalar>
class Solution;
98 #define H2D_GET_H_ORDER(encoded_order) ((encoded_order) & H2D_ORDER_MASK)
99 #define H2D_GET_V_ORDER(encoded_order) ((encoded_order) >> H2D_ORDER_BITS)
100 #define H2D_MAKE_QUAD_ORDER(h_encoded_order, v_encoded_order) (((v_encoded_order) << H2D_ORDER_BITS) + (h_encoded_order))
101 #define H2D_MAKE_EDGE_ORDER(mode, edge, order) ((mode == HERMES_MODE_TRIANGLE || edge == 0 || edge == 2) ? H2D_GET_H_ORDER(order) : H2D_GET_V_ORDER(order))
103 #define H2DRS_DEFAULT_ORDER -1
104 #define H2DRS_MAX_ORDER 10
105 #define H2D_NUM_SHAPES_SIZE 12
122 HERMES_MODE_TRIANGLE = 0,
128 HERMES_HCURL_SPACE = 1,
129 HERMES_HDIV_SPACE = 2,
131 HERMES_L2_MARKERWISE_CONST_SPACE = 4,
132 HERMES_INVALID_SPACE = -9999
137 HERMES_H1_JACOBI = 0,
138 HERMES_L2_LEGENDRE = 1,
139 HERMES_L2_TAYLOR = 2,
140 HERMES_HDIV_LEGENDRE = 3,
141 HERMES_HCURL_GRADLEG = 4
144 const char* spaceTypeToString(SpaceType spaceType);
145 SpaceType spaceTypeFromString(
const char* spaceTypeString);
ShapesetType
Important not to change the indices - used in an array enumeration.
Represents a function defined on a mesh.
2D quadrature points on the standard reference domains (-1,1)^2
SymFlag
Bilinear form symmetry flag, see WeakForm::add_matrix_form.
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
GeomType
Geometrical type of weak forms.
Represents the solution of a PDE.
1D quadrature points on the standard reference domain (-1,1)
const int H2D_ORDER_BITS
How many bits the encoded_order number takes.