31namespace ThermoRichardsMechanics
35template <
typename ShapeFunctionDisplacement,
typename ShapeFunction,
36 int DisplacementDim,
typename ConstitutiveTraits>
46 ShapeFunctionDisplacement::NPOINTS * DisplacementDim;
65 ShapeFunctionDisplacement::NPOINTS>;
86 bool const is_axially_symmetric,
92 int const process_id)
override;
101 template <Eigen::Index rows, Eigen::Index cols>
103 typename ShapeMatricesTypeDisplacement::template MatrixType<rows,
105 using Vec =
typename ShapeMatricesTypeDisplacement::template VectorType<
184 template <
typename OStream>
205 <<
"\n- storage_p_a_p:\n"
207 <<
"\n- storage_p_a_S_Jpp:\n"
209 <<
"\n- storage_p_a_S:\n"
245 std::vector<double>
const& local_x,
246 std::vector<double>
const& local_x_prev,
247 std::vector<double>& local_rhs_data,
248 std::vector<double>& local_Jac_data)
override;
252 double const t,
double const dt,
254 std::vector<double>
const& local_x,
255 std::vector<double>
const& local_x_prev,
IpData const& ip_data,
256 typename ConstitutiveTraits::ConstitutiveSetting& CS,
258 typename ConstitutiveTraits::StatefulData& current_state,
259 typename ConstitutiveTraits::StatefulDataPrev
const& prev_state,
261 typename ConstitutiveTraits::OutputData& output_data)
const;
264 std::vector<double>
const& local_x,
265 std::vector<double>
const& local_x_prev,
267 std::vector<double>& local_rhs_data,
268 std::vector<double>& local_Jac_data)
const;
275 unsigned const n_integration_points =
277 auto const time_independent = std::numeric_limits<double>::quiet_NaN();
281 for (
unsigned ip = 0; ip < n_integration_points; ip++)
286 ShapeFunctionDisplacement,
294 ConstitutiveTraits::ConstitutiveSetting::statefulStress(
299 time_independent, x_position));
302 if (*this->
process_data_.initialize_porosity_from_medium_property)
306 std::get<PorosityData>(current_state).phi =
308 .template initialValue<double>(x_position,
311 if (medium.hasProperty(MPL::PropertyType::transport_porosity))
313 std::get<TransportPorosityData>(current_state).phi =
315 .template initialValue<double>(x_position,
320 std::get<TransportPorosityData>(current_state).phi =
321 std::get<PorosityData>(current_state).phi;
331 for (
unsigned ip = 0; ip < n_integration_points; ip++)
336 for (
unsigned ip = 0; ip < n_integration_points; ip++)
343 double const t,
double const dt, Eigen::VectorXd
const& local_x,
344 Eigen::VectorXd
const& local_x_prev)
override;
347 const unsigned integration_point)
const override
349 auto const& N_u =
ip_data_[integration_point].N_u;
352 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
358 static constexpr auto localDOF(std::vector<double>
const& x)
361 ShapeFunction, ShapeFunction,
367 return mat.template block<displacement_size, displacement_size>(
372 return mat.template block<displacement_size, pressure_size>(
377 return mat.template block<displacement_size, temperature_size>(
382 return mat.template block<pressure_size, displacement_size>(
387 return mat.template block<pressure_size, pressure_size>(
pressure_index,
392 return mat.template block<pressure_size, temperature_size>(
397 return mat.template block<temperature_size, pressure_size>(
402 return mat.template block<temperature_size, temperature_size>(
426 unsigned const ip,
double const t,
std::size_t getID() const
Returns the ID of the element.
unsigned getNumberOfPoints() const
VectorType< _kelvin_vector_size > KelvinVectorType
NodalMatrix storage_p_a_p
NodalMatrix storage_p_a_S_Jpp
LocalMatrices & operator+=(LocalMatrices const &other)
typename ShapeMatricesTypeDisplacement::template MatrixType< rows, cols > Mat
friend OStream & operator<<(OStream &os, LocalMatrices const &loc_mat)
typename ShapeMatricesTypeDisplacement::template VectorType< local_matrix_dim > Vec
NodalMatrix storage_p_a_S
Mat< local_matrix_dim, local_matrix_dim > Jac
Mat< pressure_size, displacement_size > M_pu
LocalMatrices & operator*=(double const a)
static auto constexpr local_matrix_dim
typename ShapeMatricesType::NodalMatrixType NodalMatrix
static auto block_TT(auto &mat)
static constexpr auto & N_u_op
void addToLocalMatrixData(double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, LocalMatrices const &loc_mat, std::vector< double > &local_rhs_data, std::vector< double > &local_Jac_data) const
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
static constexpr int temperature_size
static constexpr int temperature_index
static constexpr int pressure_size
void computeSecondaryVariableConcrete(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev) override
void assembleWithJacobianSingleIP(double const t, double const dt, ParameterLib::SpatialPosition const &x_position, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, IpData const &ip_data, typename ConstitutiveTraits::ConstitutiveSetting &CS, MaterialPropertyLib::Medium &medium, LocalMatrices &out, typename ConstitutiveTraits::StatefulData ¤t_state, typename ConstitutiveTraits::StatefulDataPrev const &prev_state, MaterialStateData< DisplacementDim > &mat_state, typename ConstitutiveTraits::OutputData &output_data) const
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
static auto block_p(auto &vec)
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
ThermoRichardsMechanicsLocalAssembler(ThermoRichardsMechanicsLocalAssembler &&)=delete
static auto block_pu(auto &mat)
std::vector< IpData > ip_data_
void convertInitialStressType(unsigned const ip, double const t, ParameterLib::SpatialPosition const x_position, MaterialPropertyLib::Medium const &medium, MPL::VariableArray const &variables, double const p_at_ip)
typename BMatricesType::KelvinVectorType KelvinVectorType
static auto block_up(auto &mat)
static constexpr int displacement_index
static auto block_Tp(auto &mat)
ThermoRichardsMechanicsLocalAssembler(ThermoRichardsMechanicsLocalAssembler const &)=delete
void initializeConcrete() override
void setInitialConditionsConcrete(Eigen::VectorXd const local_x, double const t, int const process_id) override
ShapeMatrixPolicyType< ShapeFunction, DisplacementDim > ShapeMatricesType
static auto block_pp(auto &mat)
static auto block_pT(auto &mat)
static auto block_uT(auto &mat)
static auto block_uu(auto &mat)
Eigen::Matrix< double, KelvinVectorSize, 1 > SymmetricTensor
static constexpr auto localDOF(std::vector< double > const &x)
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
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
static int const KelvinVectorSize
static constexpr int displacement_size
static constexpr int pressure_index
static auto block_u(auto &vec)
static auto block_T(auto &vec)
void massLumping(LocalMatrices &loc_mat) const
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
auto localDOF(ElementDOFVector const &x)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
NumLib::GenericIntegrationMethod const & integration_method_
ThermoRichardsMechanicsProcessData< DisplacementDim, ConstitutiveTraits > & process_data_
std::vector< typename ConstitutiveTraits::StatefulDataPrev > prev_states_
std::vector< MaterialStateData< DisplacementDim > > material_states_
ConstitutiveTraits::SolidConstitutiveRelation const & solid_material_
std::vector< typename ConstitutiveTraits::StatefulData > current_states_
MeshLib::Element const & element_