Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
TrialFunctionTraits.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MoDELib is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_TrialFunctionTraits_H_
9#define model_TrialFunctionTraits_H_
10
11#include <Eigen/Dense>
12#include <TypeTraits.h>
13
14
15namespace model
16{
17
18 template<char name,int nComponents, typename _FiniteElementType>
19 class TrialFunction;
20
21 template<typename TrialExpressionType>
22 struct TestExpression;
23
24 template<typename Derived>
26
31 template<char _name, int _nComponents, typename _FiniteElementType>
32 struct TypeTraits<TrialFunction<_name,_nComponents,_FiniteElementType> >
33 {
34 typedef _FiniteElementType FiniteElementType;
35 typedef typename FiniteElementType::ElementType ElementType;
36 typedef typename FiniteElementType::NodeType NodeType;
37 typedef typename FiniteElementType::NodeContainerType NodeContainerType;
38
39 constexpr static int nodesPerElement=ElementType::nodesPerElement;
40 constexpr static int nComponents=_nComponents;
41 constexpr static int dim=FiniteElementType::dim;
42 constexpr static int dofPerNode=ElementType::dofPerNode(nComponents);
44
45 typedef Eigen::Matrix<double,dim+1,1> BaryType;
46 typedef Eigen::Matrix<double,nComponents,dofPerElement> ShapeFunctionMatrixType;
47 typedef Eigen::Matrix<double,nComponents*dim,dofPerElement> ShapeFunctionGradMatrixType;
48 typedef Eigen::Matrix<double,(dim*(dim+1))/2,dofPerElement> ShapeFunctionDefMatrixType;
49 };
50
51
52} // close namespace
53#endif
Eigen::Matrix< double,(dim *(dim+1))/2, dofPerElement > ShapeFunctionDefMatrixType
Eigen::Matrix< double, nComponents, dofPerElement > ShapeFunctionMatrixType
Eigen::Matrix< double, nComponents *dim, dofPerElement > ShapeFunctionGradMatrixType