Skip to content

refactor: limit magic paths use#4102

Open
kdrienCG wants to merge 5 commits into
developfrom
refactor/kdrienCG/globalViewKeys
Open

refactor: limit magic paths use#4102
kdrienCG wants to merge 5 commits into
developfrom
refactor/kdrienCG/globalViewKeys

Conversation

@kdrienCG

Copy link
Copy Markdown
Contributor

This PR reduces the use of magic paths to access common objects for developers ("/Problem/domain/", "/Problem/domain/Constitutive", "/Problem/Events/", etc)

It introduces a GlobalViewKeys struct to provide a centralized definition of the names of these common objects.

It also adds a ProblemManagerBase lightweight interface over the ProblemManager that gives typed access to these objects without requiring to bring the full ProblemManager


Example of its use:

Group & problemManager = this->getGroupByPath( "/Problem" );
Group & physicsSolverManager = problemManager.getGroup( "Solvers" );

is replaced by:

PhysicsSolverManager & physicsSolverManager = getProblemManagerBase( *this ).getPhysicsSolverManager();

@kdrienCG
kdrienCG marked this pull request as ready for review July 23, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: cleanup / refactor Non-functional change (NFC)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant