Peano
Loading...
Searching...
No Matches
exahype2.api.SolverToCPPFiles.SolverToCPPFiles Class Reference
Inheritance diagram for exahype2.api.SolverToCPPFiles.SolverToCPPFiles:
Collaboration diagram for exahype2.api.SolverToCPPFiles.SolverToCPPFiles:

Public Member Functions

 __init__ (self, Solver solver)
 
 construct_output (self, exahype2_project, peano_project)
 Dump the solver into actual C++ classes.
 

Static Public Attributes

str TEMPLATE_ABSTRACT_HEADER_FILE
 
str TEMPLATE_ABSTRACT_CPP_FILE
 
str TEMPLATE_SOLVER_HEADER_FILE
 
str TEMPLATE_SOLVER_CPP_FILE
 

Protected Member Functions

str _variables_declaration (self)
 Nested struct Variables with the position of each named variable within Q, or the empty string if the solver's variables carry no names.
 

Additional Inherited Members

- Protected Attributes inherited from exahype2.api.Solver.Solver.SolverGenerator
 _solver
 

Detailed Description

Definition at line 14 of file SolverToCPPFiles.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.SolverToCPPFiles.SolverToCPPFiles.__init__ (   self,
Solver  solver 
)

Reimplemented from exahype2.api.Solver.Solver.SolverGenerator.

Definition at line 134 of file SolverToCPPFiles.py.

References exahype2.api.SolverToCPPFiles.SolverToCPPFiles.__init__().

Referenced by exahype2.api.SolverToCPPFiles.SolverToCPPFiles.__init__().

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

Member Function Documentation

◆ _variables_declaration()

str exahype2.api.SolverToCPPFiles.SolverToCPPFiles._variables_declaration (   self)
protected

Nested struct Variables with the position of each named variable within Q, or the empty string if the solver's variables carry no names.

User code (and code injected from Python) then can write Q[Variables::rho] instead of Q[0].

Definition at line 137 of file SolverToCPPFiles.py.

References solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, solvers.fv.EnclaveTasking.UpdateCell._solver, solvers.fv.SingleSweep.UpdateCell._solver, solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver, exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests._solver, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver, exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint._solver, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._solver, exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior._solver, exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler._solver, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._solver, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet._solver, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._solver, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.Solver.Solver.SolverGenerator._solver, exahype2.api.Solver.Solver.NumericalScheme._solver, exahype2.api.Solver.Solver.GridConstruction._solver, exahype2.api.Solver.Solver.Plotter._solver, exahype2.api.Solver.Solver.MeshAdaptation._solver, 20_additional-solver-steps.RusanovWithDensityFloor._solver, and 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver.

Referenced by exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output().

Here is the caller graph for this function:

◆ construct_output()

exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output (   self,
  exahype2_project,
  peano_project 
)

Dump the solver into actual C++ classes.

Reimplemented from exahype2.api.Solver.Solver.SolverGenerator.

Definition at line 159 of file SolverToCPPFiles.py.

References solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, solvers.fv.EnclaveTasking.UpdateCell._solver, solvers.fv.SingleSweep.UpdateCell._solver, solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver, exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests._solver, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver, exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint._solver, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._solver, exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior._solver, exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler._solver, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._solver, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet._solver, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._solver, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.Solver.Solver.SolverGenerator._solver, exahype2.api.Solver.Solver.NumericalScheme._solver, exahype2.api.Solver.Solver.GridConstruction._solver, exahype2.api.Solver.Solver.Plotter._solver, exahype2.api.Solver.Solver.MeshAdaptation._solver, 20_additional-solver-steps.RusanovWithDensityFloor._solver, 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver, exahype2.api.SolverToCPPFiles.SolverToCPPFiles._variables_declaration(), exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_ABSTRACT_CPP_FILE, exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_ABSTRACT_HEADER_FILE, exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_SOLVER_CPP_FILE, and exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_SOLVER_HEADER_FILE.

Here is the call graph for this function:

Field Documentation

◆ TEMPLATE_ABSTRACT_CPP_FILE

str exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_ABSTRACT_CPP_FILE
static
Initial value:
= """
#include "{{CLASSNAME}}.h"
#include "exahype2/RefinementControl.h"
{{USER_SOLVER_INCLUDES}}
tarch::logging::Log {{NAMESPACE | join("::")}}::{{CLASSNAME}}::_log( "{{NAMESPACE | join("::")}}::{{CLASSNAME}}" );
{{NAMESPACE | join("::")}}::{{CLASSNAME}}::{{CLASSNAME}}() {
}
{{PDE_TERM_DEFINITIONS}}
{{ADDITIONAL_METHOD_DEFINITIONS}}
"""

Definition at line 64 of file SolverToCPPFiles.py.

Referenced by exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output().

◆ TEMPLATE_ABSTRACT_HEADER_FILE

str exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_ABSTRACT_HEADER_FILE
static

◆ TEMPLATE_SOLVER_CPP_FILE

str exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_SOLVER_CPP_FILE
static
Initial value:
= """
#include "{{CLASSNAME}}.h"
{{PDE_TERM_STUB_DEFINITIONS}}
"""

Definition at line 114 of file SolverToCPPFiles.py.

Referenced by exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output().

◆ TEMPLATE_SOLVER_HEADER_FILE

str exahype2.api.SolverToCPPFiles.SolverToCPPFiles.TEMPLATE_SOLVER_HEADER_FILE
static

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