34namespace MPL = MaterialPropertyLib;
35template <
typename BMatricesType,
typename ShapeMatrixType,
int DisplacementDim>
47 typename ShapeMatrixType::NodalRowVectorType
N;
48 typename ShapeMatrixType::GlobalDimNodalMatrixType
dNdx;
60 DisplacementDim>::MaterialStateVariables>
79 template <
typename DisplacementVectorType>
84 DisplacementVectorType
const& ,
85 double const degradation,
90 decltype(
sigma),
decltype(
D), DisplacementDim>(
99template <
typename ShapeMatrixType>
102 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
105template <
typename ShapeFunction,
int DisplacementDim>
115 ShapeFunction::NPOINTS * DisplacementDim;
130 typename ShapeMatricesType::template VectorType<displacement_size>;
135 typename ShapeMatricesType::template VectorType<phasefield_size>;
140 typename ShapeMatricesType::template VectorType<pressure_size>;
142 typename ShapeMatricesType::template MatrixType<
pressure_size,
165 bool const is_axially_symmetric,
172 unsigned const n_integration_points =
175 _ip_data.reserve(n_integration_points);
178 auto& solid_material =
184 auto const shape_matrices =
186 DisplacementDim>(e, is_axially_symmetric,
192 for (
unsigned ip = 0; ip < n_integration_points; ip++)
194 _ip_data.emplace_back(solid_material);
196 ip_data.integration_weight =
198 shape_matrices[ip].integralMeasure * shape_matrices[ip].detJ;
200 static const int kelvin_vector_size =
203 ip_data.eps_tensile.setZero(kelvin_vector_size);
204 ip_data.eps.setZero(kelvin_vector_size);
205 ip_data.eps_prev.resize(kelvin_vector_size);
206 ip_data.D.setZero(kelvin_vector_size, kelvin_vector_size);
207 ip_data.C_tensile.setZero(kelvin_vector_size, kelvin_vector_size);
208 ip_data.C_compressive.setZero(kelvin_vector_size,
211 ip_data.sigma_tensile.setZero(kelvin_vector_size);
212 ip_data.sigma_compressive.setZero(kelvin_vector_size);
213 ip_data.sigma.setZero(kelvin_vector_size);
214 ip_data.strain_energy_tensile = 0.0;
215 ip_data.elastic_energy = 0.0;
216 ip_data.width_ip = 0.0;
218 ip_data.N = shape_matrices[ip].N;
219 ip_data.dNdx = shape_matrices[ip].dNdx;
226 double const t,
double const dt, Eigen::VectorXd
const& local_x,
227 Eigen::VectorXd
const& local_x_prev,
int const process_id,
228 std::vector<double>& local_b_data,
229 std::vector<double>& local_Jac_data)
override;
233 unsigned const n_integration_points =
236 for (
unsigned ip = 0; ip < n_integration_points; ip++)
242 auto& normal_ip =
_ip_data[ip].normal_ip;
243 auto const fracture_normal =
245 normal_ip = fracture_normal;
251 auto const width_init =
_process_data.width_init(0, x_position)[0];
256 Eigen::VectorXd
const& ,
257 double const ,
double const ,
260 unsigned const n_integration_points =
263 for (
unsigned ip = 0; ip < n_integration_points; ip++)
270 Eigen::VectorXd
const& local_x_prev,
271 double const t,
double const dt,
272 int const process_id)
override;
275 std::size_t mesh_item_id,
276 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
277 std::vector<GlobalVector*>
const& x,
double const t,
278 double const dt)
override;
281 std::size_t mesh_item_id,
282 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
283 std::vector<GlobalVector*>
const& x,
double const t,
284 double& elastic_energy,
double& surface_energy,
285 double& pressure_work)
override;
287 inline double heaviside(
double const v) {
return (v < 0) ? 0.0 : 1.0; }
290 const unsigned integration_point)
const override
295 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
300 std::vector<GlobalVector*>
const& ,
301 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
302 std::vector<double>& cache)
const override;
307 std::vector<GlobalVector*>
const& ,
308 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
309 std::vector<double>& cache)
const override
317 std::vector<GlobalVector*>
const& ,
318 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
319 std::vector<double>& cache)
const override
326 const double t,
double const dt, Eigen::VectorXd
const& local_x,
327 Eigen::VectorXd
const& local_x_prev, std::vector<double>& local_b_data,
328 std::vector<double>& local_Jac_data);
331 double const t,
double const dt, Eigen::VectorXd
const& local_x,
332 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
335 double const t,
double const dt, Eigen::VectorXd
const& local_x,
336 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
340 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
std::size_t getID() const
Returns the ID of the element.
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
MathLib::KelvinVector::Invariants< KelvinVectorSize > Invariants
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
BMatrixPolicyType< ShapeFunction, DisplacementDim > BMatricesType
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
IntegrationPointData< BMatricesType, ShapeMatricesType, DisplacementDim > IpData
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
ShapeMatricesType::NodalRowVectorType N
double strain_energy_tensile
double biot_modulus_inv_prev
ShapeMatricesType::GlobalDimNodalMatrixType dNdx
BMatricesType::KelvinVectorType sigma_tensile
double fracture_enhanced_porosity
BMatricesType::KelvinVectorType sigma
BMatricesType::KelvinMatrixType D
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N