18 lines
689 B
C++
18 lines
689 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "mfem/fem/intrules.hpp"
|
||
|
|
|
||
|
|
#include "serif/discretization/quadrature/backend/mfem/concepts.hpp"
|
||
|
|
|
||
|
|
namespace serif::discretization::quadrature::backend::mfem {
|
||
|
|
template <ConfigurableIntegrator IntegratorT>
|
||
|
|
void set_integration_rule(IntegratorT &integrator, const ::mfem::IntegrationRule &integration_rule) {
|
||
|
|
if constexpr (HasReferenceSetIntegrationRule<IntegratorT>) {
|
||
|
|
integrator.SetIntegrationRule(integration_rule);
|
||
|
|
} else if constexpr (HasPointerSetIntegrationRule<IntegratorT>) {
|
||
|
|
integrator.SetIntegrationRule(&integration_rule);
|
||
|
|
} else {
|
||
|
|
integrator.SetIntRule(&integration_rule);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|