00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FINITE_ELEMENT_TRAITS_HPP
00021 #define FINITE_ELEMENT_TRAITS_HPP
00022
00023 #include <Cell.hpp>
00024 #include <Hexahedron.hpp>
00025 #include <Tetrahedron.hpp>
00026 #include <Triangle.hpp>
00027 #include <Quadrangle.hpp>
00028
00029 #include <ScalarDiscretizationTypeBase.hpp>
00030 #include <ConformTransformation.hpp>
00031
00032 #include <Q0HexahedronFiniteElement.hpp>
00033 #include <Q1HexahedronFiniteElement.hpp>
00034 #include <Q2HexahedronFiniteElement.hpp>
00035
00036 #include <P0TetrahedronFiniteElement.hpp>
00037 #include <P1TetrahedronFiniteElement.hpp>
00038 #include <P2TetrahedronFiniteElement.hpp>
00039
00040 #include <Q0Quadrangle3DFiniteElement.hpp>
00041 #include <Q1Quadrangle3DFiniteElement.hpp>
00042 #include <Q2Quadrangle3DFiniteElement.hpp>
00043
00044 #include <P0Triangle3DFiniteElement.hpp>
00045 #include <P1Triangle3DFiniteElement.hpp>
00046 #include <P2Triangle3DFiniteElement.hpp>
00047
00048 template <typename CellType,
00049 ScalarDiscretizationTypeBase::Type>
00050 struct FiniteElementTraits {};
00051
00052 template <>
00053 struct FiniteElementTraits<Hexahedron,
00054 ScalarDiscretizationTypeBase::lagrangianFEM0>
00055 {
00056 enum {
00057 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM0
00058 };
00059
00060 typedef Q0HexahedronFiniteElement Type;
00061
00062 typedef ConformTransformationQ1Hexahedron
00063 Transformation;
00064
00065 typedef ConformTransformationQ1HexahedronJacobian
00066 JacobianTransformation;
00067 };
00068
00069 template <>
00070 struct FiniteElementTraits<Hexahedron,
00071 ScalarDiscretizationTypeBase::lagrangianFEM1>
00072 {
00073 enum {
00074 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM1
00075 };
00076
00077 typedef Q1HexahedronFiniteElement Type;
00078
00079 typedef ConformTransformationQ1Hexahedron
00080 Transformation;
00081
00082 typedef ConformTransformationQ1HexahedronJacobian
00083 JacobianTransformation;
00084 };
00085
00086 template <>
00087 struct FiniteElementTraits<Hexahedron,
00088 ScalarDiscretizationTypeBase::lagrangianFEM2>
00089 {
00090 enum {
00091 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM2
00092 };
00093
00094 typedef Q2HexahedronFiniteElement Type;
00095
00096 typedef ConformTransformationQ1Hexahedron
00097 Transformation;
00098
00099 typedef ConformTransformationQ1HexahedronJacobian
00100 JacobianTransformation;
00101 };
00102
00103 template <>
00104 struct FiniteElementTraits<CartesianHexahedron,
00105 ScalarDiscretizationTypeBase::lagrangianFEM0>
00106 {
00107 enum {
00108 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM0
00109 };
00110
00111 typedef Q0HexahedronFiniteElement Type;
00112
00113 typedef ConformTransformationQ1CartesianHexahedron
00114 Transformation;
00115
00116 typedef ConformTransformationQ1CartesianHexahedronJacobian
00117 JacobianTransformation;
00118 };
00119
00120 template <>
00121 struct FiniteElementTraits<CartesianHexahedron,
00122 ScalarDiscretizationTypeBase::lagrangianFEM1>
00123 {
00124 enum {
00125 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM1
00126 };
00127
00128 typedef Q1HexahedronFiniteElement Type;
00129
00130 typedef ConformTransformationQ1CartesianHexahedron
00131 Transformation;
00132
00133 typedef ConformTransformationQ1CartesianHexahedronJacobian
00134 JacobianTransformation;
00135 };
00136
00137 template <>
00138 struct FiniteElementTraits<CartesianHexahedron,
00139 ScalarDiscretizationTypeBase::lagrangianFEM2>
00140 {
00141 enum {
00142 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM2
00143 };
00144
00145 typedef Q2HexahedronFiniteElement Type;
00146
00147 typedef ConformTransformationQ1CartesianHexahedron
00148 Transformation;
00149
00150 typedef ConformTransformationQ1CartesianHexahedronJacobian
00151 JacobianTransformation;
00152 };
00153
00154 template <>
00155 struct FiniteElementTraits<Tetrahedron,
00156 ScalarDiscretizationTypeBase::lagrangianFEM0>
00157 {
00158 enum {
00159 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM0
00160 };
00161
00162 typedef P0TetrahedronFiniteElement Type;
00163
00164 typedef ConformTransformationP1Tetrahedron
00165 Transformation;
00166
00167 typedef ConformTransformationP1TetrahedronJacobian
00168 JacobianTransformation;
00169 };
00170
00171 template <>
00172 struct FiniteElementTraits<Tetrahedron,
00173 ScalarDiscretizationTypeBase::lagrangianFEM1>
00174 {
00175 enum {
00176 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM1
00177 };
00178
00179 typedef P1TetrahedronFiniteElement Type;
00180
00181 typedef ConformTransformationP1Tetrahedron
00182 Transformation;
00183
00184 typedef ConformTransformationP1TetrahedronJacobian
00185 JacobianTransformation;
00186 };
00187
00188 template <>
00189 struct FiniteElementTraits<Tetrahedron,
00190 ScalarDiscretizationTypeBase::lagrangianFEM2>
00191 {
00192 enum {
00193 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM2
00194 };
00195
00196 typedef P2TetrahedronFiniteElement Type;
00197
00198 typedef ConformTransformationP1Tetrahedron
00199 Transformation;
00200
00201 typedef ConformTransformationP1TetrahedronJacobian
00202 JacobianTransformation;
00203 };
00204
00205 template <>
00206 struct FiniteElementTraits<Triangle,
00207 ScalarDiscretizationTypeBase::lagrangianFEM0>
00208 {
00209 enum {
00210 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM0
00211 };
00212
00213
00214 typedef P0Triangle3DFiniteElement Type;
00215
00216 typedef ConformTransformationP1Triangle
00217 Transformation;
00218
00219 typedef ConformTransformationP1TriangleJacobian
00220 JacobianTransformation;
00221 };
00222
00223 template <>
00224 struct FiniteElementTraits<Triangle,
00225 ScalarDiscretizationTypeBase::lagrangianFEM1>
00226 {
00227 enum {
00228 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM1
00229 };
00230
00231
00232 typedef P1Triangle3DFiniteElement Type;
00233
00234 typedef ConformTransformationP1Triangle
00235 Transformation;
00236
00237 typedef ConformTransformationP1TriangleJacobian
00238 JacobianTransformation;
00239 };
00240
00241 template <>
00242 struct FiniteElementTraits<Triangle,
00243 ScalarDiscretizationTypeBase::lagrangianFEM2>
00244 {
00245 enum {
00246 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM2
00247 };
00248
00249 typedef P2Triangle3DFiniteElement Type;
00250
00251 typedef ConformTransformationP1Triangle
00252 Transformation;
00253
00254 typedef ConformTransformationP1TriangleJacobian
00255 JacobianTransformation;
00256 };
00257
00258 template <>
00259 struct FiniteElementTraits<Quadrangle,
00260 ScalarDiscretizationTypeBase::lagrangianFEM0>
00261 {
00262 enum {
00263 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM0
00264 };
00265
00266 typedef Q0Quadrangle3DFiniteElement Type;
00267
00268 typedef ConformTransformationQ1Quadrangle
00269 Transformation;
00270
00271 typedef ConformTransformationQ1QuadrangleJacobian
00272 JacobianTransformation;
00273 };
00274
00275 template <>
00276 struct FiniteElementTraits<Quadrangle,
00277 ScalarDiscretizationTypeBase::lagrangianFEM1>
00278 {
00279 enum {
00280 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM1
00281 };
00282
00283 typedef Q1Quadrangle3DFiniteElement Type;
00284
00285 typedef ConformTransformationQ1Quadrangle
00286 Transformation;
00287
00288 typedef ConformTransformationQ1QuadrangleJacobian
00289 JacobianTransformation;
00290 };
00291
00292
00293 template <>
00294 struct FiniteElementTraits<Quadrangle,
00295 ScalarDiscretizationTypeBase::lagrangianFEM2>
00296 {
00297 enum {
00298 ScalarDiscretizationTypeBase = ScalarDiscretizationTypeBase::lagrangianFEM2
00299 };
00300
00301 typedef Q2Quadrangle3DFiniteElement Type;
00302
00303 typedef ConformTransformationQ1Quadrangle
00304 Transformation;
00305
00306 typedef ConformTransformationQ1QuadrangleJacobian
00307 JacobianTransformation;
00308 };
00309
00310 #endif // FINITE_ELEMENT_TRAITS_HPP