55 {
58
59 auto& x = *xs[process_id];
60
62 auto const local_x = x.get(indices);
63 auto const u =
65 local_x, ShapeFunction::NPOINTS);
66
67 unsigned const n_integration_points =
69
72 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
75 .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
76
77 for (unsigned ip = 0; ip < n_integration_points; ++ip)
78 {
80 auto const&
N = ip_data.N;
81 auto const& w = ip_data.weight;
82
89
90 double integral_measure = 1.0;
92 {
94 }
95
96 double const a =
alpha.dot(N) * w * integral_measure;
97
98
99
101
102 if (Jac != nullptr)
103 {
104 _local_rhs.noalias() -=
N.transpose() * (u - u_0).dot(N) * a;
105 }
106 else
107 {
108 _local_rhs.noalias() +=
N.transpose() * (u_0.dot(N) * a);
109 }
110 }
111
113 if (Jac != nullptr)
114 {
116 indices),
118 }
119 else if (K != nullptr)
120 {
122 indices),
124 }
125 else
126 {
128 "In Robin boundary condition assembler, both, the Jacobian and "
129 "the K-matrices are null, but one matrix must be provided.");
130 }
131 }
int add(IndexType row, IndexType col, double val)
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::NodalVectorType NodalVectorType
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
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