35namespace HydroMechanics
39template <
typename BMatricesType,
typename ShapeMatricesTypeDisplacement,
40 typename ShapeMatricesTypePressure,
int DisplacementDim,
int NPoints>
55 typename ShapeMatricesTypeDisplacement::NodalRowVectorType
N_u;
56 typename ShapeMatricesTypeDisplacement::GlobalDimNodalMatrixType
dNdx_u;
58 typename ShapeMatricesTypePressure::NodalRowVectorType
N_p;
59 typename ShapeMatricesTypePressure::GlobalDimNodalMatrixType
dNdx_p;
63 DisplacementDim>::MaterialStateVariables>
84 double const temperature)
91 auto const null_state =
solid_material.createMaterialStateVariables();
97 variable_array.
stress.emplace<
KV>(KV::Zero());
101 variable_array_prev.
stress.emplace<
KV>(KV::Zero());
106 solid_material.integrateStress(variable_array_prev, variable_array,
107 t, x_position, dt, *null_state);
111 OGS_FATAL(
"Computation of elastic tangent stiffness failed.");
115 std::move(std::get<2>(*solution));
120 template <
typename DisplacementVectorType>
126 DisplacementVectorType
const& ,
130 variable_array_prev.
stress
139 variable_array_prev, variable_array, t, x_position, dt,
144 OGS_FATAL(
"Computation of local constitutive relation failed.");
158template <
typename ShapeMatrixType>
161 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N_u;
164template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
194 bool const is_axially_symmetric,
199 std::string_view
const name,
200 double const* values,
201 int const integration_order)
override;
204 std::vector<double>
const& ,
205 std::vector<double>
const& ,
206 std::vector<double>& ,
207 std::vector<double>& ,
208 std::vector<double>& )
override
211 "HydroMechanicsLocalAssembler: assembly without jacobian is not "
216 std::vector<double>
const& local_x,
217 std::vector<double>
const& local_x_prev,
218 std::vector<double>& local_rhs_data,
219 std::vector<double>& local_Jac_data)
override;
222 const double t,
double const dt, Eigen::VectorXd
const& local_x,
223 Eigen::VectorXd
const& local_x_prev,
int const process_id,
224 std::vector<double>& local_b_data,
225 std::vector<double>& local_Jac_data)
override;
229 unsigned const n_integration_points =
232 for (
unsigned ip = 0; ip < n_integration_points; ip++)
250 double>::quiet_NaN() ,
255 ip_data.solid_material.initializeInternalStateVariables(
256 t, x_position, *ip_data.material_state_variables);
258 ip_data.pushBackState();
263 Eigen::VectorXd
const& local_x_prev,
264 double const t,
double const dt,
265 int const process_id)
override;
268 double const t,
double const dt, Eigen::VectorXd
const& local_xs,
269 Eigen::VectorXd
const& local_x_prev)
override;
272 Eigen::VectorXd
const& local_x_prev,
273 double const t,
double const dt,
274 int const process_id)
override;
278 int const process_id)
override;
281 const unsigned integration_point)
const override
286 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
292 std::vector<double>
getSigma()
const override;
294 std::vector<double>
getEpsilon()
const override;
300 std::vector<GlobalVector*>
const& x,
301 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
302 std::vector<double>& cache)
const override;
306 std::vector<GlobalVector*>
const& ,
307 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
308 std::vector<double>& cache)
const override
316 std::vector<GlobalVector*>
const& ,
317 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
318 std::vector<double>& cache)
const override
344 const double t,
double const dt, Eigen::VectorXd
const& local_x,
345 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
371 const double t,
double const dt, Eigen::VectorXd
const& local_x,
372 Eigen::VectorXd
const& local_x_prev, std::vector<double>& local_b_data,
373 std::vector<double>& local_Jac_data);
380 DisplacementDim>::MaterialStateVariables
const&
391 ShapeFunctionDisplacement::NPOINTS>;
392 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
398 typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType>
405 ShapeFunctionDisplacement::NPOINTS * DisplacementDim;
KelvinVector mechanical_strain
std::size_t getID() const
Returns the ID of the element.
unsigned getNumberOfPoints() const
void assembleWithJacobian(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_rhs_data, std::vector< double > &local_Jac_data) override
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
static const int displacement_size
bool const _is_axially_symmetric
void initializeConcrete() override
unsigned getNumberOfIntegrationPoints() const override
NumLib::GenericIntegrationMethod const & _integration_method
void assemble(double const, double const, std::vector< double > const &, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &) override
HydroMechanicsLocalAssembler(HydroMechanicsLocalAssembler &&)=delete
Eigen::Matrix< double, KelvinVectorSize, 1 > SymmetricTensor
void postNonLinearSolverConcrete(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, int const process_id) override
void postTimestepConcrete(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, int const process_id) override
void assembleWithJacobianForPressureEquations(const double t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
std::size_t setIPDataInitialConditions(std::string_view const name, double const *values, int const integration_order) override
Returns number of read integration points.
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
void computeSecondaryVariableConcrete(double const t, double const dt, Eigen::VectorXd const &local_xs, Eigen::VectorXd const &local_x_prev) override
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
void assembleWithJacobianForStaggeredScheme(const double t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data) override
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt(unsigned integration_point) const override
std::vector< double > getSigma() const override
void assembleWithJacobianForDeformationEquations(const double t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
static const int displacement_index
std::vector< double > const & getIntPtDarcyVelocity(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
void setInitialConditionsConcrete(Eigen::VectorXd const local_x, double const t, int const process_id) override
HydroMechanicsLocalAssembler(HydroMechanicsLocalAssembler const &)=delete
std::vector< double > const & getIntPtEpsilon(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
static const int pressure_index
MeshLib::Element const & _element
HydroMechanicsProcessData< DisplacementDim > & _process_data
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
BMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > BMatricesType
int getMaterialID() const override
static constexpr auto & N_u_op
std::vector< double > getEpsilon() const override
static int const KelvinVectorSize
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
static const int pressure_size
std::vector< double > getStrainRateVariable() const override
std::vector< double > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
double integration_weight
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
BMatricesType::KelvinMatrixType updateConstitutiveRelation(MPL::VariableArray const &variable_array, double const t, ParameterLib::SpatialPosition const &x_position, double const dt, DisplacementVectorType const &, double const T)
ShapeMatricesTypeDisplacement::GlobalDimNodalMatrixType dNdx_u
std::unique_ptr< typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables > material_state_variables
ShapeMatricesTypeDisplacement::NodalRowVectorType N_u
double strain_rate_variable
BMatricesType::KelvinVectorType eps
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > computeElasticTangentStiffness(double const t, ParameterLib::SpatialPosition const &x_position, double const dt, double const temperature)
ShapeMatricesTypePressure::GlobalDimNodalMatrixType dNdx_p
ShapeMatricesTypePressure::NodalRowVectorType N_p
BMatricesType::KelvinVectorType sigma_eff_prev
BMatricesType::KelvinVectorType eps_prev
MaterialLib::Solids::MechanicsBase< DisplacementDim > const & solid_material
IntegrationPointData(MaterialLib::Solids::MechanicsBase< DisplacementDim > const &solid_material)
BMatricesType::KelvinVectorType sigma_eff
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N_u