16#include <unordered_map>
25template <
typename LocalAssemblerInterface,
typename... ConstructorArgs>
31 std::size_t
const local_matrix_size,
32 ConstructorArgs&&...)>;
49 ConstructorArgs&&... args)
const
51 auto const type_idx = std::type_index(
typeid(mesh_item));
57 return it->second(mesh_item, num_local_dof,
58 std::forward<ConstructorArgs>(args)...);
61 "You are trying to build a local assembler for an unknown mesh "
62 "element type ({:s})."
63 " Maybe you have disabled this mesh element type in your build "
64 "configuration, or a mesh element order does not match shape "
65 "function order given in the project file.",
74 std::unordered_map<std::type_index, LocAsmBuilder>
_builders;
78 template <
typename ,
typename ,
80 class LocalAssemblerImplementation,
81 int GlobalDim, typename... ConstructorArgs>
90 typename ShapeFunction::MeshElement>::IntegrationMethod;
104 std::size_t
const local_matrix_size,
105 ConstructorArgs&&... args)
107 return std::make_unique<LocAsmImpl>(
108 e, local_matrix_size, std::forward<ConstructorArgs>(args)...);
std::size_t getNumberOfElementDOF(std::size_t const mesh_item_id) const
LocalAssemblerImplementation< ShapeFunction, IntegrationMethod, GlobalDim > LocAsmImpl
typename GLAF::LocAsmBuilder LocAsmBuilder
typename GLAF::LocAsmIntfPtr LocAsmIntfPtr
static LocAsmBuilder create()
LocalAssemblerBuilderFactory()=delete
typename NumLib::GaussLegendreIntegrationPolicy< typename ShapeFunction::MeshElement >::IntegrationMethod IntegrationMethod
LocAsmIntfPtr operator()(std::size_t const id, MeshLib::Element const &mesh_item, ConstructorArgs &&... args) const
NumLib::LocalToGlobalIndexMap const & _dof_table
GenericLocalAssemblerFactory(NumLib::LocalToGlobalIndexMap const &dof_table)
std::unordered_map< std::type_index, LocAsmBuilder > _builders
Mapping of element types to local assembler builders.
std::unique_ptr< LocalAssemblerInterface > LocAsmIntfPtr
std::function< LocAsmIntfPtr(MeshLib::Element const &e, std::size_t const local_matrix_size, ConstructorArgs &&...)> LocAsmBuilder