-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Priority: Low
Problem
The canonical coordinate implementations (Boozer, Meiss, Albert, Flux) do not use the polymorphic pattern established by magnetic_field_t. Instead, they use separate modules with similar but not identical interfaces.
Current structure:
field_can_boozer.f90- standalone modulefield_can_meiss.f90- standalone modulefield_can_albert.f90- standalone modulefield_can_flux.f90- standalone module
Proposed Solution
Create a canonical_field_t base class:
type, abstract, extends(magnetic_field_t) :: canonical_field_t
contains
procedure(eval_can_iface), deferred :: evaluate_canonical
procedure :: evaluate => evaluate_via_canonical
end type
type, extends(canonical_field_t) :: boozer_field_t
type, extends(canonical_field_t) :: meiss_field_t
type, extends(canonical_field_t) :: albert_field_tBenefits
- Consistent interface across all canonical coordinate types
- Easier to add new canonical coordinate systems
- Better code organization
Caveats
- Significant refactoring effort
- Current approach is well-tested and functional
- Performance impact needs evaluation
Related
- See
DOC/coordinates-and-fields.mdSection 6
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request