Files
MeanField/libmeanfield/interface/models/structure/structure_base.cppm
Emily Boudreaux 0f3ca8050b feat(field-support): added field support system, mid migration
currently the barotope and the pressure force operator are migrated to the new support system
2026-08-23 10:13:53 -04:00

37 lines
1.1 KiB
C++

module;
#include <mfem.hpp>
export module mean_field:model.structure.base;
export import :eos.base;
export namespace mean_field::models::structure {
struct StructureSeed {
mfem::Vector radius;
mfem::Vector density;
mfem::Vector enthalpy;
double stellarRadius;
double centralDensity;
double centralEnthalpy;
};
struct StructureSeedRequest {
double centralDensity;
int radialSampleCount{512};
};
class StructureBase {
public:
virtual ~StructureBase() = default;
[[nodiscard]] virtual const eos::EquationOfState &equationOfState() const noexcept = 0;
[[nodiscard]] virtual double targetMass() const noexcept = 0;
[[nodiscard]] virtual StructureSeed makeInitialSeed(const StructureSeedRequest &request) const = 0;
virtual void validate() const = 0;
protected:
StructureBase() = default;
};
} // namespace mean_field::models::structure