21 LocalAssemblerImplementation>::
23 unsigned const integration_order, unsigned const shapefunction_order,
24 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
25 int const variable_id, int const component_id,
26 unsigned const global_dim, MeshLib::Mesh const& bc_mesh, Data&& data)
27 : _data(std::forward<Data>(data)), _bc_mesh(bc_mesh)
29 static_assert(std::is_same_v<typename std::decay_t<BoundaryConditionData>,
30 typename std::decay_t<Data>>,
31 "Type mismatch between declared and passed BC data.");
35 static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
37 dof_table_bulk.getNumberOfVariableComponents(variable_id))
40 "Variable id or component id too high. Actual values: ({:d}, "
42 "maximum values: ({:d}, {:d}).",
43 variable_id, component_id, dof_table_bulk.getNumberOfVariables(),
44 dof_table_bulk.getNumberOfVariableComponents(variable_id));
47 if (!_bc_mesh.getProperties().template existsPropertyVector<std::size_t>(
51 "The required bulk node ids map does not exist in the boundary "
56 std::vector<MeshLib::Node*>
const& bc_nodes = _bc_mesh.getNodes();
58 "Found {:d} nodes for Natural BCs for the variable {:d} and component "
60 bc_nodes.size(), variable_id, component_id);
66 _dof_table_boundary = dof_table_bulk.deriveBoundaryConstrainedMap(
67 variable_id, {component_id}, std::move(bc_mesh_subset));
69 BoundaryConditionAndSourceTerm::createLocalAssemblers<
70 LocalAssemblerImplementation>(
71 global_dim, _bc_mesh.getElements(), *_dof_table_boundary,
72 shapefunction_order, _local_assemblers,
74 _bc_mesh.isAxiallySymmetric(), _data);
81 LocalAssemblerImplementation>::
82 applyNaturalBC(const double t,
83 std::vector<GlobalVector*> const& x,
90 &GenericNaturalBoundaryConditionLocalAssemblerInterface::assemble,
91 _local_assemblers, *_dof_table_boundary, t, x, process_id, K, b, Jac);