21namespace NormalTractionBoundaryCondition
23template <
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;
50template <
typename ShapeFunctionDisplacement,
int GlobalDim>
62 std::size_t
const local_matrix_size,
64 bool const is_axially_symmetric,
72 unsigned const n_integration_points =
75 _ip_data.reserve(n_integration_points);
77 auto const shape_matrices_u =
89 element_normal[GlobalDim - 1] = 0;
90 element_normal[0] = -v1[1];
91 element_normal[1] = v1[0];
92 element_normal.normalize();
97 for (
int i = 0; i < GlobalDim; ++i)
99 element_normal[i] = n[i];
103 for (
unsigned ip = 0; ip < n_integration_points; ip++)
105 double const integration_weight =
107 shape_matrices_u[ip].integralMeasure *
108 shape_matrices_u[ip].detJ;
110 _ip_data.emplace_back(shape_matrices_u[ip].N, element_normal,
117 double const t, std::vector<GlobalVector*>
const& ,
123 unsigned const n_integration_points =
129 for (
unsigned ip = 0; ip < n_integration_points; ip++)
131 auto const& w =
_ip_data[ip].integration_weight;
135 typename ShapeMatricesType::template MatrixType<GlobalDim,
137 N_u = ShapeMatricesType::template MatrixType<
140 for (
int i = 0; i < GlobalDim; ++i)
147 _local_rhs.noalias() -= n.transpose() * N_u * pressure.dot(N) * w;
159 ShapeFunctionDisplacement::NPOINTS * GlobalDim;
162 Eigen::aligned_allocator<IntegrationPointData<ShapeMatricesType>>>
165 typename ShapeMatricesType::template VectorType<displacement_size>
Global vector based on Eigen vector.
void add(IndexType rowId, double v)
add entry
Eigen::Vector3d const & asEigenVector3d() 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.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
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
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
NumLib::GenericIntegrationMethod const & _integration_method
static const int displacement_size
ShapeMatricesType::template VectorType< displacement_size > _local_rhs
ShapeMatrixPolicyType< ShapeFunctionDisplacement, GlobalDim > ShapeMatricesType
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
NormalTractionBoundaryConditionLocalAssembler(MeshLib::Element const &e, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, ParameterLib::Parameter< double > const &pressure)
ParameterLib::Parameter< double > const & _pressure
std::vector< IntegrationPointData< ShapeMatricesType >, Eigen::aligned_allocator< IntegrationPointData< ShapeMatricesType > > > _ip_data
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
MeshLib::Element const & _element
typename ShapeMatricesType::NodalVectorType NodalVectorType
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