Peano
Loading...
Searching...
No Matches
solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks Class Reference

DG solver adding tasks to baseline code. More...

Inheritance diagram for solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks:
Collaboration diagram for solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks:

Public Member Functions

 __init__ (self, name, dimensions, poly_degree, unknowns_per_cell_node, solutions_per_face_node, projections_per_face_node, min_h, max_h, assembly_matrix, assembly_matrix_scaling, mass_matrix, mass_matrix_scaling, face_from_cell_projection, face_from_cell_projection_scaling, cell_from_face_projection, cell_from_face_projection_scaling, riemann_matrix, boundary_matrix, cell_relaxation, face_relaxation, approximate_system_matrix, approximate_system_matrix_scaling, integration_points, solver_tolerance, custom_init_actionset=None, custom_plot_actionset=None, custom_init_cell="", enable_plotting=True, plot_predicate="true", solver_includes="")
 add_to_init_solution (self, observer)
 See superclass' constructor.
 add_to_solve (self, observer)
 add_to_Peano4_datamodel (self, datamodel, verbose)
 add_use_statements (self, observer)
 This routine should still be called even if overwritten in child class.
Public Member Functions inherited from solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver
 __init__ (self, name, dimensions, poly_degree, unknowns_per_cell_node, solutions_per_face_node, projections_per_face_node, min_h, max_h, assembly_matrix, assembly_matrix_scaling, mass_matrix, mass_matrix_scaling, face_from_cell_projection, face_from_cell_projection_scaling, cell_from_face_projection, cell_from_face_projection_scaling, riemann_matrix, boundary_matrix, cell_relaxation, face_relaxation, approximate_system_matrix, approximate_system_matrix_scaling, integration_points, solver_tolerance, custom_init_actionset=None, custom_plot_actionset=None, custom_init_cell="", enable_plotting=True, plot_predicate="true", solver_includes="", use_smart_pointer=True, track_solution_between_cycles=False)
 Construct the solver.
Public Member Functions inherited from solvers.api.Solver.Solver
 __init__ (self, name, min_h, max_h)
 typename (self)
 instance_name (self)
 Return the name of the object that will be created for this solver.
 create_readme_descriptor (self)
 add_to_abstract_solver (self, header, implementation)
 add_to_vertex_data (self, name, size)
 Add in extra attributes on the fly.
 add_to_cell_data (self, name, size)
 Add in extra attributes on the fly.
 add_to_face_data (self, name, size)
 Add in extra attributes on the fly.
 name (self)
 __str__ (self)

Protected Attributes

str _task_name = self._name + "DGTaskMarker"
 _cell_marker_for_tasks = peano4.api.toolbox.api.EnumerateCellsAndVertices.create_cell_marker(self._task_name)
 _action_set_project_into_cell_and_update_cell_solution = ProjectIntoCellAndUpdateCellSolutionWithTasks(self, self._action_set_project_into_cell_and_update_cell_solution.descend_invocation_order, False)
 _action_set_update_residual = UpdateResidualWithTasks(self, self._action_set_update_residual.descend_invocation_order, False)
Protected Attributes inherited from solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver
 _dimensions = dimensions
 _poly_degree = poly_degree
 _unknowns_per_cell_node = unknowns_per_cell_node
 _solutions_per_face_node = solutions_per_face_node
 _projections_per_face_node = projections_per_face_node
 _assembly_matrix = assembly_matrix
 _assembly_matrix_scaling = assembly_matrix_scaling
 _mass_matrix = mass_matrix
 _mass_matrix_scaling = mass_matrix_scaling
 _face_from_cell_projection = face_from_cell_projection
 _face_from_cell_projection_scaling = face_from_cell_projection_scaling
 _cell_from_face_projection = cell_from_face_projection
 _cell_from_face_projection_scaling = cell_from_face_projection_scaling
 _riemann_matrix = riemann_matrix
 _boundary_matrix = boundary_matrix
 _approximate_system_matrix = approximate_system_matrix
 _approximate_system_matrix_scaling = approximate_system_matrix_scaling
 _cell_relaxation = cell_relaxation
 _face_relaxation = face_relaxation
 _solver_tolerance = solver_tolerance
 _solver_includes = solver_includes
 _custom_init_actionset = custom_init_actionset
 _custom_plot_actionset = custom_plot_actionset
 _custom_init_cell = custom_init_cell
 _enable_plotting = enable_plotting
 _plot_predicate = plot_predicate
 _integration_points = integration_points
 _track_solution_between_cycles = track_solution_between_cycles
 _unknowns_per_cell = unknowns_per_cell_node * ( poly_degree + 1) ** dimensions
tuple _unknowns_per_face_solution = ( solutions_per_face_node) * ( poly_degree + 1) ** (dimensions-1)
tuple _unknowns_per_face_projection = (2 * projections_per_face_node) * ( poly_degree + 1) ** (dimensions-1)
 _use_smart_pointer = use_smart_pointer
Protected Attributes inherited from solvers.api.Solver.Solver
 _name = name
 _vertex_data = peano4.api.datamodel.DaStGen2( name )
 _face_data = peano4.api.datamodel.DaStGen2( name )
 _cell_data = peano4.api.datamodel.DaStGen2( name )
str _abstract_solver_header_extras = """ """
str _abstract_solver_implementation_extras = """ """

Additional Inherited Members

Data Fields inherited from solvers.api.Solver.Solver
 min_h = min_h
 max_h = max_h

Detailed Description

DG solver adding tasks to baseline code.

See the documentation for solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver first. The class adds a few simple features:

  1. We create a cell marker which holds the task numbers.
  2. This one is added to the mesh within add_to_Peano4_datamodel().
  3. We tell both the mesh initialisation and each solve step to use the data.
  4. We swap out the residual computation and the cell update with a bespoke task-based implementation

Definition at line 21 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

Constructor & Destructor Documentation

◆ __init__()

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.__init__ ( self,
name,
dimensions,
poly_degree,
unknowns_per_cell_node,
solutions_per_face_node,
projections_per_face_node,
min_h,
max_h,
assembly_matrix,
assembly_matrix_scaling,
mass_matrix,
mass_matrix_scaling,
face_from_cell_projection,
face_from_cell_projection_scaling,
cell_from_face_projection,
cell_from_face_projection_scaling,
riemann_matrix,
boundary_matrix,
cell_relaxation,
face_relaxation,
approximate_system_matrix,
approximate_system_matrix_scaling,
integration_points,
solver_tolerance,
custom_init_actionset = None,
custom_plot_actionset = None,
custom_init_cell = "",
enable_plotting = True,
plot_predicate = "true",
solver_includes = "" )

Definition at line 37 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

References __init__().

Referenced by __init__().

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

Member Function Documentation

◆ add_to_init_solution()

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.add_to_init_solution ( self,
observer )

See superclass' constructor.

We ask the superclass to add all of its action sets to the project's observer. After that, we add our own action set to the algorithm step.

Definition at line 115 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

References _task_name, and add_to_init_solution().

Referenced by add_to_init_solution().

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

◆ add_to_Peano4_datamodel()

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.add_to_Peano4_datamodel ( self,
datamodel,
verbose )

Reimplemented from solvers.api.Solver.Solver.

Definition at line 134 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

References _cell_marker_for_tasks, and add_to_Peano4_datamodel().

Referenced by add_to_Peano4_datamodel().

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

◆ add_to_solve()

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.add_to_solve ( self,
observer )

Definition at line 129 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

References _task_name, and add_to_solve().

Referenced by add_to_solve().

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

◆ add_use_statements()

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.add_use_statements ( self,
observer )

This routine should still be called even if overwritten in child class.

Reimplemented from solvers.api.Solver.Solver.

Definition at line 139 of file DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.py.

References _cell_marker_for_tasks, and add_use_statements().

Referenced by add_use_statements().

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

Field Documentation

◆ _action_set_project_into_cell_and_update_cell_solution

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks._action_set_project_into_cell_and_update_cell_solution = ProjectIntoCellAndUpdateCellSolutionWithTasks(self, self._action_set_project_into_cell_and_update_cell_solution.descend_invocation_order, False)
protected

◆ _action_set_update_residual

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks._action_set_update_residual = UpdateResidualWithTasks(self, self._action_set_update_residual.descend_invocation_order, False)
protected

◆ _cell_marker_for_tasks

solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Tasks._cell_marker_for_tasks = peano4.api.toolbox.api.EnumerateCellsAndVertices.create_cell_marker(self._task_name)
protected

◆ _task_name


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