9#include <kernel/assembly/unit_filter_assembler.hpp>
28 template<
typename DomainLevel_>
29 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> create_unit_filter_asm(
const DomainLevel_& dom_level,
const std::deque<String>& mesh_part_names)
32 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> unit_asm;
34 for(
const auto& mp_name : mesh_part_names)
36 auto* mesh_part_node = dom_level.get_mesh_node()->find_mesh_part_node(mp_name);
37 XASSERT(mesh_part_node !=
nullptr);
41 auto* mesh_part = mesh_part_node->get_mesh();
42 if (mesh_part !=
nullptr)
45 unit_asm.add_mesh_part(*mesh_part);
60 template<
typename DomainLevel_>
61 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> create_unit_filter_asm(
const DomainLevel_& dom_level,
const String& mesh_part_names)
63 std::deque<String> mp_names;
64 if(mesh_part_names ==
"*")
65 mp_names = dom_level.get_mesh_node()->get_mesh_part_names(
true);
67 mp_names = mesh_part_names.split_by_whitespaces();
69 return create_unit_filter_asm(dom_level, mp_names);
88 template<
typename DataType_,
typename IndexType_,
typename DomainLevel_,
typename Space_>
89 void asm_unit_filter_scalar_homogeneous(LAFEM::UnitFilter<DataType_, IndexType_>& filter,
90 const DomainLevel_& dom_level,
const Space_& space,
const String& mesh_part_names)
92 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> unit_asm = create_unit_filter_asm(dom_level, mesh_part_names);
93 unit_asm.assemble(filter, space);
115 template<
typename DataType_,
typename IndexType_,
typename DomainLevel_,
typename Space_,
typename Function_>
116 void asm_unit_filter_scalar(LAFEM::UnitFilter<DataType_, IndexType_>& filter,
117 const DomainLevel_& dom_level,
const Space_& space,
const String& mesh_part_names,
const Function_& function)
119 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> unit_asm = create_unit_filter_asm(dom_level, mesh_part_names);
120 unit_asm.assemble(filter, space, function);
139 template<
typename DataType_,
typename IndexType_,
int block_size_,
typename DomainLevel_,
typename Space_>
140 void asm_unit_filter_blocked_homogeneous(LAFEM::UnitFilterBlocked<DataType_, IndexType_, block_size_>& filter,
141 const DomainLevel_& dom_level,
const Space_& space,
const String& mesh_part_names)
143 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> unit_asm = create_unit_filter_asm(dom_level, mesh_part_names);
144 unit_asm.assemble(filter, space);
166 template<
typename DataType_,
typename IndexType_,
int block_size_,
typename DomainLevel_,
typename Space_,
typename Function_>
167 void asm_unit_filter_blocked(LAFEM::UnitFilterBlocked<DataType_, IndexType_, block_size_>& filter,
168 const DomainLevel_& dom_level,
const Space_& space,
const String& mesh_part_names,
const Function_& function)
170 Assembly::UnitFilterAssembler<typename DomainLevel_::MeshType> unit_asm = create_unit_filter_asm(dom_level, mesh_part_names);
171 unit_asm.assemble(filter, space, function);
#define XASSERT(expr)
Assertion macro definition.