27template <
typename ShapeFunction,
int GlobalDim>
39 std::size_t
const local_matrix_size,
41 bool is_axially_symmetric,
43 :
Base(e, is_axially_symmetric, integration_method),
45 _local_K(local_matrix_size, local_matrix_size),
52 double const t, std::vector<GlobalVector*>
const& xs,
59 auto& x = *xs[process_id];
62 auto const local_x = x.get(indices);
65 local_x, ShapeFunction::NPOINTS);
67 unsigned const n_integration_points =
72 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
75 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
77 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
80 auto const& N = ip_data.N;
81 auto const& w = ip_data.weight;
90 double integral_measure = 1.0;
96 double const a = alpha.dot(N) * w * integral_measure;
100 _local_K.noalias() += N.transpose() * N * a;
104 _local_rhs.noalias() -= N.transpose() * (u - u_0).dot(N) * a;
108 _local_rhs.noalias() += N.transpose() * (u_0.dot(N) * a);
119 else if (K !=
nullptr)
128 "In Robin boundary condition assembler, both, the Jacobian and "
129 "the K-matrices are null, but one matrix must be provided.");
int add(IndexType row, IndexType col, double val)
Global vector based on Eigen vector.
void add(IndexType rowId, double v)
add entry
std::size_t getID() const
Returns the ID of the element.
unsigned getNumberOfPoints() const
MeshLib::Element const & _element
NumLib::GenericIntegrationMethod const & _integration_method
std::vector< NAndWeight, Eigen::aligned_allocator< NAndWeight > > const _ns_and_weights
typename ShapeMatricesType::NodalMatrixType NodalMatrixType
typename ShapeMatricesType::NodalVectorType NodalVectorType
Base::NodalMatrixType _local_K
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
RobinBoundaryConditionLocalAssembler(MeshLib::Element const &e, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool is_axially_symmetric, RobinBoundaryConditionData const &data)
void assemble(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &xs, int const process_id, GlobalMatrix *K, GlobalVector &b, GlobalMatrix *Jac) override
Base::NodalVectorType _local_rhs
RobinBoundaryConditionData const & _data
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
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.
ParameterLib::Parameter< double > const *const integral_measure
ParameterLib::Parameter< double > const & alpha
ParameterLib::Parameter< double > const & u_0