Loading [MathJax]/extensions/tex2jax.js
Peano
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation Class Reference

Helper class to model a hyperbolic PDE in first-order conservative formulation. More...

Inheritance diagram for exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation:
Collaboration diagram for exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation:

Public Member Functions

 __init__ (self, unknowns, auxiliary_variables, dimensions)
 
 __str__ (self)
 
 LaTeX (self)
 
 substitute_expression (self, expression, new_expression)
 Usually used to set a symbolic variable (expression) to a value (new_expression).
 
 implementation_of_flux (self, invoke_evalf_before_output=False)
 Return implementation for flux along one coordinate axis (d) as C code.
 
 implementation_of_ncp (self, invoke_evalf_before_output=False)
 Return implementation for nonconservative product (ncp) along one coordinate axis (d) as C code.
 
 implementation_of_eigenvalues (self, invoke_evalf_before_output=False)
 Return eigenvalues.
 
 implementation_of_max_eigenvalue (self, invoke_evalf_before_output=False, use_absolute_values=True)
 Return maximum eigenvalue.
 
 implementation_of_sources (self, invoke_evalf_before_output=False)
 Return implementation for sources as C code.
 
- Public Member Functions inherited from exahype2.symhype.PDE.PDE
 unknown_identifier_for_plotter (self)
 Returns identifier for the unknowns.
 
 name_Q_entry (self, offset_in_Q, name)
 Q covers both unknowns plus auxiliary variables.
 
 name_auxiliary_variable (self, number, name)
 
 name_Q_entries (self, offset_in_Q, cardinality, name)
 
 grad (self, Q)
 
 implementation_of_homogeneous_Neumann_BC (self)
 
 implementation_of_boundary_conditions (self, invoke_evalf_before_output=False)
 invoke_evalf_before_output: boolean If your expression is a symbolic expression (default) then we use evalf before we pipe it into the output.
 
 implementation_of_initial_conditions (self, invoke_evalf_before_output=False)
 invoke_evalf_before_output: boolean If your expression is a symbolic expression (default) then we use evalf before we pipe it into the output.
 

Data Fields

 F
 
 ncp
 
 eigenvalues
 
 sources
 
 unknowns
 
 dimensions
 
- Data Fields inherited from exahype2.symhype.PDE.PDE
 unknowns
 
 auxiliary_variables
 
 dimensions
 
 Q
 
 delta_Q
 
 initial_values
 
 boundary_values
 
 x
 
 h
 

Additional Inherited Members

- Protected Member Functions inherited from exahype2.symhype.PDE.PDE
 _implementation_of_mapping_onto_named_quantities (self, is_cell_mapping=True, is_boundary=False, has_delta=False)
 Return the C code that maps the quantities from Q onto properly labelled quantities.
 

Detailed Description

Helper class to model a hyperbolic PDE in first-order conservative formulation.

To model your PDE, you typically run through a couple of single steps. First, include this package plus sympy. Next, create a new instance of this class to which you pass the number of equations in your PDE system, i.e., the number of unknowns you want to develop, plus the dimension.

As a consequence, the solver holds an equation pde which describes the PDE's right-hand side in the representation

\partial Q(t) + div_x F(Q)

Most people prefer not to work with a vector Q but with some symbolic names. Feel free to derive them from Q via constructs similar to

rho = euler.Q[0] j = sympy.Array(euler.Q[1:4]) E = euler.Q[4]

Definition at line 9 of file FirstOrderConservativePDEFormulation.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.__init__ ( self,
unknowns,
auxiliary_variables,
dimensions )

Reimplemented from exahype2.symhype.PDE.PDE.

Definition at line 33 of file FirstOrderConservativePDEFormulation.py.

Member Function Documentation

◆ __str__()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.__str__ ( self)

Definition at line 41 of file FirstOrderConservativePDEFormulation.py.

Referenced by peano4.toolbox.particles.postprocessing.ParticleVTUReader.VTUParticleSet.__repr__().

Here is the caller graph for this function:

◆ implementation_of_eigenvalues()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_eigenvalues ( self,
invoke_evalf_before_output = False )

Return eigenvalues.

This yields a set of eigenvalues, i.e., one per unknown. For many solvers such as Rusanov, you need only one.

d: int The axis along which we wanna have the eigenvalues

invoke_evalf_before_output: boolean If your expression is a symbolic expression (default) then we use evalf before we pipe it into the output. If your expression is something numeric, then evalf will fail (as it is not defined for scalar quantities).

Definition at line 178 of file FirstOrderConservativePDEFormulation.py.

References exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.dimensions, exahype2.symhype.PDE.PDE.dimensions, peano4.visualisation.input.PatchFileParser.UnknownAttributes.dimensions, peano4.visualisation.input.PatchFileParser.PatchFileParser.dimensions, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, mghype.api.matrixgenerators.DLinear.DLinear.dimensions, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions, mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.dimensions, mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.dimensions, equations.acoustic.Acoustic.dimensions, equations.advection.Advection.dimensions, equations.elastic.Elastic.dimensions, equations.equation.Equation.dimensions, equations.euler.Euler.dimensions, equations.swe.SWE_W_Bathymetry.dimensions, equations.swe.SWE_WO_Bathymetry.dimensions, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.eigenvalues, equations.equation.Equation.eigenvalues(), equations.acoustic.Acoustic.eigenvalues(), equations.advection.Advection.eigenvalues(), equations.elastic.Elastic.eigenvalues(), equations.euler.Euler.eigenvalues(), equations.swe.SWE_W_Bathymetry.eigenvalues(), equations.swe.SWE_WO_Bathymetry.eigenvalues(), exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.unknowns, exahype2.symhype.PDE.PDE.unknowns, peano4.visualisation.input.Patch.Patch.unknowns, peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknowns, and convert::data::Variable.unknowns.

Here is the call graph for this function:

◆ implementation_of_flux()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_flux ( self,
invoke_evalf_before_output = False )

Return implementation for flux along one coordinate axis (d) as C code.

invoke_evalf_before_output: boolean If your expression is a symbolic expression (default) then we use evalf before we pipe it into the output. If your expression is something numeric, then evalf will fail (as it is not defined for scalar quantities).

Definition at line 108 of file FirstOrderConservativePDEFormulation.py.

References exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.dimensions, exahype2.symhype.PDE.PDE.dimensions, peano4.visualisation.input.PatchFileParser.UnknownAttributes.dimensions, peano4.visualisation.input.PatchFileParser.PatchFileParser.dimensions, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, mghype.api.matrixgenerators.DLinear.DLinear.dimensions, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions, mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.dimensions, mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.dimensions, equations.acoustic.Acoustic.dimensions, equations.advection.Advection.dimensions, equations.elastic.Elastic.dimensions, equations.equation.Equation.dimensions, equations.euler.Euler.dimensions, equations.swe.SWE_W_Bathymetry.dimensions, equations.swe.SWE_WO_Bathymetry.dimensions, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.F, exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.unknowns, exahype2.symhype.PDE.PDE.unknowns, peano4.visualisation.input.Patch.Patch.unknowns, peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknowns, and convert::data::Variable.unknowns.

Here is the call graph for this function:

◆ implementation_of_max_eigenvalue()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_max_eigenvalue ( self,
invoke_evalf_before_output = False,
use_absolute_values = True )

Return maximum eigenvalue.

Definition at line 220 of file FirstOrderConservativePDEFormulation.py.

References exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.dimensions, exahype2.symhype.PDE.PDE.dimensions, peano4.visualisation.input.PatchFileParser.UnknownAttributes.dimensions, peano4.visualisation.input.PatchFileParser.PatchFileParser.dimensions, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, mghype.api.matrixgenerators.DLinear.DLinear.dimensions, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions, mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.dimensions, mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.dimensions, equations.acoustic.Acoustic.dimensions, equations.advection.Advection.dimensions, equations.elastic.Elastic.dimensions, equations.equation.Equation.dimensions, equations.euler.Euler.dimensions, equations.swe.SWE_W_Bathymetry.dimensions, equations.swe.SWE_WO_Bathymetry.dimensions, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.eigenvalues, equations.equation.Equation.eigenvalues(), equations.acoustic.Acoustic.eigenvalues(), equations.advection.Advection.eigenvalues(), equations.elastic.Elastic.eigenvalues(), equations.euler.Euler.eigenvalues(), equations.swe.SWE_W_Bathymetry.eigenvalues(), equations.swe.SWE_WO_Bathymetry.eigenvalues(), exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.unknowns, exahype2.symhype.PDE.PDE.unknowns, peano4.visualisation.input.Patch.Patch.unknowns, peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknowns, and convert::data::Variable.unknowns.

Here is the call graph for this function:

◆ implementation_of_ncp()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_ncp ( self,
invoke_evalf_before_output = False )

Return implementation for nonconservative product (ncp) along one coordinate axis (d) as C code.

invoke_evalf_before_output: boolean If your expression is a symbolic expression (default) then we use evalf before we pipe it into the output. If your expression is something numeric, then evalf will fail (as it is not defined for scalar quantities).

Definition at line 144 of file FirstOrderConservativePDEFormulation.py.

References exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.dimensions, exahype2.symhype.PDE.PDE.dimensions, peano4.visualisation.input.PatchFileParser.UnknownAttributes.dimensions, peano4.visualisation.input.PatchFileParser.PatchFileParser.dimensions, convert::data::PatchData.dimensions, convert::data::Variable.dimensions, mghype.api.matrixgenerators.DLinear.DLinear.dimensions, mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.dimensions, mghype.api.matrixgenerators.GaussLobatto.GaussLobatto.dimensions, mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.dimensions, mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.dimensions, equations.acoustic.Acoustic.dimensions, equations.advection.Advection.dimensions, equations.elastic.Elastic.dimensions, equations.equation.Equation.dimensions, equations.euler.Euler.dimensions, equations.swe.SWE_W_Bathymetry.dimensions, equations.swe.SWE_WO_Bathymetry.dimensions, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.ncp, equations.equation.Equation.ncp(), equations.swe.SWE_W_Bathymetry.ncp(), exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.unknowns, exahype2.symhype.PDE.PDE.unknowns, peano4.visualisation.input.Patch.Patch.unknowns, peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknowns, and convert::data::Variable.unknowns.

Here is the call graph for this function:

◆ implementation_of_sources()

◆ LaTeX()

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.LaTeX ( self)

Definition at line 61 of file FirstOrderConservativePDEFormulation.py.

References exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.eigenvalues, equations.equation.Equation.eigenvalues(), equations.acoustic.Acoustic.eigenvalues(), equations.advection.Advection.eigenvalues(), equations.elastic.Elastic.eigenvalues(), equations.euler.Euler.eigenvalues(), equations.swe.SWE_W_Bathymetry.eigenvalues(), equations.swe.SWE_WO_Bathymetry.eigenvalues(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.F, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.ncp, equations.equation.Equation.ncp(), equations.swe.SWE_W_Bathymetry.ncp(), exahype2.symhype.PDE.PDE.Q, exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.sources, exahype2.solvers.aderdg.ADERDG.ADERDG.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.unknowns, exahype2.symhype.PDE.PDE.unknowns, peano4.visualisation.input.Patch.Patch.unknowns, peano4.visualisation.input.PatchFileParser.UnknownAttributes.unknowns, and convert::data::Variable.unknowns.

Here is the call graph for this function:

◆ substitute_expression()

Field Documentation

◆ dimensions

exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.dimensions

Definition at line 98 of file FirstOrderConservativePDEFormulation.py.

Referenced by peano4.visualisation.input.PatchFileParser.PatchFileParser.__parse_meta_data_region(), peano4.visualisation.input.PatchFileParser.PatchFileParser.__parse_patch_region(), exahype2.symhype.PDE.PDE._implementation_of_mapping_onto_named_quantities(), peano4.visualisation.input.PatchFileParser.UnknownAttributes._initialise_default_mapping_if_no_mapping_specified(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.convert_index_to_dim(), equations.euler.Euler.eigenvalues(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.eval_integral(), equations.elastic.Elastic.flux(), equations.euler.Euler.flux(), mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.get_boundary_matrix(), mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.get_cell_from_face_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_identity_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_mass_matrix(), mghype.api.matrixgenerators.DLinear.DLinear.get_cell_system_matrix_for_laplacian(), mghype.api.matrixgenerators.DLinearMassIdentity.DLinearMassIdentity.get_cell_system_matrix_for_laplacian(), api.solvers.DiscontinuousGalerkinDiscretisation.AssemblePetscMatrix.get_constructor_body(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_deriv(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_points_for_dimension(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_polynomial(), mghype.api.matrixgenerators.GaussLobatto.GLMatrixFree.get_projection_matrices(), mghype.api.matrixgenerators.MatrixGenerator.MatrixGenerator.get_weights_for_dimension(), matrices.DgGenerator.getCellToFaceMatrix(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_eigenvalues(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_flux(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_max_eigenvalue(), exahype2.symhype.FirstOrderConservativePDEFormulation.FirstOrderConservativePDEFormulation.implementation_of_ncp(), and peano4.visualisation.input.PatchFileParser.PatchFileParser.parse_file().

◆ eigenvalues

◆ F

◆ ncp

◆ sources

◆ unknowns


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