31namespace MPL = MaterialPropertyLib;
33template <
typename BMatricesType,
typename ShapeMatricesType,
38 typename ShapeMatricesType::NodalRowVectorType
N_u;
39 typename ShapeMatricesType::GlobalDimNodalMatrixType
dNdx_u;
46template <
typename ShapeMatrixType>
49 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
52template <
typename ShapeFunction,
int DisplacementDim>
88 bool const is_axially_symmetric,
91 e, integration_method, is_axially_symmetric, process_data)
93 unsigned const n_integration_points =
96 ip_data_.resize(n_integration_points);
99 auto const shape_matrices =
104 for (
unsigned ip = 0; ip < n_integration_points; ip++)
107 auto const& sm = shape_matrices[ip];
110 sm.integralMeasure * sm.detJ;
113 ip_data.dNdx_u = sm.dNdx;
121 unsigned const n_integration_points =
123 for (
unsigned ip = 0; ip < n_integration_points; ip++)
128 std::nullopt, this->
element_.getID(),
142 double>::quiet_NaN() ,
149 t, x_position, *material_state.material_state_variables);
155 material_state.pushBackState();
158 for (
unsigned ip = 0; ip < n_integration_points; ip++)
168 unsigned const n_integration_points =
172 for (
unsigned ip = 0; ip < n_integration_points; ip++)
175 auto const& dNdx =
ip_data_[ip].dNdx_u;
177 std::nullopt, this->
element_.getID(),
190 std::get<StrainData<DisplacementDim>>(this->
output_data_[ip])
191 .eps.noalias() = B * local_x;
197 BMatrixType const& B, Eigen::Ref<Eigen::VectorXd const>
const& u,
198 Eigen::Ref<Eigen::VectorXd const>
const& u_prev,
214 ? (*this->
process_data_.reference_temperature)(t, x_position)[0]
215 : std::numeric_limits<double>::quiet_NaN();
224 CS.
eval(models, t, dt, x_position,
226 T_ref, B * u, B * u_prev,
227 current_state, prev_state, material_state, tmp, output_data,
234 std::vector<double>
const& ,
235 std::vector<double>
const& ,
236 std::vector<double>& ,
237 std::vector<double>& ,
238 std::vector<double>& )
override
241 "SmallDeformationLocalAssembler: assembly without jacobian is not "
260 std::vector<double>
const& local_x,
261 std::vector<double>
const& local_x_prev,
262 std::vector<double>& local_b_data,
263 std::vector<double>& local_Jac_data)
override
265 auto const local_matrix_size = local_x.size();
268 local_Jac_data, local_matrix_size, local_matrix_size);
271 local_b_data, local_matrix_size);
274 auto [u_prev] =
localDOF(local_x_prev);
276 unsigned const n_integration_points =
286 for (
unsigned ip = 0; ip < n_integration_points; ip++)
288 auto const& w =
ip_data_[ip].integration_weight;
290 auto const& dNdx =
ip_data_[ip].dNdx_u;
293 std::nullopt, this->
element_.getID(),
314 auto const& b = *std::get<VolumetricBodyForce<DisplacementDim>>(CD);
317 DisplacementDim>>(CD)
321 (B.transpose() * sigma -
N_u_op(N).transpose() * b) * w;
322 local_Jac.noalias() += B.transpose() * C * B * w;
327 Eigen::VectorXd
const& local_x_prev,
328 double const t,
double const dt,
331 unsigned const n_integration_points =
342 for (
unsigned ip = 0; ip < n_integration_points; ip++)
345 auto const& dNdx =
ip_data_[ip].dNdx_u;
348 std::nullopt, this->
element_.getID(),
362 B, local_x, local_x_prev, x_position, t, dt,
370 for (
unsigned ip = 0; ip < n_integration_points; ip++)
377 std::vector<double>
const& local_x,
378 std::vector<double>& nodal_values)
override
391 const unsigned integration_point)
const override
396 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
400 static constexpr auto localDOF(std::vector<double>
const& x)
407 std::vector<IpData, Eigen::aligned_allocator<IpData>>
ip_data_;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
std::optional< MathLib::Point3d > const getCoordinates() const
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
MatrixType< 3, ShapeFunction::NPOINTS > BBarMatrixType
MatrixType< _number_of_dof, _number_of_dof > StiffnessMatrixType
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
VectorTypeFixedSize< MathLib::VectorizedTensor::size(DisplacementDim)> GradientVectorType
MatrixType< MathLib::VectorizedTensor::size(DisplacementDim), _number_of_dof > GradientMatrixType
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)
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)
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)
auto localDOF(ElementDOFVector const &x)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
BBarMatrixType computeDilatationalBbar(std::vector< IpData, Eigen::aligned_allocator< IpData > > const &ip_data, MeshLib::Element const &element, NumLib::GenericIntegrationMethod const &integration_method, const bool is_axially_symmetric)
BMatrixType computeBMatrixPossiblyWithBbar(DNDX_Type const &dNdx, N_Type const &N, std::optional< BBarMatrixType > const &B_dil_bar, const double radius, const bool is_axially_symmetric)
Fills a B matrix, or a B bar matrix if required.
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType