OGS
IntegrationMethodProvider.h
Go to the documentation of this file.
1
11
#pragma once
12
13
#include "
IntegrationMethodRegistry.h
"
14
#include "
MeshLib/Elements/Quad.h
"
15
16
namespace
NumLib
17
{
20
template
<
typename
T>
21
concept
IntegrationMethodProvider
=
requires
(T t)
22
{
23
{
24
// using Quad as a representative mesh element type
25
t.template getIntegrationMethod<MeshLib::Quad>(
26
std::declval<MeshLib::Element>())
27
} -> std::same_as<GenericIntegrationMethod const&>;
28
};
29
32
class
DefaultIntegrationMethodProvider
33
{
34
public
:
35
explicit
DefaultIntegrationMethodProvider
(
36
IntegrationOrder
const
integration_order)
37
:
integration_order_
{integration_order}
38
{
39
}
40
41
template
<
typename
MeshElement>
42
GenericIntegrationMethod
const
&
getIntegrationMethod
(
43
MeshLib::Element
const
&
/*e*/
)
const
44
{
45
return
IntegrationMethodRegistry::template
getIntegrationMethod
<
46
MeshElement>(
integration_order_
);
47
}
48
49
private
:
50
IntegrationOrder
integration_order_
;
51
};
52
55
inline
DefaultIntegrationMethodProvider
getIntegrationMethodProvider
(
56
NumLib::IntegrationOrder
const
integration_order)
57
{
58
return
DefaultIntegrationMethodProvider
{integration_order};
59
}
60
61
}
// namespace NumLib
IntegrationMethodRegistry.h
Quad.h
Definition of the Quad class.
MeshLib::Element
Definition
Element.h:34
NumLib::DefaultIntegrationMethodProvider
Definition
IntegrationMethodProvider.h:33
NumLib::DefaultIntegrationMethodProvider::DefaultIntegrationMethodProvider
DefaultIntegrationMethodProvider(IntegrationOrder const integration_order)
Definition
IntegrationMethodProvider.h:35
NumLib::DefaultIntegrationMethodProvider::integration_order_
IntegrationOrder integration_order_
Definition
IntegrationMethodProvider.h:50
NumLib::DefaultIntegrationMethodProvider::getIntegrationMethod
GenericIntegrationMethod const & getIntegrationMethod(MeshLib::Element const &) const
Definition
IntegrationMethodProvider.h:42
NumLib::GenericIntegrationMethod
Definition
GenericIntegrationMethod.h:24
NumLib::IntegrationMethodProvider
Definition
IntegrationMethodProvider.h:21
NumLib
Definition
ProjectData.h:46
NumLib::getIntegrationMethodProvider
DefaultIntegrationMethodProvider getIntegrationMethodProvider(NumLib::IntegrationOrder const integration_order)
Definition
IntegrationMethodProvider.h:55
NumLib::IntegrationOrder
Definition
IntegrationMethodRegistry.h:21
NumLib
Fem
Integration
IntegrationMethodProvider.h
Generated by
1.12.0