9from .Solver
import Solver
10from .actionsets.InitHigherOrderDofs
import InitHigherOrderDofs
11from .actionsets.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.UpdateCell
import UpdateCell
12from .actionsets.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.UpdateFacets
import UpdateFacets
13from .actionsets.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ProjectResidualsAndDiagonalOntoFacets
import ProjectResidualsAndDiagonalOntoFacets
14from .actionsets.PlotDGDataInPeanoBlockFormat
import PlotDGDataInPeanoBlockFormat
20 Matrix-free Collocated Solver for higher order polynomials.
22 This continuous Galerkin p-method works with Gauss-Lobatto nodes only, as we
23 employ a block smoother.
35 assembly_matrix_scaling,
41 face_relaxation = 0.6,
42 custom_init_actionset = None,
43 custom_plot_actionset = None,
44 custom_init_cell = "",
45 enable_plotting = True,
46 plot_predicate = "true"
52 @param integration_points: [Float]
53 Sequence of polynomial_degree+1 entries which identify the position of
54 the integration points along the unit interval.
57 super( ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi, self ).
__init__( name,
109 Tell the project's observer how to plot the data
111 Nothing fancy here. We add plotters from Peano's toolbox to visualise
112 solution and right-hand side.
132 Solution initialisation. We can either use the
133 standard initialisation procedure or pass in
134 another one when we instantiate this solver
147 Construct the matrix which basically picks out the interior points.
159 if (preimage_x-1==image_x
and
160 preimage_y-1==image_y
and
161 preimage_unknown==image_unknown):
162 result[-1].append( 1.0 )
164 result[-1].append( 0.0 )
175 if (preimage_x-1==image_x
and
176 preimage_y-1==image_y
and
177 preimage_z-1==image_z
and
178 preimage_unknown==image_unknown):
179 result[-1].append( 1.0 )
181 result[-1].append( 0.0 )
187 new_action_set.descend_invocation_order = observer.highest_descend_invocation_order() + self.
_basic_descend_order + 1
188 observer.add_action_set( new_action_set )
191 new_action_set.descend_invocation_order = observer.highest_descend_invocation_order() + self.
_basic_descend_order + 1
192 observer.add_action_set( new_action_set )
195 new_action_set.descend_invocation_order = observer.highest_descend_invocation_order() + self.
_basic_descend_order + 1
196 observer.add_action_set( new_action_set )
204 The solver creates two classes: An abstract base class and its
205 implementations. The abstract base class will be overwritten if
206 there is one in the directory. I pipe all the Python constants
207 into this base class, so they are available in the C++ code.
210 templatefile_prefix = os.path.dirname( os.path.realpath(__file__) ) +
"/templates/"
211 templatefile_prefix += self.__class__.__name__
217 "SOLVER_INCLUDES" :
"",
244 templatefile_prefix +
".Abstract.template.h",
245 templatefile_prefix +
".Abstract.template.cpp",
253 templatefile_prefix +
".template.h",
254 templatefile_prefix +
".template.cpp",
262 output.add( generated_abstract_header_file )
263 output.add( generated_solver_files )
264 output.makefile.add_h_file( subdirectory +
"Abstract" + self.
_name +
".h", generated=
True )
265 output.makefile.add_h_file( subdirectory + self.
_name +
".h", generated=
True )
266 output.makefile.add_cpp_file( subdirectory +
"Abstract" + self.
_name +
".cpp", generated=
True )
267 output.makefile.add_cpp_file( subdirectory + self.
_name +
".cpp", generated=
True )
Specialisation of array using Peano's tarch.
Matrix-free Collocated Solver for higher order polynomials.
add_to_init_solution(self, observer)
Solution initialisation.
_inner_degrees_of_freedom_per_cell
__init__(self, name, unknowns_per_node, dimensions, polynomial_degree, min_h, max_h, assembly_matrix, assembly_matrix_scaling, mass_matrix, mass_matrix_scaling, integration_points, solver_tolerance, cell_relaxation, face_relaxation=0.6, custom_init_actionset=None, custom_plot_actionset=None, custom_init_cell="", enable_plotting=True, plot_predicate="true" # enable custom plotting behaviour)
Construct solver.
_degrees_of_freedom_per_cell
add_to_solve(self, observer)
add_to_plot(self, observer)
Tell the project's observer how to plot the data.
_degrees_of_freedom_per_face
add_to_create_grid(self, observer)
_construct_narrow_to_interior_matrix(self)
Construct the matrix which basically picks out the interior points.
_abstract_solver_implementation_extras
add_implementation_files_to_project(self, namespace, output, subdirectory="", abstract_overwrite=True)
The solver creates two classes: An abstract base class and its implementations.
_abstract_solver_header_extras
postprocessing_action_set
Abstract base class for matrix free solvers.
_abstract_solver_header_extras
_abstract_solver_implementation_extras
Init the degrees of freedom of a higher order scheme where nodes sit in cells.