OGS
ProcessLib::LinearBMatrix Namespace Reference

Namespaces

 detail
 

Functions

template<int DisplacementDim, int NPOINTS, typename BMatrixType , typename N_Type , typename DNDX_Type >
BMatrixType computeBMatrix (DNDX_Type const &dNdx, N_Type const &N, const double radius, const bool is_axially_symmetric)
 Fills a B-matrix based on given shape function dN/dx values. More...
 

Function Documentation

◆ computeBMatrix()

template<int DisplacementDim, int NPOINTS, typename BMatrixType , typename N_Type , typename DNDX_Type >
BMatrixType ProcessLib::LinearBMatrix::computeBMatrix ( DNDX_Type const &  dNdx,
N_Type const &  N,
const double  radius,
const bool  is_axially_symmetric 
)

Fills a B-matrix based on given shape function dN/dx values.

Definition at line 42 of file LinearBMatrix.h.

46 {
47  static_assert(0 < DisplacementDim && DisplacementDim <= 3,
48  "LinearBMatrix::computeBMatrix: DisplacementDim must be in "
49  "range [1,3].");
50 
51  BMatrixType B = BMatrixType::Zero(
53  NPOINTS * DisplacementDim);
54 
55  switch (DisplacementDim)
56  {
57  case 3:
58  for (int i = 0; i < NPOINTS; ++i)
59  {
60  B(2, 2 * NPOINTS + i) = dNdx(2, i);
61  B(4, NPOINTS + i) = dNdx(2, i) / std::sqrt(2);
62  B(4, 2 * NPOINTS + i) = dNdx(1, i) / std::sqrt(2);
63  B(5, i) = dNdx(2, i) / std::sqrt(2);
64  B(5, 2 * NPOINTS + i) = dNdx(0, i) / std::sqrt(2);
65  }
66  detail::fillBMatrix2DCartesianPart<NPOINTS>(dNdx, B);
67  break;
68  case 2:
69  detail::fillBMatrix2DCartesianPart<NPOINTS>(dNdx, B);
70  if (is_axially_symmetric)
71  {
72  for (int i = 0; i < NPOINTS; ++i)
73  {
74  B(2, i) = N[i] / radius;
75  }
76  }
77  break;
78  default:
79  break;
80  }
81 
82  return B;
83 }
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Definition: KelvinVector.h:23

References MathLib::KelvinVector::kelvin_vector_dimensions().

Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assemble(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assemble(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, GlobalDim >::assembleBlockMatricesWithJacobian(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrixNearFracture< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::assembleWithJacobianPhaseFieldEquations(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, IntegrationMethod, DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::getNodalValues(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::postNonLinearSolverConcrete(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::postNonLinearSolverConcrete(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, GlobalDim >::postTimestepConcreteWithBlockVectors(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::preAssemble(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::setInitialConditionsConcrete(), and ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, IntegrationMethod, DisplacementDim >::updateConstitutiveVariables().