Make density approximation order an independent compile-time choice
This commit is contained in:
@@ -7,6 +7,10 @@ module;
|
||||
#define MEAN_FIELD_UNIFORM_POLYNOMIAL_ORDER_INCREMENT 0
|
||||
#endif
|
||||
|
||||
#ifndef MEAN_FIELD_DENSITY_POLYNOMIAL_ORDER
|
||||
#define MEAN_FIELD_DENSITY_POLYNOMIAL_ORDER 2
|
||||
#endif
|
||||
|
||||
export module mean_field:field.registry;
|
||||
|
||||
export import :dimensions.quantities;
|
||||
@@ -24,7 +28,12 @@ export namespace mean_field::field {
|
||||
|
||||
struct Density {
|
||||
static constexpr std::string_view name = "density";
|
||||
static constexpr int scalarOrder = 2 + uniformPolynomialOrderIncrement;
|
||||
// Density need not share the gravity potential's approximation order.
|
||||
// Keeping this choice in the registry also updates every form query and
|
||||
// compiled block layout, unlike changing only the runtime FE collection.
|
||||
static constexpr int baseScalarOrder = MEAN_FIELD_DENSITY_POLYNOMIAL_ORDER;
|
||||
static_assert(baseScalarOrder >= 0);
|
||||
static constexpr int scalarOrder = baseScalarOrder + uniformPolynomialOrderIncrement;
|
||||
|
||||
using PhysicalQuantity = dimensions::quantity::Density;
|
||||
using Support = DomainSupport<utils::domain::Stellar>;
|
||||
|
||||
Reference in New Issue
Block a user