feat(surface): surface deformation prescriptions

restricted the unknown state vector to surface deformation and implemented one prescription, NodalRadialSurface, while the full volumetric displacment field is reconstructed analytically from that. This reduced the number of degrees of freedom in the system by a factor of 80 while also removing many null vectors from the system.
This commit is contained in:
2026-09-01 11:50:13 -04:00
parent 0a7f18c5c7
commit 85500fef3b
40 changed files with 8924 additions and 1164 deletions

View File

@@ -0,0 +1,111 @@
module;
#include <cstdint>
#include <string_view>
export module mean_field:deformation.descriptors;
export namespace mean_field::deformation {
enum class SurfaceMotionKind : std::uint8_t { Radial, Normal, GeneralVector };
enum class GeometricGaugeTreatment : std::uint8_t {
Retained,
ExcludedByParameterization,
ConstrainedByPrescription
};
enum class InteriorCenterBehavior : std::uint8_t { Unspecified, FixedAtReferenceCenter, DeterminedBySurfaceMotion };
enum class VacuumOuterBoundaryBehavior : std::uint8_t {
Unspecified,
FixedAtReferenceInfinity,
DeterminedBySurfaceMotion
};
struct SurfaceDeformationDescriptor final {
std::string_view name;
int spatialDimension;
SurfaceMotionKind motionKind;
bool linearOnReferenceGeometry;
bool requiresStarShapedReferenceSurface;
bool hasExactDerivativeTranspose;
bool hasExactPullbackDerivative;
GeometricGaugeTreatment translationTreatment;
GeometricGaugeTreatment orientationTreatment;
[[nodiscard]] constexpr bool isValid() const noexcept {
return !name.empty() && spatialDimension > 0;
}
[[nodiscard]] constexpr bool supportsExactNewtonLinearization() const noexcept {
return hasExactDerivativeTranspose && hasExactPullbackDerivative;
}
constexpr bool operator==(const SurfaceDeformationDescriptor &) const = default;
};
struct InteriorDeformationExtensionDescriptor final {
std::string_view name;
int spatialDimension;
bool linearOnReferenceGeometry;
bool requiresRadialFoliation;
bool requiresAuxiliarySolve;
bool hasExactDerivativeTranspose;
bool hasExactPullbackDerivative;
InteriorCenterBehavior centerBehavior;
[[nodiscard]] constexpr bool isValid() const noexcept {
return !name.empty() && spatialDimension > 0 && centerBehavior != InteriorCenterBehavior::Unspecified;
}
[[nodiscard]] constexpr bool supportsExactNewtonLinearization() const noexcept {
return hasExactDerivativeTranspose && hasExactPullbackDerivative;
}
constexpr bool operator==(const InteriorDeformationExtensionDescriptor &) const = default;
};
struct VacuumDeformationExtensionDescriptor final {
std::string_view name;
int spatialDimension;
bool linearOnReferenceGeometry;
bool requiresRadialFoliation;
bool requiresAuxiliarySolve;
bool hasExactDerivativeTranspose;
bool hasExactPullbackDerivative;
VacuumOuterBoundaryBehavior outerBoundaryBehavior;
[[nodiscard]] constexpr bool isValid() const noexcept {
return !name.empty() && spatialDimension > 0 &&
outerBoundaryBehavior != VacuumOuterBoundaryBehavior::Unspecified;
}
[[nodiscard]] constexpr bool supportsExactNewtonLinearization() const noexcept {
return hasExactDerivativeTranspose && hasExactPullbackDerivative;
}
constexpr bool operator==(const VacuumDeformationExtensionDescriptor &) const = default;
};
struct DomainDeformationDescriptor final {
SurfaceDeformationDescriptor surfaceDeformation;
InteriorDeformationExtensionDescriptor stellarInteriorExtension;
VacuumDeformationExtensionDescriptor vacuumExtension;
bool linearOnReferenceGeometry;
bool requiresAuxiliarySolve;
bool hasExactDerivativeTranspose;
bool hasExactPullbackDerivative;
[[nodiscard]] constexpr bool isValid() const noexcept {
return surfaceDeformation.isValid() && stellarInteriorExtension.isValid() && vacuumExtension.isValid() &&
surfaceDeformation.spatialDimension == stellarInteriorExtension.spatialDimension &&
surfaceDeformation.spatialDimension == vacuumExtension.spatialDimension;
}
[[nodiscard]] constexpr bool supportsExactNewtonLinearization() const noexcept {
return hasExactDerivativeTranspose && hasExactPullbackDerivative;
}
constexpr bool operator==(const DomainDeformationDescriptor &) const = default;
};
} // namespace mean_field::deformation