OGS
ProcessLib::detail Namespace Reference

Classes

struct  LocalAssemblerTraitsFixed
 

Typedefs

using ZeroOrOneD = std::tuple<MeshLib::Point, MeshLib::Line, MeshLib::Line3>
 
using Cuboids
 
using Simplices
 
using Prisms = std::tuple<MeshLib::Prism, MeshLib::Prism15>
 
using Pyramids = std::tuple<MeshLib::Pyramid, MeshLib::Pyramid13>
 
using Triangles = std::tuple<MeshLib::Tri, MeshLib::Tri6>
 
using Quads = std::tuple<MeshLib::Quad, MeshLib::Quad8, MeshLib::Quad9>
 

Functions

template<template< typename, template< typename, typename, int > class, class, int, typename... > class LocalAssemblerFactory, int GlobalDim, template< typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder, typename... ExtraCtorArgs>
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)
 
template<typename Elements , typename Element >
constexpr bool isElementEnabledImpl (bool is_group_enabled)
 

Variables

static constexpr bool enable_element_type_simplex
 
static constexpr bool enable_element_type_cuboid
 
static constexpr bool enable_element_type_prism
 
static constexpr bool enable_element_type_pyramid
 
static constexpr bool enable_element_type_tri
 
static constexpr bool enable_element_type_quad
 
auto constexpr isElementEnabled
 

Typedef Documentation

◆ Cuboids

Initial value:
TemplateElement< MeshLib::QuadRule9 > Quad9
Definition Quad.h:30
TemplateElement< MeshLib::QuadRule8 > Quad8
Definition Quad.h:29
TemplateElement< MeshLib::QuadRule4 > Quad
Definition Quad.h:28
TemplateElement< MeshLib::HexRule8 > Hex
Definition Hex.h:25

Definition at line 67 of file EnabledElements.h.

◆ Prisms

Definition at line 73 of file EnabledElements.h.

◆ Pyramids

Definition at line 75 of file EnabledElements.h.

◆ Quads

Definition at line 79 of file EnabledElements.h.

◆ Simplices

Initial value:
std::tuple<MeshLib::Tri, MeshLib::Tri6, MeshLib::Tet, MeshLib::Tet10>

Definition at line 70 of file EnabledElements.h.

◆ Triangles

Definition at line 77 of file EnabledElements.h.

◆ ZeroOrOneD

Function Documentation

◆ createLocalAssemblersTaylorHood()

template<template< typename, template< typename, typename, int > class, class, int, typename... > class LocalAssemblerFactory, int GlobalDim, template< typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder, typename... ExtraCtorArgs>
void ProcessLib::detail::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 )

Creates local assemblers for each element of the given mesh.

Template Parameters
LocalAssemblerFactorythe factory that will instantiate the local assemblers
LocalAssemblerImplementationthe individual local assembler type
LocalAssemblerInterfacethe general local assembler interface
ExtraCtorArgstypes of additional constructor arguments. Those arguments will be passed to the constructor of LocalAssemblerImplementation.

Definition at line 49 of file CreateLocalAssemblersTaylorHood.h.

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}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
static void transformDereferenced(F const &f, C const &c, Data &data, Args_ &&... args)

References DBUG(), and NumLib::SerialExecutor::transformDereferenced().

◆ isElementEnabledImpl()

template<typename Elements , typename Element >
constexpr bool ProcessLib::detail::isElementEnabledImpl ( bool is_group_enabled)
constexpr

Determines if the given element is contained in the given element group and if furthermore the element group is enabled.

Definition at line 86 of file EnabledElements.h.

87{
88 return BaseLib::TMP::contains<Elements, Element>() && is_group_enabled;
89}

Variable Documentation

◆ enable_element_type_cuboid

constexpr bool ProcessLib::detail::enable_element_type_cuboid
staticconstexpr
Initial value:
=
true

Definition at line 34 of file EnabledElements.h.

◆ enable_element_type_prism

constexpr bool ProcessLib::detail::enable_element_type_prism
staticconstexpr
Initial value:
=
true

Definition at line 41 of file EnabledElements.h.

◆ enable_element_type_pyramid

constexpr bool ProcessLib::detail::enable_element_type_pyramid
staticconstexpr
Initial value:
=
true

Definition at line 48 of file EnabledElements.h.

◆ enable_element_type_quad

constexpr bool ProcessLib::detail::enable_element_type_quad
staticconstexpr
Initial value:
static constexpr bool enable_element_type_cuboid
static constexpr bool enable_element_type_pyramid
static constexpr bool enable_element_type_prism

Definition at line 61 of file EnabledElements.h.

◆ enable_element_type_simplex

constexpr bool ProcessLib::detail::enable_element_type_simplex
staticconstexpr
Initial value:
=
true

Definition at line 27 of file EnabledElements.h.

◆ enable_element_type_tri

constexpr bool ProcessLib::detail::enable_element_type_tri
staticconstexpr
Initial value:

Definition at line 56 of file EnabledElements.h.

◆ isElementEnabled

auto constexpr ProcessLib::detail::isElementEnabled
constexpr
Initial value:
= []<typename ElementTraits>(ElementTraits*)
{
using Element = typename ElementTraits::Element;
if constexpr (ElementTraits::ShapeFunction::ORDER > OGS_MAX_ELEMENT_ORDER)
{
return false;
}
if constexpr (Element::dimension > OGS_MAX_ELEMENT_DIM)
{
return false;
}
return isElementEnabledImpl<ZeroOrOneD, Element>(true) ||
isElementEnabledImpl<Cuboids, Element>(enable_element_type_cuboid) ||
isElementEnabledImpl<Simplices, Element>(
enable_element_type_simplex) ||
isElementEnabledImpl<Prisms, Element>(enable_element_type_prism) ||
isElementEnabledImpl<Pyramids, Element>(
enable_element_type_pyramid) ||
isElementEnabledImpl<Triangles, Element>(enable_element_type_tri) ||
isElementEnabledImpl<Quads, Element>(enable_element_type_quad);
}

Definition at line 91 of file EnabledElements.h.

92{
93 using Element = typename ElementTraits::Element;
94
95 if constexpr (ElementTraits::ShapeFunction::ORDER > OGS_MAX_ELEMENT_ORDER)
96 {
97 return false;
98 }
99 if constexpr (Element::dimension > OGS_MAX_ELEMENT_DIM)
100 {
101 return false;
102 }
103
104 return isElementEnabledImpl<ZeroOrOneD, Element>(true) ||
105 isElementEnabledImpl<Cuboids, Element>(enable_element_type_cuboid) ||
106 isElementEnabledImpl<Simplices, Element>(
107 enable_element_type_simplex) ||
108 isElementEnabledImpl<Prisms, Element>(enable_element_type_prism) ||
109 isElementEnabledImpl<Pyramids, Element>(
110 enable_element_type_pyramid) ||
111 isElementEnabledImpl<Triangles, Element>(enable_element_type_tri) ||
112 isElementEnabledImpl<Quads, Element>(enable_element_type_quad);
113};