Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F fluidsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fluiddyn
  • fluidsim
  • Merge requests
  • !200

Merged
Created Feb 17, 2021 by Pierre Augier@paugierOwner

Topic/default/extend simul

  • Overview 19
  • Commits 12
  • Pipelines 9
  • Changes 19

I like to introduce a mechanism to "extend a Simul class" with another class.

The first application is to introduce a particular output specialized for one study. Thus, we don't want to have it in a solver used for many applications.

This MR will contain deep changes (also in fluidsim_core), it's a bit tricky and it can have consequences on projects depending on fluidsim_core. Thus, I don't assign to myself this time 🙂 !

More coming soon...

Proposed new API:

# can be anywhere, but should be importable (otherwise, the simulation can't be loaded afterwards)
from fluidsim.extend_simul.spatial_means_center_milestone import SpatialMeansCenter

Simul = SpatialMeansCenter.create_extended_Simul(Simul)

# then, as usual
params = Simul.create_default_params()
...

Note: I'm not very happy with the name create_extended_Simul...

Then, the simulation can be loaded as usual with load_sim_for_plots, load_state_phys_file and load_for_restart.

There is another case when one wants to plug this output to a simulation already created. Then, I guess we need to do:

params, Simul = load_for_restart(name_dir)
Simul = SpatialMeansCenter.create_extended_Simul(Simul)
SpatialMeansCenter.complete_params_with_default(params)
Edited Feb 18, 2021 by Pierre Augier
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: topic/default/extend-simul