OGS
HMatrixUtils.h
Go to the documentation of this file.
1 
11 #pragma once
12 
14 
15 namespace ProcessLib
16 {
19 template <typename ShapeFunction, int DisplacementDim>
21 {
22 private:
24  template <int N>
25  using VectorType =
26  typename ShapeMatrixPolicyType<ShapeFunction,
27  DisplacementDim>::template VectorType<N>;
28 
30  template <int N, int M>
31  using MatrixType =
33  template MatrixType<N, M>;
34 
35  // Dimensions of specific H-matrix for n-points and displacement dimension.
36  static int const _number_of_dof = ShapeFunction::NPOINTS * DisplacementDim;
37 
38 public:
41 
43 
46 };
47 
49 template <int DisplacementDim,
50  int NPOINTS,
51  typename N_Type,
52  typename HMatrixType>
53 void computeHMatrix(N_Type const& N, HMatrixType& H)
54 {
55  static_assert(1 < DisplacementDim && DisplacementDim <= 3,
56  "LinearHMatrix::computeHMatrix: DisplacementDim must be in "
57  "range (1,3].");
58 
59  H.setZero();
60 
61  for (int j = 0; j < DisplacementDim; j++)
62  {
63  H.block(j, j * NPOINTS, 1, NPOINTS) = N;
64  }
65 }
66 
67 } // namespace ProcessLib
static int const _number_of_dof
Definition: HMatrixUtils.h:36
MatrixType< _number_of_dof, _number_of_dof > StiffnessMatrixType
Definition: HMatrixUtils.h:39
typename ShapeMatrixPolicyType< ShapeFunction, DisplacementDim >::template VectorType< N > VectorType
Reusing the ShapeMatrixPolicy vector type.
Definition: HMatrixUtils.h:27
VectorType< _number_of_dof > NodalForceVectorType
Definition: HMatrixUtils.h:40
MatrixType< DisplacementDim, _number_of_dof > HMatrixType
Definition: HMatrixUtils.h:42
VectorType< DisplacementDim > ForceVectorType
Definition: HMatrixUtils.h:45
typename ShapeMatrixPolicyType< ShapeFunction, DisplacementDim >::template MatrixType< N, M > MatrixType
Reusing the ShapeMatrixPolicy matrix type.
Definition: HMatrixUtils.h:33
MatrixType< DisplacementDim, DisplacementDim > ConstitutiveMatrixType
Definition: HMatrixUtils.h:44
void computeHMatrix(N_Type const &N, HMatrixType &H)
Fills a H-matrix based on given shape function.
Definition: HMatrixUtils.h:53