OGS
CreateLocalAssemblersTaylorHood.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
15#include "BaseLib/Logging.h"
19
20namespace ProcessLib
21{
22namespace detail
23{
34template <template <typename /* LocalAssemblerInterface */,
35 template <typename /* shp fct */,
36 typename /* lower order shp fct */,
37 int /* global dim */>
38 class /* LocalAssemblerImplementation */,
39 class /* IntegrationMethodProvider */, int /* global dim */,
40 typename... /* ConstructorArgs */>
42 int GlobalDim,
43 template <typename /* shp fct */, typename /* lower order shp fct */,
44 int /* global dim */>
45 class LocalAssemblerImplementation,
46 typename LocalAssemblerInterface,
47 IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder,
48 typename... ExtraCtorArgs>
50 std::vector<MeshLib::Element*> const& mesh_elements,
51 NumLib::LocalToGlobalIndexMap const& dof_table,
52 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
53 ProviderOrOrder const& provider_or_order,
54 ExtraCtorArgs&&... extra_ctor_args)
55{
56 DBUG("Create local assemblers.");
57
58 auto const& integration_method_provider =
59 getIntegrationMethodProvider(provider_or_order);
60
61 using IntegrationMethodProvider =
62 std::remove_cvref_t<decltype(integration_method_provider)>;
63 using LocAsmFac = LocalAssemblerFactory<
64 LocalAssemblerInterface, LocalAssemblerImplementation,
65 IntegrationMethodProvider, GlobalDim, ExtraCtorArgs...>;
66
67 LocAsmFac factory(dof_table, integration_method_provider);
68 local_assemblers.resize(mesh_elements.size());
69
70 DBUG("Calling local assembler builder for all mesh elements.");
72 factory, mesh_elements, local_assemblers,
73 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
74}
75
76} // namespace detail
77
78template <int GlobalDim,
79 template <typename /* shp fct */, typename /* lower order shp fct */,
80 int /* global dim */>
81 class LocalAssemblerImplementation,
82 typename LocalAssemblerInterface,
83 IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder,
84 typename... ExtraCtorArgs>
86 std::vector<MeshLib::Element*> const& mesh_elements,
87 NumLib::LocalToGlobalIndexMap const& dof_table,
88 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
89 ProviderOrOrder const& provider_or_order,
90 ExtraCtorArgs&&... extra_ctor_args)
91{
92 detail::createLocalAssemblersTaylorHood<LocalAssemblerFactoryHM, GlobalDim,
93 LocalAssemblerImplementation,
95 mesh_elements, dof_table, local_assemblers, provider_or_order,
96 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
97}
98
99template <int GlobalDim,
100 template <typename /* shp fct */, typename /* lower order shp fct */,
101 int /* global dim */>
102 class LocalAssemblerImplementation,
103 typename LocalAssemblerInterface,
104 IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder,
105 typename... ExtraCtorArgs>
107 std::vector<MeshLib::Element*> const& mesh_elements,
108 NumLib::LocalToGlobalIndexMap const& dof_table,
109 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
110 ProviderOrOrder const& provider_or_order,
111 ExtraCtorArgs&&... extra_ctor_args)
112{
113 detail::createLocalAssemblersTaylorHood<
114 LocalAssemblerFactoryStokes, GlobalDim, LocalAssemblerImplementation,
116 mesh_elements, dof_table, local_assemblers, provider_or_order,
117 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
118}
119
120} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void createLocalAssemblersTaylorHood(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ProviderOrOrder const &provider_or_order, ExtraCtorArgs &&... extra_ctor_args)
void createLocalAssemblersStokes(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ProviderOrOrder const &provider_or_order, ExtraCtorArgs &&... extra_ctor_args)
LocalAssemblerFactoryForDimGreaterEqualN< 1, LocalAssemblerInterface, LocalAssemblerImplementation, IntegrationMethodProvider, GlobalDim, ConstructorArgs... > LocalAssemblerFactory
By default processes in OGS are defined in 1D, 2D and 3D.
void createLocalAssemblersHM(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ProviderOrOrder const &provider_or_order, ExtraCtorArgs &&... extra_ctor_args)
static void transformDereferenced(F const &f, C const &c, Data &data, Args_ &&... args)