OGS
CreateLocalAssemblers.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <vector>
13
14#include "BaseLib/Logging.h"
15
19
20namespace ProcessLib
21{
22namespace HeatTransportBHE
23{
24namespace detail
25{
26template <template <typename /* shp fct */>
27 class LocalAssemblerSoilImplementation,
28 template <typename /* shp fct */, typename /* bhe type */>
29 class LocalAssemblerBHEImplementation,
30 typename LocalAssemblerInterface, typename... ExtraCtorArgs>
32 NumLib::LocalToGlobalIndexMap const& dof_table,
33 std::vector<MeshLib::Element*> const& mesh_elements,
34 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
35 NumLib::IntegrationOrder const integration_order,
36 std::unordered_map<std::size_t, BHE::BHETypes*> const& element_to_bhe_map,
37 ExtraCtorArgs&&... extra_ctor_args)
38{
39 // Shape matrices initializer
42 LocalAssemblerSoilImplementation,
43 LocalAssemblerBHEImplementation, ExtraCtorArgs...>;
44
45 DBUG("Create local assemblers for the HeatTransportBHE process.");
46 // Populate the vector of local assemblers.
47 local_assemblers.resize(mesh_elements.size());
48
49 LocalDataInitializer initializer(dof_table, integration_order);
50
51 DBUG("Calling local assembler builder for all mesh elements.");
53 initializer, mesh_elements, local_assemblers, element_to_bhe_map,
54 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
55}
56} // namespace detail
57
69template <template <typename /* shp fct */>
70 class LocalAssemblerSoilImplementation,
71 template <typename /* shp fct */, typename /* bhe type */>
72 class LocalAssemblerBHEImplementation,
73 typename LocalAssemblerInterface, typename... ExtraCtorArgs>
75 std::vector<MeshLib::Element*> const& mesh_elements,
76 NumLib::LocalToGlobalIndexMap const& dof_table,
77 std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers,
78 NumLib::IntegrationOrder const integration_order,
79 ExtraCtorArgs&&... extra_ctor_args)
80{
81 DBUG("Create local assemblers for the HeatTransportBHE process.");
82
83 detail::createLocalAssemblers<LocalAssemblerSoilImplementation,
84 LocalAssemblerBHEImplementation>(
85 dof_table, mesh_elements, local_assemblers, integration_order,
86 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
87}
88} // namespace HeatTransportBHE
89} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void createLocalAssemblers(NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< MeshLib::Element * > const &mesh_elements, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, std::unordered_map< std::size_t, BHE::BHETypes * > const &element_to_bhe_map, ExtraCtorArgs &&... extra_ctor_args)
void createLocalAssemblers(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
static void transformDereferenced(F const &f, C const &c, Data &data, Args_ &&... args)