Peano
Loading...
Searching...
No Matches
exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain Class Reference

Default realisation of exahype2.api.Project.mainfile_generator. More...

Inheritance diagram for exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain:
Collaboration diagram for exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain:

Public Member Functions

 __init__ (self, Project project)
 
 construct_output (self, peano_project)
 Add this generator's output to peano_project (a peano4.api.Project-compatible object, or anything else that add()'s cleanly into peano_project.output).
 

Additional Inherited Members

- Data Fields inherited from exahype2.api.Project.Project.Generator
 project
 

Detailed Description

Default realisation of exahype2.api.Project.mainfile_generator.

Mirrors SolverToCPPFiles on the solver side: turns the project configuration into the header/implementation file pair that ends up holding main(), similar in spirit to python/exahype2/ExaHyPEMain.template.h/.cpp. Rather than emitting that file pair itself, it replaces peano_project's generic peano4-level main file generator (peano4.api.runner.DefaultSequence) with _ExaHyPEMainFileSequence below, which speaks the same construct_output(output, main_name) protocol but fills the file pair with ExaHyPE-flavoured content instead of the mesh-agnostic default.

The generated main() contains only what is specific to the project: the runners, the data types, the domain, the log filter and the load balancing. The runtime configuration, the main loop over the runners and the shutdown are plain C++, i.e. exahype2::configureRuntime(), exahype2::runSimulation() and exahype2::shutdownRuntime().

Definition at line 8 of file DefaultSimulationMain.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain.__init__ (   self,
Project  project 
)

Reimplemented from exahype2.api.Project.Project.Generator.

Definition at line 31 of file DefaultSimulationMain.py.

References exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain.__init__().

Referenced by exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain.__init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ construct_output()

exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain.construct_output (   self,
  peano_project 
)

Add this generator's output to peano_project (a peano4.api.Project-compatible object, or anything else that add()'s cleanly into peano_project.output).

This is the one thing every Generator has to implement.

peano_project: peano4.api.Project The Peano 4 project that self.project.generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this generator can add its own artefacts to it.

Reimplemented from exahype2.api.Project.Project.Generator.

Definition at line 34 of file DefaultSimulationMain.py.

References exahype2.api.generators.DefaultSimulationMain._ExaHyPEMainFileSequence.project, exahype2.api.generators.KernelMicrobenchmarkMain._ExaHyPEKernelBenchmarkMainFileSequence.project, exahype2.api.Project.Project.Generator.project, peano4.api.runner.DefaultSequence.DefaultSequence.project, and peano4.api.solversteps.Step.Step.project.


The documentation for this class was generated from the following file: