Peano
Loading...
Searching...
No Matches
DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.py
Go to the documentation of this file.
1"""
2 This file is part of the MGHyPE project within Peano 4. For conditions of distribution and
3 use, please see the copyright notice at www.peano-framework.org
4"""
5import peano4.api
7import dastgen2
8import os
9import jinja2
10
11from .Solver import Solver
12from .DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver import DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver
13
14from .actionsets.InitHigherOrderDofs import InitHigherOrderDofs
15from .actionsets.DGSolver.UpdateResidual import UpdateResidual
16from .actionsets.DGSolver.ProjectOntoFaces import ProjectOntoFaces
17from .actionsets.DGSolver.ProjectIntoCellAndUpdateCellSolution import ProjectIntoCellAndUpdateCellSolution
18from .actionsets.PlotDGDataInPeanoBlockFormat import PlotDGDataInPeanoBlockFormat
19
20
22 """!
23
24 Simple solver which maps the DG steps onto separate mesh traversals
25
26 This Python class is a mere wrapper without any funtionality. The interesting
27 stuff happens in the template file that is used for this variant, i.e.
28 DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.Abstract.template.h
29 and
30 DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted.Abstract.template.cpp.
31 These files introduce a marker toggling mechnanism, where a marker always
32 runs through the three steps
33
34 - ProjectOntoFaces
35 - ComputeNumericalFlux
36 - UpdateCell
37
38 and hence ensures that we actually traverse the mesh three times before we
39 actually have a new solution.
40
41 """
42 def __init__(self,
43 name,
44 dimensions,
45 poly_degree,
46 unknowns_per_cell_node,
47 solutions_per_face_node,
48 projections_per_face_node,
49 min_h,
50 max_h,
51 assembly_matrix,
52 assembly_matrix_scaling,
53 mass_matrix,
54 mass_matrix_scaling,
55 face_from_cell_projection,
56 face_from_cell_projection_scaling,
57 cell_from_face_projection,
58 cell_from_face_projection_scaling,
59 riemann_matrix,
60 boundary_matrix,
61 cell_relaxation,
62 face_relaxation,
63 approximate_system_matrix,
64 approximate_system_matrix_scaling,
65 integration_points,
66 solver_tolerance,
67 custom_init_actionset = None,
68 custom_plot_actionset = None, # just pass in a list of tuples, one for the variable name and the other for the getter
69 custom_init_cell = "",
70 enable_plotting = True, # sometimes we want to disable standard plotting...,
71 plot_predicate = "true", # enable custom plotting behaviour
72 solver_includes = "",
73 use_smart_pointer = True
74 ):
75 super( DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver_Unshifted, self ).__init__(
76 name,
77 dimensions,
78 poly_degree,
79 unknowns_per_cell_node,
80 solutions_per_face_node,
81 projections_per_face_node,
82 min_h,
83 max_h,
84 assembly_matrix,
85 assembly_matrix_scaling,
86 mass_matrix,
87 mass_matrix_scaling,
88 face_from_cell_projection,
89 face_from_cell_projection_scaling,
90 cell_from_face_projection,
91 cell_from_face_projection_scaling,
92 riemann_matrix,
93 boundary_matrix,
94 cell_relaxation,
95 face_relaxation,
96 approximate_system_matrix,
97 approximate_system_matrix_scaling,
98 integration_points,
99 solver_tolerance,
100 custom_init_actionset,
101 custom_plot_actionset,
102 custom_init_cell,
103 enable_plotting,
104 plot_predicate,
105 solver_includes,
106 use_smart_pointer,
107 )
108
__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)
Construct the solver.