OGS
IntegrationMethodProvider.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
8
9namespace NumLib
10{
13template <typename T>
14concept IntegrationMethodProvider = requires(T t)
15{
16 {
17 // using Quad as a representative mesh element type
18 t.template getIntegrationMethod<MeshLib::Quad>(
19 std::declval<MeshLib::Element>())
20 } -> std::same_as<GenericIntegrationMethod const&>;
21};
22
26{
27public:
29 IntegrationOrder const integration_order)
30 : integration_order_{integration_order}
31 {
32 }
33
34 template <typename MeshElement>
36 MeshLib::Element const& /*e*/) const
37 {
38 return IntegrationMethodRegistry::template getIntegrationMethod<
39 MeshElement>(integration_order_);
40 }
41
42private:
44};
45
53
54} // namespace NumLib
DefaultIntegrationMethodProvider(IntegrationOrder const integration_order)
GenericIntegrationMethod const & getIntegrationMethod(MeshLib::Element const &) const
DefaultIntegrationMethodProvider getIntegrationMethodProvider(NumLib::IntegrationOrder const integration_order)