Loading [MathJax]/extensions/MathZoom.js
OGS
ProcessLib::LinearBMatrix Namespace Reference

Namespaces

namespace  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.
 
template<int DisplacementDim, int NPOINTS, typename ShapeFunction , typename BBarMatrixType , typename ShapeMatricesType , typename IpData >
BBarMatrixType computeDilatationalBbar (std::vector< IpData, Eigen::aligned_allocator< IpData > > const &ip_data, MeshLib::Element const &element, NumLib::GenericIntegrationMethod const &integration_method, const bool is_axially_symmetric)
 
template<int DisplacementDim, int NPOINTS, typename BBarMatrixType , typename BMatrixType , typename N_Type , typename DNDX_Type >
BMatrixType computeBMatrixPossiblyWithBbar (DNDX_Type const &dNdx, N_Type const &N, std::optional< BBarMatrixType > const &B_dil_bar, const double radius, const bool is_axially_symmetric)
 Fills a B matrix, or a B bar matrix if required.
 

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 44 of file LinearBMatrix.h.

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

References ProcessLib::LinearBMatrix::detail::fillBMatrix2DCartesianPart(), and MathLib::KelvinVector::kelvin_vector_dimensions().

Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assemble(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assemble(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::HMPhaseField::HMPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianPhaseFieldEquations(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim, ConstitutiveTraits >::assembleWithJacobianSingleIP(), computeBMatrixPossiblyWithBbar(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim, ConstitutiveTraits >::computeSecondaryVariableConcrete(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::getNodalValues(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::postNonLinearSolverConcrete(), ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >::postTimestepConcrete(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::postTimestepConcrete(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::preAssemble(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setInitialConditionsConcrete(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setInitialConditionsConcrete(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setInitialConditionsConcrete(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveRelations(), and ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveVariables().

◆ computeBMatrixPossiblyWithBbar()

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

Fills a B matrix, or a B bar matrix if required.

Definition at line 180 of file LinearBMatrix.h.

186{
187 auto B = computeBMatrix<DisplacementDim, NPOINTS, BMatrixType, N_Type,
188 DNDX_Type>(dNdx, N, radius, is_axially_symmetric);
189
190 if (!B_dil_bar)
191 {
192 return B;
193 }
194
195 detail::applyBbar<DisplacementDim, NPOINTS, BBarMatrixType, BMatrixType>(
196 *B_dil_bar, B, is_axially_symmetric);
197
198 return B;
199}
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.

References ProcessLib::LinearBMatrix::detail::applyBbar(), and computeBMatrix().

Referenced by ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::assembleBlockMatricesWithJacobian(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrixNearFracture< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >::postTimestepConcrete(), and ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::postTimestepConcreteWithBlockVectors().

◆ computeDilatationalBbar()

template<int DisplacementDim, int NPOINTS, typename ShapeFunction , typename BBarMatrixType , typename ShapeMatricesType , typename IpData >
BBarMatrixType ProcessLib::LinearBMatrix::computeDilatationalBbar ( std::vector< IpData, Eigen::aligned_allocator< IpData > > const & ip_data,
MeshLib::Element const & element,
NumLib::GenericIntegrationMethod const & integration_method,
const bool is_axially_symmetric )

Definition at line 89 of file LinearBMatrix.h.

94{
95 unsigned const n_integration_points =
96 integration_method.getNumberOfPoints();
97
98 BBarMatrixType B_bar = BBarMatrixType::Zero(3, ShapeFunction::NPOINTS);
99
100 // Compute the element volume
101 double volume = 0.0;
102 for (unsigned ip = 0; ip < n_integration_points; ip++)
103 {
104 auto const& w = ip_data[ip].integration_weight;
105 volume += w;
106 }
107
108 for (int i = 0; i < NPOINTS; i++)
109 {
110 B_bar.col(i).noalias() +=
111 NumLib::averageGradShapeFunction<DisplacementDim, ShapeFunction,
112 ShapeMatricesType, IpData>(
113 i, element, integration_method, ip_data, is_axially_symmetric);
114 }
115
116 return B_bar / volume;
117}
Eigen::Vector3d averageGradShapeFunction(int const local_node_id, MeshLib::Element const &element, NumLib::GenericIntegrationMethod const &integration_method, std::vector< IpData, Eigen::aligned_allocator< IpData > > const &ip_data, const bool is_axially_symmetric)

References NumLib::averageGradShapeFunction(), and NumLib::GenericIntegrationMethod::getNumberOfPoints().

Referenced by ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::getDilatationalBBarMatrix(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, DisplacementDim >::getDilatationalBBarMatrix(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrixNearFracture< ShapeFunction, DisplacementDim >::getDilatationalBBarMatrix(), and ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >::getDilatationalBBarMatrix().