36namespace SmallDeformation
40template <
typename BMatricesType,
typename ShapeMatricesType,
45 typename ShapeMatricesType::NodalRowVectorType
N_u;
46 typename ShapeMatricesType::GlobalDimNodalMatrixType
dNdx_u;
53template <
typename ShapeMatrixType>
56 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
59template <
typename ShapeFunction,
int DisplacementDim>
95 bool const is_axially_symmetric,
98 e, integration_method, is_axially_symmetric, process_data)
100 unsigned const n_integration_points =
103 ip_data_.resize(n_integration_points);
106 auto const shape_matrices =
111 for (
unsigned ip = 0; ip < n_integration_points; ip++)
114 auto const& sm = shape_matrices[ip];
117 sm.integralMeasure * sm.detJ;
120 ip_data.dNdx_u = sm.dNdx;
128 unsigned const n_integration_points =
130 for (
unsigned ip = 0; ip < n_integration_points; ip++)
148 double>::quiet_NaN() ,
155 t, x_position, *material_state.material_state_variables);
157 material_state.pushBackState();
160 for (
unsigned ip = 0; ip < n_integration_points; ip++)
170 unsigned const n_integration_points =
174 for (
unsigned ip = 0; ip < n_integration_points; ip++)
177 auto const& dNdx =
ip_data_[ip].dNdx_u;
194 this->
output_data_[ip].eps_data.eps.noalias() = B * local_x;
200 BMatrixType const& B, Eigen::Ref<Eigen::VectorXd const>
const& u,
201 Eigen::Ref<Eigen::VectorXd const>
const& u_prev,
217 ? (*this->
process_data_.reference_temperature)(t, x_position)[0]
218 : std::numeric_limits<double>::quiet_NaN();
226 CS.
eval(models, t, dt, x_position,
228 T_ref, B * u, B * u_prev,
229 current_state, prev_state, material_state, tmp, output_data,
236 std::vector<double>
const& ,
237 std::vector<double>
const& ,
238 std::vector<double>& ,
239 std::vector<double>& ,
240 std::vector<double>& )
override
243 "SmallDeformationLocalAssembler: assembly without jacobian is not "
255 DisplacementDim, ShapeFunction::NPOINTS, ShapeFunction,
262 std::vector<double>
const& local_x,
263 std::vector<double>
const& local_x_prev,
264 std::vector<double>& local_b_data,
265 std::vector<double>& local_Jac_data)
override
267 auto const local_matrix_size = local_x.size();
270 local_Jac_data, local_matrix_size, local_matrix_size);
273 local_b_data, local_matrix_size);
276 auto [u_prev] =
localDOF(local_x_prev);
278 unsigned const n_integration_points =
288 for (
unsigned ip = 0; ip < n_integration_points; ip++)
290 auto const& w =
ip_data_[ip].integration_weight;
292 auto const& dNdx =
ip_data_[ip].dNdx_u;
316 auto const& b = *CD.volumetric_body_force;
317 auto const& C = CD.s_mech_data.stiffness_tensor;
320 (B.transpose() * sigma -
N_u_op(N).transpose() * b) * w;
321 local_Jac.noalias() += B.transpose() * C * B * w;
326 Eigen::VectorXd
const& local_x_prev,
327 double const t,
double const dt,
330 unsigned const n_integration_points =
341 for (
unsigned ip = 0; ip < n_integration_points; ip++)
344 auto const& dNdx =
ip_data_[ip].dNdx_u;
352 std::nullopt, this->element_.getID(),
356 this->element_, N))};
364 B, local_x, local_x_prev, x_position, t, dt,
372 for (
unsigned ip = 0; ip < n_integration_points; ip++)
379 std::vector<double>
const& local_x,
380 std::vector<double>& nodal_values)
override
393 const unsigned integration_point)
const override
398 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
402 static constexpr auto localDOF(std::vector<double>
const& x)
409 std::vector<IpData, Eigen::aligned_allocator<IpData>>
ip_data_;
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
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)
double interpolateXCoordinate(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
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