6#include <Eigen/Eigenvalues>
25namespace MPL = MaterialPropertyLib;
27template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
31 HydroMechanicsLocalAssembler(
35 bool const is_axially_symmetric,
42 unsigned const n_integration_points =
45 _ip_data.reserve(n_integration_points);
48 auto const shape_matrices_u =
51 DisplacementDim>(e, is_axially_symmetric,
54 auto const shape_matrices_p =
59 auto const& solid_material =
64 for (
unsigned ip = 0; ip < n_integration_points; ip++)
66 _ip_data.emplace_back(solid_material);
68 auto const& sm_u = shape_matrices_u[ip];
69 ip_data.integration_weight =
71 sm_u.integralMeasure * sm_u.detJ;
74 static const int kelvin_vector_size =
76 ip_data.sigma_eff.setZero(kelvin_vector_size);
77 ip_data.eps.setZero(kelvin_vector_size);
80 ip_data.eps_prev.resize(kelvin_vector_size);
81 ip_data.sigma_eff_prev.resize(kelvin_vector_size);
84 ip_data.dNdx_u = sm_u.dNdx;
86 ip_data.N_p = shape_matrices_p[ip].N;
87 ip_data.dNdx_p = shape_matrices_p[ip].dNdx;
93template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
96 ShapeFunctionPressure, DisplacementDim>::
97 assembleWithJacobian(
double const t,
double const dt,
98 std::vector<double>
const& local_x,
99 std::vector<double>
const& local_x_prev,
100 std::vector<double>& local_rhs_data,
101 std::vector<double>& local_Jac_data)
105 auto p = Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
109 Eigen::Map<
typename ShapeMatricesTypeDisplacement::template VectorType<
114 Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
118 Eigen::Map<
typename ShapeMatricesTypeDisplacement::template VectorType<
123 typename ShapeMatricesTypeDisplacement::template MatrixType<
130 typename ShapeMatricesTypeDisplacement::template VectorType<
135 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
139 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
143 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
146 typename ShapeMatricesTypeDisplacement::template MatrixType<
148 Kup = ShapeMatricesTypeDisplacement::template MatrixType<
152 typename ShapeMatricesTypeDisplacement::template MatrixType<
154 Kpu = ShapeMatricesTypeDisplacement::template MatrixType<
158 typename ShapeMatricesTypeDisplacement::template MatrixType<
160 Kpu_k = ShapeMatricesTypeDisplacement::template MatrixType<
164 auto const& solid_material =
172 unsigned const n_integration_points =
178 auto const& fluid = fluidPhase(*medium);
186 .template value<double>(vars, x_position, t, dt);
191 for (
unsigned ip = 0; ip < n_integration_points; ip++)
193 auto const& w =
_ip_data[ip].integration_weight;
196 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
199 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
212 ShapeFunctionDisplacement::NPOINTS,
217 eps.noalias() = B * u;
218 auto const& sigma_eff =
_ip_data[ip].sigma_eff;
220 double const p_int_pt = N_p.dot(p);
222 phase_pressure = p_int_pt;
224 auto const C_el =
_ip_data[ip].computeElasticTangentStiffness(
225 t, x_position, dt, T_ref);
226 auto const K_S = solid_material.getBulkModulus(t, x_position, &C_el);
229 .template value<double>(vars, x_position, t, dt);
233 .template value<double>(vars, x_position, t, dt);
234 auto const porosity =
236 .template value<double>(vars, x_position, t, dt);
238 auto const [rho_fr, mu] =
251 auto const sigma_total =
252 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
261 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
268 .value(vars, x_position, t, dt));
274 auto const K_over_mu = K / mu;
276 auto C =
_ip_data[ip].updateConstitutiveRelation(vars, t, x_position,
283 .template block<displacement_size, displacement_size>(
285 .noalias() += B.transpose() * C * B * w;
287 double const rho = rho_sr * (1 - porosity) + porosity * rho_fr;
290 (B.transpose() * sigma_eff -
N_u_op(N_u).transpose() * rho * b) * w;
295 Kup.noalias() += B.transpose() * alpha * identity2 * N_p * w;
300 laplace_p.noalias() +=
301 rho_fr * dNdx_p.transpose() * K_over_mu * dNdx_p * w;
303 storage_p.noalias() +=
304 rho_fr * N_p.transpose() * N_p * w *
305 ((alpha - porosity) * (1.0 - alpha) / K_S + porosity * beta_p);
309 add_p_derivative.noalias() += rho_fr * beta_p * dNdx_p.transpose() *
311 (dNdx_p * p - 2.0 * rho_fr * b) * N_p * w;
313 local_rhs.template segment<pressure_size>(
pressure_index).noalias() +=
314 dNdx_p.transpose() * rho_fr * rho_fr * K_over_mu * b * w;
320 rho_fr * alpha * N_p.transpose() * identity2.transpose() * B * w;
325 dNdx_p * p - rho_fr * b) *
326 dkde * B * rho_fr / mu * w;
336 storage_p = storage_p.colwise().sum().eval().asDiagonal();
340 Kpu = Kpu.colwise().sum().eval().asDiagonal();
341 Kpu_k = Kpu_k.colwise().sum().eval().asDiagonal();
349 .noalias() += laplace_p + storage_p / dt + add_p_derivative;
355 .noalias() += Kpu / dt + Kpu_k;
358 local_rhs.template segment<pressure_size>(
pressure_index).noalias() -=
359 laplace_p * p + storage_p * (p - p_prev) / dt + Kpu * (u - u_prev) / dt;
363 .noalias() += Kup * p;
366template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
369 ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim>::
370 getIntPtDarcyVelocity(
372 std::vector<GlobalVector*>
const& x,
373 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
374 std::vector<double>& cache)
const
376 int const hydraulic_process_id =
_process_data.hydraulic_process_id;
379 assert(!indices.empty());
380 auto const local_x = x[hydraulic_process_id]->get(indices);
382 unsigned const n_integration_points =
386 double, DisplacementDim, Eigen::Dynamic, Eigen::RowMajor>>(
387 cache, DisplacementDim, n_integration_points);
389 auto p = Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
396 auto const& fluid = fluidPhase(*medium);
404 double const dt = std::numeric_limits<double>::quiet_NaN();
407 .template value<double>(vars, x_position, t, dt);
411 for (
unsigned ip = 0; ip < n_integration_points; ip++)
420 double const p_int_pt =
_ip_data[ip].N_p.dot(p);
422 phase_pressure = p_int_pt;
425 .template value<double>(vars, x_position, t, dt);
429 auto const sigma_total =
430 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
437 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
444 .value(vars, x_position, t, dt));
446 auto const [rho_fr, mu] =
450 auto const K_over_mu = K / mu;
455 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
456 cache_matrix.col(ip).noalias() =
457 -K_over_mu * dNdx_p * p + K_over_mu * rho_fr * b;
463template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
466 ShapeFunctionPressure, DisplacementDim>::
467 assembleWithJacobianForPressureEquations(
468 const double t,
double const dt, Eigen::VectorXd
const& local_x,
469 Eigen::VectorXd
const& local_x_prev, std::vector<double>& local_b_data,
470 std::vector<double>& local_Jac_data)
474 template VectorType<pressure_size>>(
480 auto const p = local_x.template segment<pressure_size>(
pressure_index);
486 typename ShapeMatricesTypeDisplacement::template MatrixType<
491 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
495 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
499 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
502 auto const& solid_material =
511 auto const& fluid = fluidPhase(*medium);
519 .template value<double>(vars, x_position, t, dt);
524 auto const staggered_scheme =
526 auto const fixed_stress_stabilization_parameter =
527 staggered_scheme.fixed_stress_stabilization_parameter;
528 auto const fixed_stress_over_time_step =
529 staggered_scheme.fixed_stress_over_time_step;
532 for (
int ip = 0; ip < n_integration_points; ip++)
534 auto const& w =
_ip_data[ip].integration_weight;
537 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
546 double const p_int_pt = N_p.dot(p);
548 phase_pressure = p_int_pt;
550 auto const C_el =
_ip_data[ip].computeElasticTangentStiffness(
551 t, x_position, dt, T_ref);
552 auto const K_S = solid_material.getBulkModulus(t, x_position, &C_el);
556 .template value<double>(vars, x_position, t, dt);
560 auto const sigma_total =
561 (
_ip_data[ip].sigma_eff - alpha_b * p_int_pt * identity2).eval();
568 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
575 .value(vars, x_position, t, dt));
576 auto const porosity =
578 .template value<double>(vars, x_position, t, dt);
580 auto const [rho_fr, mu] =
590 auto const K_over_mu = K / mu;
593 rho_fr * dNdx_p.transpose() * K_over_mu * dNdx_p * w;
597 fixed_stress_stabilization_parameter * alpha_b * alpha_b / K_S;
599 storage.noalias() += rho_fr * N_p.transpose() * N_p * w *
600 ((alpha_b - porosity) * (1.0 - alpha_b) / K_S +
601 porosity * beta_p + beta_FS);
606 local_rhs.noalias() +=
607 dNdx_p.transpose() * rho_fr * rho_fr * K_over_mu * b * w;
612 add_p_derivative.noalias() += rho_fr * beta_p * dNdx_p.transpose() *
614 (dNdx_p * p - 2.0 * rho_fr * b) * N_p * w;
616 if (!fixed_stress_over_time_step)
619 auto const& eps_prev =
_ip_data[ip].eps_prev;
620 const double eps_v_dot =
624 double const strain_rate_b =
625 alpha_b * eps_v_dot -
626 beta_FS *
_ip_data[ip].strain_rate_variable;
628 local_rhs.noalias() -= strain_rate_b * rho_fr * N_p * w;
633 local_rhs.noalias() -=
634 alpha_b *
_ip_data[ip].strain_rate_variable * rho_fr * N_p * w;
637 local_Jac.noalias() = laplace + storage / dt + add_p_derivative;
639 local_rhs.noalias() -= laplace * p + storage * (p - p_prev) / dt;
642template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
645 ShapeFunctionPressure, DisplacementDim>::
646 assembleWithJacobianForDeformationEquations(
647 const double t,
double const dt, Eigen::VectorXd
const& local_x,
648 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data)
650 auto const p = local_x.template segment<pressure_size>(
pressure_index);
655 typename ShapeMatricesTypeDisplacement::template MatrixType<
661 template VectorType<displacement_size>>(
669 auto const& fluid = fluidPhase(*medium);
677 .template value<double>(vars, x_position, t, dt);
681 for (
int ip = 0; ip < n_integration_points; ip++)
683 auto const& w =
_ip_data[ip].integration_weight;
686 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
697 auto const x_coord = x_position.getCoordinates().value()[0];
700 ShapeFunctionDisplacement::NPOINTS,
705 auto const& sigma_eff =
_ip_data[ip].sigma_eff;
707 phase_pressure = N_p.dot(p);
710 .template value<double>(vars, x_position, t, dt);
713 .template value<double>(vars, x_position, t, dt);
714 auto const porosity =
716 .template value<double>(vars, x_position, t, dt);
719 t, dt, x_position, fluid, vars);
724 DisplacementDim)>::identity2;
726 eps.noalias() = B * u;
731 auto C =
_ip_data[ip].updateConstitutiveRelation(vars, t, x_position,
734 local_Jac.noalias() += B.transpose() * C * B * w;
739 double const rho = rho_sr * (1 - porosity) + porosity * rho_fr;
740 local_rhs.noalias() -=
741 (B.transpose() * (sigma_eff - alpha * identity2 * p_at_xi) -
742 N_u_op(N_u).transpose() * rho * b) *
747template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
750 ShapeFunctionPressure, DisplacementDim>::
751 assembleWithJacobianForStaggeredScheme(
const double t,
double const dt,
752 Eigen::VectorXd
const& local_x,
753 Eigen::VectorXd
const& local_x_prev,
754 int const process_id,
755 std::vector<double>& local_b_data,
756 std::vector<double>& local_Jac_data)
762 local_b_data, local_Jac_data);
771template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
774 ShapeFunctionPressure, DisplacementDim>::
775 setInitialConditionsConcrete(Eigen::VectorXd
const local_x,
784 auto const p = local_x.template segment<pressure_size>(
pressure_index);
789 const double dt = 0.0;
794 for (
int ip = 0; ip < n_integration_points; ip++)
797 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
809 ShapeFunctionDisplacement::NPOINTS,
814 eps.noalias() = B * u;
824 .template value<double>(vars, x_position, t, dt);
826 auto& sigma_eff =
_ip_data[ip].sigma_eff;
827 sigma_eff.noalias() += alpha_b * N_p.dot(p) * identity2;
828 _ip_data[ip].sigma_eff_prev.noalias() = sigma_eff;
833template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
836 ShapeFunctionPressure, DisplacementDim>::
837 postNonLinearSolverConcrete(Eigen::VectorXd
const& local_x,
838 Eigen::VectorXd
const& local_x_prev,
839 double const t,
double const dt,
840 int const process_id)
848 auto const staggered_scheme_ptr =
851 if (staggered_scheme_ptr &&
854 if (!staggered_scheme_ptr->fixed_stress_over_time_step)
861 for (
int ip = 0; ip < n_integration_points; ip++)
865 auto const& N_p = ip_data.N_p;
867 ip_data.strain_rate_variable = N_p.dot(p - p_prev) / dt;
872 if (!staggered_scheme_ptr ||
892 for (
int ip = 0; ip < n_integration_points; ip++)
895 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
897 x_position = {std::nullopt,
_element.getID(),
899 ShapeFunctionDisplacement,
905 DisplacementDim, ShapeFunctionDisplacement::NPOINTS,
910 eps.noalias() = B * u;
914 _ip_data[ip].updateConstitutiveRelation(vars, t, x_position, dt, u,
920template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
923 ShapeFunctionDisplacement, ShapeFunctionPressure,
925 Eigen::VectorXd
const& local_x_prev,
926 double const t,
double const dt,
927 int const process_id)
929 auto const staggered_scheme_ptr =
932 if (staggered_scheme_ptr &&
935 if (staggered_scheme_ptr->fixed_stress_over_time_step)
937 auto const fixed_stress_stabilization_parameter =
938 staggered_scheme_ptr->fixed_stress_stabilization_parameter;
948 auto const& solid_material =
959 .template value<double>(vars, x_position, t, dt);
962 int const n_integration_points =
964 for (
int ip = 0; ip < n_integration_points; ip++)
968 auto const& N_p = ip_data.N_p;
977 auto const& eps = ip_data.eps;
978 auto const& eps_prev = ip_data.eps_prev;
979 const double eps_v_dot =
982 auto const C_el = ip_data.computeElasticTangentStiffness(
983 t, x_position, dt, T_ref);
985 solid_material.getBulkModulus(t, x_position, &C_el);
989 .template value<double>(vars, x_position, t, dt);
991 ip_data.strain_rate_variable =
992 eps_v_dot - fixed_stress_stabilization_parameter * alpha_b *
993 N_p.dot(p - p_prev) / dt / K_S;
998 unsigned const n_integration_points =
1001 for (
unsigned ip = 0; ip < n_integration_points; ip++)
1007template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1008 int DisplacementDim>
1010 ShapeFunctionDisplacement, ShapeFunctionPressure,
1012 double const* values,
1013 int const integration_order)
1015 if (integration_order !=
1019 "Setting integration point initial conditions; The integration "
1020 "order of the local assembler for element {:d} is different from "
1021 "the integration order in the initial condition.",
1025 if (name ==
"sigma")
1030 "Setting initial conditions for stress from integration "
1031 "point data and from a parameter '{:s}' is not possible "
1040 if (name ==
"epsilon")
1046 if (name ==
"strain_rate_variable")
1055template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1056 int DisplacementDim>
1065template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1066 int DisplacementDim>
1071 auto const kelvin_vector_size =
1073 unsigned const n_integration_points =
1076 std::vector<double> ip_epsilon_values;
1078 double, Eigen::Dynamic, kelvin_vector_size, Eigen::RowMajor>>(
1079 ip_epsilon_values, n_integration_points, kelvin_vector_size);
1081 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
1083 auto const& eps =
_ip_data[ip].eps;
1088 return ip_epsilon_values;
1091template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1092 int DisplacementDim>
1097 unsigned const n_integration_points =
1100 std::vector<double> ip_strain_rate_variables(n_integration_points);
1102 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
1104 ip_strain_rate_variables[ip] =
_ip_data[ip].strain_rate_variable;
1107 return ip_strain_rate_variables;
1110template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1111 int DisplacementDim>
1113 ShapeFunctionPressure, DisplacementDim>::
1114 computeSecondaryVariableConcrete(
double const t,
double const dt,
1115 Eigen::VectorXd
const& local_x,
1116 Eigen::VectorXd
const& )
1118 auto const p = local_x.template segment<pressure_size>(
pressure_index);
1121 ShapeFunctionPressure,
typename ShapeFunctionDisplacement::MeshElement,
1125 int const elem_id =
_element.getID();
1127 unsigned const n_integration_points =
1130 auto const& medium =
_process_data.media_map.getMedium(elem_id);
1138 Eigen::Matrix<double, 3, 3>::Zero());
1142 for (
unsigned ip = 0; ip < n_integration_points; ip++)
1144 auto const& eps =
_ip_data[ip].eps;
1145 sigma_eff_sum +=
_ip_data[ip].sigma_eff;
1155 .template value<double>(vars, x_position, t, dt);
1156 double const p_int_pt =
_ip_data[ip].N_p.dot(p);
1158 phase_pressure = p_int_pt;
1163 auto const sigma_total =
1164 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
1172 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
1179 .value(vars, x_position, t, dt));
1182 Eigen::Map<Eigen::VectorXd>(
1186 Eigen::Matrix<double, 3, 3, 0, 3, 3>
const sigma_avg =
1188 n_integration_points;
1190 Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, 3, 3>> e_s(sigma_avg);
1192 Eigen::Map<Eigen::Vector3d>(
1193 &(*
_process_data.principal_stress_values)[elem_id * 3], 3) =
1196 auto eigen_vectors = e_s.eigenvectors();
1198 for (
auto i = 0; i < 3; i++)
1200 Eigen::Map<Eigen::Vector3d>(
1201 &(*
_process_data.principal_stress_vector[i])[elem_id * 3], 3) =
1202 eigen_vectors.col(i);
1206template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1207 int DisplacementDim>
1209 ShapeFunctionDisplacement, ShapeFunctionPressure,
1215template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1216 int DisplacementDim>
1218 ShapeFunctionPressure,
1226template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1227 int DisplacementDim>
1229 DisplacementDim>::MaterialStateVariables
const&
1232 getMaterialStateVariablesAt(
unsigned integration_point)
const
1234 return *
_ip_data[integration_point].material_state_variables;
KelvinVector mechanical_strain
KelvinVector total_stress
double gas_phase_pressure
double equivalent_plastic_strain
double liquid_phase_pressure
std::size_t getID() const
Returns the ID of the element.
void setElementID(std::size_t element_id)
std::optional< MathLib::Point3d > const getCoordinates() const
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
static const int displacement_size
bool const _is_axially_symmetric
unsigned getNumberOfIntegrationPoints() const override
NumLib::GenericIntegrationMethod const & _integration_method
Eigen::Matrix< double, KelvinVectorSize, 1 > SymmetricTensor
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)
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
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
static const int pressure_index
MeshLib::Element const & _element
HydroMechanicsProcessData< DisplacementDim > & _process_data
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
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
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
std::tuple< double, double > getFluidDensityAndViscosity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::Phase const &fluid_phase, MaterialPropertyLib::VariableArray &vars)
It computes fluid density and viscosity for single phase flow model.
constexpr Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
double getFluidDensity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, Phase const &fluid_phase, VariableArray &vars)
It computes fluid density for single phase flow model.
static const VariableArray EmptyVariableArray
SymmetricTensor< GlobalDim > getSymmetricTensor(MaterialPropertyLib::PropertyDataType const &values)
Eigen::Matrix< double, 4, 1 > kelvinVectorToSymmetricTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
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, 3, 3 > kelvinVectorToTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
Eigen::Matrix< double, DisplacementDim, kelvin_vector_dimensions(DisplacementDim)> liftVectorToKelvin(Eigen::Matrix< double, DisplacementDim, 1 > const &v)
KelvinVectorType< DisplacementDim > tensorToKelvin(Eigen::Matrix< double, 3, 3 > const &m)
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
void interpolateToHigherOrderNodes(MeshLib::Element const &element, bool const is_axially_symmetric, Eigen::MatrixBase< EigenMatrixType > const &node_values, MeshLib::PropertyVector< double > &interpolated_values_global_vector)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
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::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
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.
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
std::size_t setIntegrationPointKelvinVectorData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
void setIPDataInitialConditions(std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const &_integration_point_writer, MeshLib::Properties const &mesh_properties, LocalAssemblersVector &local_assemblers)
std::size_t setIntegrationPointScalarData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
static Eigen::Matrix< double, KelvinVectorSize, 1 > const identity2
Kelvin mapping of 2nd order identity tensor.
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.
double strain_rate_variable
BMatricesType::KelvinVectorType eps
BMatricesType::KelvinVectorType sigma_eff