OGS
ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs > Class Template Referencefinal

Detailed Description

template<typename LocalAssemblerInterface, template< typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
class ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >

Definition at line 26 of file LocalAssemblerFactory.h.

#include <LocalAssemblerFactory.h>

Inheritance diagram for ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >:
[legend]
Collaboration diagram for ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >:
[legend]

Classes

struct  HasSuitableDimension
 
struct  Is2ndOrderElementOfSuitableDimension
 

Public Member Functions

 LocalAssemblerFactory (NumLib::LocalToGlobalIndexMap const &dof_table, NumLib::DefaultIntegrationMethodProvider const &integration_method_provider, const unsigned shapefunction_order)
 
- Public Member Functions inherited from ProcessLib::GenericLocalAssemblerFactory< LocalAssemblerInterface, NumLib::DefaultIntegrationMethodProvider, ConstructorArgs... >
LocAsmIntfPtr operator() (std::size_t const id, MeshLib::Element const &mesh_item, ConstructorArgs &&... args) const
 

Private Types

using Base
 
template<typename ShapeFunction >
using LocAsmBuilderFactory
 

Additional Inherited Members

- Public Types inherited from ProcessLib::GenericLocalAssemblerFactory< LocalAssemblerInterface, NumLib::DefaultIntegrationMethodProvider, ConstructorArgs... >
using LocAsmIntfPtr
 
using LocAsmBuilder
 
- Protected Member Functions inherited from ProcessLib::GenericLocalAssemblerFactory< LocalAssemblerInterface, NumLib::DefaultIntegrationMethodProvider, ConstructorArgs... >
 GenericLocalAssemblerFactory (NumLib::LocalToGlobalIndexMap const &dof_table, IntegrationMethodProvider const &integration_method_provider)
 
- Protected Attributes inherited from ProcessLib::GenericLocalAssemblerFactory< LocalAssemblerInterface, NumLib::DefaultIntegrationMethodProvider, ConstructorArgs... >
std::unordered_map< std::type_index, LocAsmBuilder_builders
 Mapping of element types to local assembler builders.
 

Member Typedef Documentation

◆ Base

template<typename LocalAssemblerInterface , template< typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
using ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >::Base
private

◆ LocAsmBuilderFactory

template<typename LocalAssemblerInterface , template< typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
template<typename ShapeFunction >
using ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >::LocAsmBuilderFactory
private
Initial value:
ShapeFunction,
LocalAssemblerInterface,
LocalAssemblerImplementation,
GlobalDim,
ConstructorArgs...>

Definition at line 38 of file LocalAssemblerFactory.h.

Constructor & Destructor Documentation

◆ LocalAssemblerFactory()

template<typename LocalAssemblerInterface , template< typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactory< LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs >::LocalAssemblerFactory ( NumLib::LocalToGlobalIndexMap const & dof_table,
NumLib::DefaultIntegrationMethodProvider const & integration_method_provider,
const unsigned shapefunction_order )
inline

Definition at line 72 of file LocalAssemblerFactory.h.

76 : Base{dof_table, integration_method_provider}
77 {
78 if (shapefunction_order < 1 || 2 < shapefunction_order)
79 {
80 OGS_FATAL("The given shape function order {:d} is not supported",
81 shapefunction_order);
82 }
83
84 if (shapefunction_order == 1)
85 {
86 // 1st order is enabled on all elements with suitable dimension
87 using EnabledElementTraits =
89 std::declval<HasSuitableDimension>()));
90
92 [this]<typename ET>(ET*)
93 {
94 using MeshElement = typename ET::Element;
95 // this will use linear shape functions on higher order
96 // elements and the linear shape function on linear elements
97 using LowerOrderShapeFunction =
98 typename ET::LowerOrderShapeFunction;
99 Base::_builders[std::type_index(typeid(MeshElement))] =
101 template create<MeshElement>();
102 });
103 }
104 else if (shapefunction_order == 2)
105 {
106 // 2nd order only on 2nd order elements
107 using EnabledElementTraits =
109 std::declval<Is2ndOrderElementOfSuitableDimension>()));
110
112 [this]<typename ET>(ET*)
113 {
114 using MeshElement = typename ET::Element;
115 using ShapeFunction2ndOrder = typename ET::ShapeFunction;
116 Base::_builders[std::type_index(typeid(MeshElement))] =
118 template create<MeshElement>();
119 });
120 }
121 }
#define OGS_FATAL(...)
Definition Error.h:26
ProcessLib::GenericLocalAssemblerFactory< LocalAssemblerInterface, NumLib::DefaultIntegrationMethodProvider, ConstructorArgs... > Base
ProcessLib::LocalAssemblerBuilderFactory< ShapeFunction, LocalAssemblerInterface, LocalAssemblerImplementation, NumLib::DefaultIntegrationMethodProvider, GlobalDim, ConstructorArgs... > LocAsmBuilderFactory
void foreach(Function &&f)
Definition TMP.h:157
decltype(auto) filter(Pred pred)
Definition TMP.h:78

References BaseLib::TMP::filter(), BaseLib::TMP::foreach(), and OGS_FATAL.


The documentation for this class was generated from the following file: