42template <
typename BMatricesType,
typename ShapeMatrixType,
int DisplacementDim>
54 typename ShapeMatrixType::NodalRowVectorType
N;
55 typename ShapeMatrixType::GlobalDimNodalMatrixType
dNdx;
67 DisplacementDim>::MaterialStateVariables>
86 template <
typename DisplacementVectorType>
91 DisplacementVectorType
const& ,
92 double const degradation,
97 decltype(
sigma),
decltype(
D), DisplacementDim>(
106template <
typename ShapeMatrixType>
109 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
112template <
typename ShapeFunction,
int DisplacementDim>
122 ShapeFunction::NPOINTS * DisplacementDim;
137 typename ShapeMatricesType::template VectorType<displacement_size>;
142 typename ShapeMatricesType::template VectorType<phasefield_size>;
147 typename ShapeMatricesType::template VectorType<pressure_size>;
149 typename ShapeMatricesType::template MatrixType<
pressure_size,
172 bool const is_axially_symmetric,
179 unsigned const n_integration_points =
182 _ip_data.reserve(n_integration_points);
185 auto& solid_material =
191 auto const shape_matrices =
193 DisplacementDim>(e, is_axially_symmetric,
199 for (
unsigned ip = 0; ip < n_integration_points; ip++)
201 _ip_data.emplace_back(solid_material);
203 ip_data.integration_weight =
205 shape_matrices[ip].integralMeasure * shape_matrices[ip].detJ;
207 static const int kelvin_vector_size =
210 ip_data.eps_tensile.setZero(kelvin_vector_size);
211 ip_data.eps.setZero(kelvin_vector_size);
212 ip_data.eps_prev.resize(kelvin_vector_size);
213 ip_data.D.setZero(kelvin_vector_size, kelvin_vector_size);
214 ip_data.C_tensile.setZero(kelvin_vector_size, kelvin_vector_size);
215 ip_data.C_compressive.setZero(kelvin_vector_size,
218 ip_data.sigma_tensile.setZero(kelvin_vector_size);
219 ip_data.sigma_compressive.setZero(kelvin_vector_size);
220 ip_data.sigma.setZero(kelvin_vector_size);
221 ip_data.strain_energy_tensile = 0.0;
222 ip_data.elastic_energy = 0.0;
223 ip_data.width_ip = 0.0;
225 ip_data.N = shape_matrices[ip].N;
226 ip_data.dNdx = shape_matrices[ip].dNdx;
233 double const t,
double const dt, Eigen::VectorXd
const& local_x,
234 Eigen::VectorXd
const& local_x_prev,
int const process_id,
235 std::vector<double>& local_b_data,
236 std::vector<double>& local_Jac_data)
override;
240 unsigned const n_integration_points =
243 for (
unsigned ip = 0; ip < n_integration_points; ip++)
249 auto& normal_ip =
_ip_data[ip].normal_ip;
250 auto const fracture_normal =
252 normal_ip = fracture_normal;
258 auto const width_init =
_process_data.width_init(0, x_position)[0];
263 Eigen::VectorXd
const& ,
264 double const ,
double const ,
267 unsigned const n_integration_points =
270 for (
unsigned ip = 0; ip < n_integration_points; ip++)
277 Eigen::VectorXd
const& local_x_prev,
278 double const t,
double const dt,
279 int const process_id)
override;
282 std::size_t mesh_item_id,
283 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
284 std::vector<GlobalVector*>
const& x,
double const t,
285 double const dt)
override;
288 std::size_t mesh_item_id,
289 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
290 std::vector<GlobalVector*>
const& x,
double const t,
291 double& elastic_energy,
double& surface_energy,
292 double& pressure_work)
override;
294 inline double heaviside(
double const v) {
return (v < 0) ? 0.0 : 1.0; }
297 const unsigned integration_point)
const override
302 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
307 std::vector<GlobalVector*>
const& ,
308 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
309 std::vector<double>& cache)
const override;
314 std::vector<GlobalVector*>
const& ,
315 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
316 std::vector<double>& cache)
const override
324 std::vector<GlobalVector*>
const& ,
325 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
326 std::vector<double>& cache)
const override
333 const double t,
double const dt, Eigen::VectorXd
const& local_x,
334 Eigen::VectorXd
const& local_x_prev, std::vector<double>& local_b_data,
335 std::vector<double>& local_Jac_data);
338 double const t,
double const dt, Eigen::VectorXd
const& local_x,
339 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
342 double const t,
double const dt, Eigen::VectorXd
const& local_x,
343 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
347 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
Definition of the Element class.
constexpr double getWeight() const
std::size_t getID() const
Returns the ID of the element.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
void setElementID(std::size_t element_id)
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
void approximateFractureWidth(std::size_t mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double const dt) override
typename BMatricesType::NodalForceVectorType NodalForceVectorType
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
void computeEnergy(std::size_t mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double &elastic_energy, double &surface_energy, double &pressure_work) override
MeshLib::Element const & _element
static constexpr int displacement_size
HMPhaseFieldLocalAssembler(HMPhaseFieldLocalAssembler &&)=delete
HMPhaseFieldLocalAssembler(HMPhaseFieldLocalAssembler const &)=delete
std::vector< double > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
typename ShapeMatricesType::template VectorType< displacement_size > DeformationVector
static constexpr int phasefield_index
typename ShapeMatricesType::NodalVectorType NodalVectorType
void initializeConcrete() override
static constexpr auto & N_u_op
void assembleWithJacobianForStaggeredScheme(double const 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
HMPhaseFieldProcessData< DisplacementDim > & _process_data
static constexpr int pressure_size
double heaviside(double const v)
typename ShapeMatricesType::NodalMatrixType NodalMatrixType
void postNonLinearSolverConcrete(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, int const process_id) override
std::vector< double > const & getIntPtWidth(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
ShapeMatrixPolicyType< ShapeFunction, DisplacementDim > ShapeMatricesType
void assembleWithJacobianPhaseFieldEquations(double const t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
typename ShapeMatricesType::template MatrixType< phasefield_size, phasefield_size > PhaseFieldMatrix
void assembleWithJacobianHydroEquations(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)
void assembleWithJacobianForDeformationEquations(double const t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
typename ShapeMatricesType::template MatrixType< pressure_size, pressure_size > PressureMatrix
typename ShapeMatricesType::template MatrixType< displacement_size, displacement_size > DeformationMatrix
bool const _is_axially_symmetric
NumLib::GenericIntegrationMethod const & _integration_method
typename ShapeMatricesType::template VectorType< pressure_size > PressureVector
typename ShapeMatricesType::template VectorType< phasefield_size > PhaseFieldVector
static int const KelvinVectorSize
static constexpr int displacement_index
static constexpr int pressure_index
static constexpr int phasefield_size
void postTimestepConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
HMPhaseFieldLocalAssembler(MeshLib::Element const &e, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, HMPhaseFieldProcessData< DisplacementDim > &process_data)
SecondaryData< typename ShapeMatrices::ShapeType > _secondary_data
std::vector< double > const & getIntPtEpsilon(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
void calculateStress(T_VECTOR &sigma, T_VECTOR &sigma_tensile, T_VECTOR &sigma_compressive, T_VECTOR &eps_tensile, T_MATRIX &D, T_MATRIX &C_tensile, T_MATRIX &C_compressive, double &strain_energy_tensile, double &elastic_energy, double const degradation, T_VECTOR const &eps, EnergySplitModel const &energy_split_model, double const t, ParameterLib::SpatialPosition const &x, MaterialLib::Solids::MechanicsBase< DisplacementDim > const &solid_material)
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
BMatricesType::KelvinMatrixType C_compressive
void updateConstitutiveRelation(double const t, ParameterLib::SpatialPosition const &x, double const, DisplacementVectorType const &, double const degradation, MaterialLib::Solids::Phasefield::EnergySplitModel const energy_split_model)
MaterialLib::Solids::MechanicsBase< DisplacementDim > const & solid_material
BMatricesType::KelvinMatrixType C_tensile
BMatricesType::KelvinVectorType eps_prev
BMatricesType::KelvinVectorType sigma_compressive
BMatricesType::KelvinVectorType eps_tensile
double integration_weight
std::unique_ptr< typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables > material_state_variables
BMatricesType::KelvinVectorType eps
double biot_coefficient_prev
IntegrationPointData(MaterialLib::Solids::MechanicsBase< DisplacementDim > const &solid_material)
Eigen::Vector< double, DisplacementDim > normal_ip
ShapeMatrixType::NodalRowVectorType N
double strain_energy_tensile
double biot_modulus_inv_prev
ShapeMatrixType::GlobalDimNodalMatrixType dNdx
BMatricesType::KelvinVectorType sigma_tensile
double fracture_enhanced_porosity
BMatricesType::KelvinVectorType sigma
BMatricesType::KelvinMatrixType D
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N