feat(field-support): added field support system, mid migration
currently the barotope and the pressure force operator are migrated to the new support system
This commit is contained in:
37
libmeanfield/interface/models/structure/structure_base.cppm
Normal file
37
libmeanfield/interface/models/structure/structure_base.cppm
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
Reference in New Issue
Block a user