9template <
typename BoundaryConditionData,
10 template <
typename ,
int >
11 class LocalAssemblerImplementation>
12template <typename Data>
14 LocalAssemblerImplementation>::
16 unsigned const integration_order, unsigned const shapefunction_order,
17 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
18 int const variable_id, int const component_id,
19 unsigned const global_dim, MeshLib::Mesh const& bc_mesh, Data&& data)
22 static_assert(std::is_same_v<typename std::decay_t<BoundaryConditionData>,
23 typename std::decay_t<Data>>,
24 "Type mismatch between declared and passed BC data.");
28 static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
30 dof_table_bulk.getNumberOfVariableComponents(variable_id))
33 "Variable id or component id too high. Actual values: ({:d}, "
35 "maximum values: ({:d}, {:d}).",
36 variable_id, component_id, dof_table_bulk.getNumberOfVariables(),
37 dof_table_bulk.getNumberOfVariableComponents(variable_id));
40 if (!
_bc_mesh.getProperties().template existsPropertyVector<std::size_t>(
44 "The required bulk node ids map does not exist in the boundary "
49 std::vector<MeshLib::Node*>
const& bc_nodes =
_bc_mesh.getNodes();
51 "Found {:d} nodes for Natural BCs for the variable {:d} and component "
53 bc_nodes.size(), variable_id, component_id);
60 variable_id, {component_id}, std::move(bc_mesh_subset));
63 LocalAssemblerImplementation>(
70template <
typename BoundaryConditionData,
71 template <
typename ,
int >
72 class LocalAssemblerImplementation>
74 LocalAssemblerImplementation>::
76 std::vector<GlobalVector*> const& x,
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
A subset of nodes on a single mesh.
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.
GenericNaturalBoundaryCondition(unsigned const integration_order, unsigned const shapefunction_order, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, unsigned const global_dim, MeshLib::Mesh const &bc_mesh, Data &&data)
void applyNaturalBC(const double t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix *K, GlobalVector &b, GlobalMatrix *Jac) override
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
constexpr std::string_view getBulkIDString(MeshItemType mesh_item_type)
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, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)