feat: add PermeabilitySpecification as an high-level FieldSpecification#4019
feat: add PermeabilitySpecification as an high-level FieldSpecification#4019
Conversation
Implement methods to add factories to the manager to handle the creation of FieldSpecificationBase object via higher-level specifications (like PermeabilitySpecification)
|
Hi @kdrienCG |
Hi @rrsettgast , and thanks for the suggestion I propose doing that in a follow-up PR so we can keep this one focused on specialized components and easier to review. I've also put together a prototype to test the generalized approach, I can open a separate PR so we can agree on what its interface should be. |
(Previously #4012)
This PR proposes to add an easy way to add higher-level components that create FieldSpecifications without the boilerplate.
As an example, to define the permeability you have to specify 3 differents FieldSpecifications.
One for the x-axis, a second for the y-axis, and a last one for the z-axis.
There is also some implementation details that could be hidden, like the
componentXML attribute for example.With this PR, their would be a
PermeabilitySpecificationcomponent that would create behind the scene those three FieldSpecifications to keep full compatibility with other parts that rely onFieldSpecificationBase. One could think of PermeabilitySpecification as a blueprint or recipe to create FieldSpecificationBase objects.Here is how it looks like for
PermeabilitySpecification:The following architecture is proposed:
This way, similar components could be added by providing a data class (like
PermeabilitySpecification) and a factory with ageneratemethod to describe how to transform the high-level components into one or multiple "low-level"FieldSpecificationBase.