Skip to content
Snippets Groups Projects
Commit af90e0dc authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Move a createLocalAsms() impl. from detail ns

This allows the function to be called from outside,
given the GlobalDim template parameter is known.
parent 8be64e5d
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,6 @@
namespace ProcessLib
{
namespace detail
{
template <unsigned GlobalDim, template <typename, typename, unsigned>
class LocalAssemblerImplementation,
typename LocalAssemblerInterface, typename... ExtraCtorArgs>
......@@ -33,6 +31,9 @@ void createLocalAssemblers(
std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
ExtraCtorArgs&&... extra_ctor_args)
{
static_assert(
GlobalDim == 1 || GlobalDim == 2 || GlobalDim == 3,
"Meshes with dimension greater than three are not supported.");
// Shape matrices initializer
using LocalDataInitializer =
LocalDataInitializer<LocalAssemblerInterface,
......@@ -51,8 +52,6 @@ void createLocalAssemblers(
std::forward<ExtraCtorArgs>(extra_ctor_args)...);
}
} // namespace detail
/*! Creates local assemblers for each element of the given \c mesh.
*
* \tparam LocalAssemblerImplementation the individual local assembler type
......@@ -80,17 +79,17 @@ void createLocalAssemblers(
switch (dimension)
{
case 1:
detail::createLocalAssemblers<1, LocalAssemblerImplementation>(
createLocalAssemblers<1, LocalAssemblerImplementation>(
dof_table, shapefunction_order, mesh_elements, local_assemblers,
std::forward<ExtraCtorArgs>(extra_ctor_args)...);
break;
case 2:
detail::createLocalAssemblers<2, LocalAssemblerImplementation>(
createLocalAssemblers<2, LocalAssemblerImplementation>(
dof_table, shapefunction_order, mesh_elements, local_assemblers,
std::forward<ExtraCtorArgs>(extra_ctor_args)...);
break;
case 3:
detail::createLocalAssemblers<3, LocalAssemblerImplementation>(
createLocalAssemblers<3, LocalAssemblerImplementation>(
dof_table, shapefunction_order, mesh_elements, local_assemblers,
std::forward<ExtraCtorArgs>(extra_ctor_args)...);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment