21 namespace NormalTractionBoundaryCondition
23 template <
typename ShapeMatricesType>
27 typename ShapeMatricesType::ShapeMatrices::ShapeType
const N_,
28 typename ShapeMatricesType::GlobalDimVectorType
const n_,
29 double const integration_weight_)
34 typename ShapeMatricesType::ShapeMatrices::ShapeType
const N;
35 typename ShapeMatricesType::GlobalDimVectorType
const n;
50 template <
typename ShapeFunctionDisplacement,
typename IntegrationMethod,
63 std::size_t
const local_matrix_size,
64 bool const is_axially_symmetric,
65 unsigned const integration_order,
73 unsigned const n_integration_points =
76 _ip_data.reserve(n_integration_points);
78 auto const shape_matrices_u =
88 Eigen::Vector3d
const v1 =
91 element_normal[0] = -v1[1];
92 element_normal[1] = v1[0];
93 element_normal.normalize();
98 for (
int i = 0; i < GlobalDim; ++i)
100 element_normal[i] = n[i];
104 for (
unsigned ip = 0; ip < n_integration_points; ip++)
106 double const integration_weight =
108 shape_matrices_u[ip].integralMeasure *
109 shape_matrices_u[ip].detJ;
111 _ip_data.emplace_back(shape_matrices_u[ip].N, element_normal,
118 double const t, std::vector<GlobalVector*>
const& ,
124 unsigned const n_integration_points =
130 for (
unsigned ip = 0; ip < n_integration_points; ip++)
132 auto const& w =
_ip_data[ip].integration_weight;
136 typename ShapeMatricesType::template MatrixType<GlobalDim,
138 N_u = ShapeMatricesType::template MatrixType<
141 for (
int i = 0; i < GlobalDim; ++i)
148 _local_rhs.noalias() -= n.transpose() * N_u * pressure.dot(N) * w;
160 ShapeFunctionDisplacement::NPOINTS * GlobalDim;
163 Eigen::aligned_allocator<IntegrationPointData<ShapeMatricesType>>>
166 typename ShapeMatricesType::template VectorType<displacement_size>
Global vector based on Eigen vector.
void add(IndexType rowId, double v)
add entry
const T * getCoords() const
virtual MeshElemType getGeomType() const =0
virtual const Node * getNode(unsigned idx) const =0
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
virtual ~NormalTractionBoundaryConditionLocalAssemblerInterface()=default
virtual void assemble(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &, GlobalMatrix &, GlobalVector &b, GlobalMatrix *)=0
std::vector< IntegrationPointData< ShapeMatricesType >, Eigen::aligned_allocator< IntegrationPointData< ShapeMatricesType > > > _ip_data
ShapeMatricesType::template VectorType< displacement_size > _local_rhs
NormalTractionBoundaryConditionLocalAssembler(MeshLib::Element const &e, std::size_t const local_matrix_size, bool const is_axially_symmetric, unsigned const integration_order, ParameterLib::Parameter< double > const &pressure)
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
void assemble(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &, GlobalMatrix &, GlobalVector &local_rhs, GlobalMatrix *) override
ShapeMatrixPolicyType< ShapeFunctionDisplacement, GlobalDim > ShapeMatricesType
ParameterLib::Parameter< double > const & _pressure
typename ShapeMatricesType::NodalVectorType NodalVectorType
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
IntegrationMethod const _integration_method
MeshLib::Element const & _element
static const int displacement_size
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)
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > getNodalValuesOnElement(MeshLib::Element const &element, double const t) const
Returns a matrix of values for all nodes of the given element.
IntegrationPointData(typename ShapeMatricesType::ShapeMatrices::ShapeType const N_, typename ShapeMatricesType::GlobalDimVectorType const n_, double const integration_weight_)
double const integration_weight
ShapeMatricesType::GlobalDimVectorType const n
ShapeMatricesType::ShapeMatrices::ShapeType const N