Skip to content

Refactor SpeciesComponentConfig to use nested SpaceTimeEnvelopeConfig #250

@johnbcoughlin

Description

@johnbcoughlin

Summary

SpeciesComponentConfig in adept/_vlasov1d/datamodel.py currently inlines envelope fields (center, rise, width, bump_height, bump_or_trough, slope) at the top level instead of nesting them in an EnvelopeConfig.

This makes the model a flat union of fields from different density basis types (sine, linear, exponential, tanh, uniform), all optional, which is fragile and hard to validate per-basis.

Proposed change

Refactor SpeciesComponentConfig to use a nested EnvelopeConfig for the envelope fields, similar to how EMDriverConfig uses envelope: SpaceTimeEnvelopeConfig.

This would require updating the YAML config format for density components, so it's a breaking change that should be coordinated.

Context

This was identified during the pydantic model update that introduced typed *Config models and from_config methods across the vlasov1d module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions