16 template <
typename BoundaryConditionData,
17 template <
typename,
typename,
int>
class LocalAssemblerImplementation>
18 template <
typename Data>
19 GenericNaturalBoundaryCondition<BoundaryConditionData,
20 LocalAssemblerImplementation>::
21 GenericNaturalBoundaryCondition(
22 unsigned const integration_order,
unsigned const shapefunction_order,
24 int const variable_id,
int const component_id,
25 unsigned const global_dim,
MeshLib::Mesh const& bc_mesh, Data&& data)
26 : _data(std::forward<Data>(data)), _bc_mesh(bc_mesh)
28 static_assert(std::is_same_v<
typename std::decay_t<BoundaryConditionData>,
29 typename std::decay_t<Data>>,
30 "Type mismatch between declared and passed BC data.");
39 "Variable id or component id too high. Actual values: ({:d}, "
41 "maximum values: ({:d}, {:d}).",
50 "The required bulk node ids map does not exist in the boundary "
57 "Found {:d} nodes for Natural BCs for the variable {:d} and component "
59 bc_nodes.size(), variable_id, component_id);
66 variable_id, {component_id}, std::move(bc_mesh_subset)));
69 LocalAssemblerImplementation>(
72 integration_order,
_data);
75 template <
typename BoundaryConditionData,
76 template <
typename,
typename,
int>
class LocalAssemblerImplementation>
78 LocalAssemblerImplementation>::
79 applyNaturalBC(
const double t,
80 std::vector<GlobalVector*>
const& x,
88 _local_assemblers, *_dof_table_boundary, t, x, process_id, K, b, Jac);
void DBUG(char const *fmt, Args const &... args)
Global vector based on Eigen vector.
A subset of nodes on a single mesh.
bool isAxiallySymmetric() const
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
const std::string getName() const
Get name of the mesh.
Properties & getProperties()
int getNumberOfVariables() const
int getNumberOfVariableComponents(int variable_id) const
LocalToGlobalIndexMap * deriveBoundaryConstrainedMap(int const variable_id, std::vector< int > const &component_ids, MeshLib::MeshSubset &&new_mesh_subset) const
virtual void assemble(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, double const t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix &K, GlobalVector &b, GlobalMatrix *Jac)=0
MeshLib::Mesh const & _bc_mesh
A lower-dimensional mesh on which the boundary condition is defined.
BoundaryConditionData _data
Data used in the assembly of the specific boundary condition.
std::vector< std::unique_ptr< GenericNaturalBoundaryConditionLocalAssemblerInterface > > _local_assemblers
Local assemblers for each element of number of _elements.
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _dof_table_boundary
void createLocalAssemblers(const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, const unsigned shapefunction_order, std::vector< std::unique_ptr< LocalAssemblerInterface >> &local_assemblers, ExtraCtorArgs &&... extra_ctor_args)
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)