|
Peano
|
Matrix-free Collocated Solver for higher order polynomials. More...


Public Member Functions | |
| __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. | |
| add_to_plot (self, observer) | |
| Tell the project's observer how to plot the data. | |
| add_to_create_grid (self, observer) | |
| add_to_init_solution (self, observer) | |
| Solution initialisation. | |
| add_to_solve (self, observer) | |
| add_implementation_files_to_project (self, namespace, output, subdirectory="", abstract_overwrite=True) | |
| The solver creates two classes: An abstract base class and its implementations. | |
| Public Member Functions inherited from solvers.api.Solver.Solver | |
| __init__ (self, name, min_h, max_h) | |
| add_to_Peano4_datamodel (self, datamodel, verbose) | |
| add_use_statements (self, observer) | |
| This routine should still be called even if overwritten in child class. | |
| 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) | |
Data Fields | |
| preprocessing_action_set = None | |
| postprocessing_action_set = None | |
| Data Fields inherited from solvers.api.Solver.Solver | |
| min_h = min_h | |
| max_h = max_h | |
Protected Member Functions | |
| _construct_narrow_to_interior_matrix (self) | |
| Construct the matrix which basically picks out the interior points. | |
Protected Attributes | |
| int | _dimensions = dimensions |
| _polynomial_degree = polynomial_degree | |
| _unknowns_per_cell_node = unknowns_per_node | |
| _assembly_matrix = assembly_matrix | |
| _assembly_matrix_scaling = assembly_matrix_scaling | |
| _mass_matrix = mass_matrix | |
| _mass_matrix_scaling = mass_matrix_scaling | |
| _cell_relaxation = cell_relaxation | |
| _face_relaxation = face_relaxation | |
| _solver_tolerance = solver_tolerance | |
| _custom_init_actionset = custom_init_actionset | |
| _custom_plot_actionset = custom_plot_actionset | |
| _custom_init_cell = custom_init_cell | |
| # true by default | _enable_plotting = enable_plotting |
| _plot_predicate = plot_predicate | |
| _integration_points = integration_points | |
| _degrees_of_freedom_per_cell = unknowns_per_node * ( polynomial_degree + 1) ** dimensions | |
| _degrees_of_freedom_per_face = unknowns_per_node * ( polynomial_degree + 1) ** (dimensions-1) | |
| _inner_degrees_of_freedom_per_cell = unknowns_per_node * ( polynomial_degree - 1) ** dimensions | |
| int | _basic_descend_order = 0 |
| 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 = """ """ |
Matrix-free Collocated Solver for higher order polynomials.
This continuous Galerkin p-method works with Gauss-Lobatto nodes only, as we employ a block smoother.
Definition at line 17 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.__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.
| integration_points | [Float] Sequence of polynomial_degree+1 entries which identify the position of the integration points along the unit interval. |
Definition at line 27 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References __init__().
Referenced by __init__().


|
protected |
Construct the matrix which basically picks out the interior points.
Definition at line 144 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References api.Project.Project._dimensions, convert::input::PeanoTextPatchFileReader._dimensions, exahype2.api.dslhype.SyntaxTree.Matrix._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._dimensions, exahype2.api.dslhype.SyntaxTree.Subscript._dimensions, exahype2.api.dslhype.SyntaxTree.TDataBlock._dimensions, exahype2.api.dslhype.SyntaxTree.TSimpleMemref._dimensions, exahype2.api.Project.Project._dimensions, exaparty.api.Project.Project._dimensions, _dimensions, _polynomial_degree, and _unknowns_per_cell_node.
Referenced by add_implementation_files_to_project().

| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_implementation_files_to_project | ( | self, | |
| namespace, | |||
| output, | |||
| subdirectory = "", | |||
| abstract_overwrite = True ) |
The solver creates two classes: An abstract base class and its implementations.
The abstract base class will be overwritten if there is one in the directory. I pipe all the Python constants into this base class, so they are available in the C++ code.
Definition at line 201 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References peano4.api.output.ActionSet.ActionSet.__class__, peano4.api.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.__class__, peano4.api.output.TemplatedHeaderFile.TemplatedHeaderFile.__class__, solvers.api.Solver.Solver._abstract_solver_header_extras, solvers.api.Solver.Solver._abstract_solver_implementation_extras, _assembly_matrix, _assembly_matrix_scaling, _cell_relaxation, _construct_narrow_to_interior_matrix(), _custom_init_cell, _degrees_of_freedom_per_cell, _degrees_of_freedom_per_face, api.Project.Project._dimensions, convert::input::PeanoTextPatchFileReader._dimensions, exahype2.api.dslhype.SyntaxTree.Matrix._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._dimensions, exahype2.api.dslhype.SyntaxTree.Subscript._dimensions, exahype2.api.dslhype.SyntaxTree.TDataBlock._dimensions, exahype2.api.dslhype.SyntaxTree.TSimpleMemref._dimensions, exahype2.api.Project.Project._dimensions, exaparty.api.Project.Project._dimensions, _dimensions, _face_relaxation, _inner_degrees_of_freedom_per_cell, _integration_points, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._mass_matrix, solvers.api.CollocatedMG.CollocatedMG._mass_matrix, _mass_matrix, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._mass_matrix_scaling, solvers.api.CollocatedMG.CollocatedMG._mass_matrix_scaling, _mass_matrix_scaling, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, exahype2.api.Solver.Solver._name, solvers.api.Solver.Solver._name, _polynomial_degree, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._solver_tolerance, solvers.api.CollocatedMG.CollocatedMG._solver_tolerance, _solver_tolerance, _unknowns_per_cell_node, exaparty.api.particle.Particle.Particle.max_h, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi.max_h, solvers.api.CollocatedMG.CollocatedMG.max_h, max_h, exaparty.api.particle.Particle.Particle.min_h, solvers.api.Solver.Solver.min_h, and solvers.api.Solver.Solver.typename().

| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_to_create_grid | ( | self, | |
| observer ) |
Definition at line 125 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_to_init_solution | ( | self, | |
| observer ) |
Solution initialisation.
We can either use the standard initialisation procedure or pass in another one when we instantiate this solver class.
Definition at line 129 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._custom_init_actionset, and _custom_init_actionset.
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_to_plot | ( | self, | |
| observer ) |
Tell the project's observer how to plot the data.
Nothing fancy here. We add plotters from Peano's toolbox to visualise solution and right-hand side.
Definition at line 106 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._custom_plot_actionset, _custom_plot_actionset, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._enable_plotting, _enable_plotting, solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._plot_predicate, solvers.api.CollocatedMG.CollocatedMG._plot_predicate, and _plot_predicate.
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_to_solve | ( | self, | |
| observer ) |
Definition at line 185 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
References solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi._basic_descend_order, solvers.api.CollocatedMG.CollocatedMG._basic_descend_order, and _basic_descend_order.
|
protected |
Definition at line 67 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 68 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 103 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_to_solve().
|
protected |
Definition at line 72 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 77 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_to_init_solution().
|
protected |
Definition at line 80 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 78 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_to_plot().
|
protected |
Definition at line 88 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 89 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 63 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by _construct_narrow_to_interior_matrix(), add_implementation_files_to_project(), scenarios.elastic_planar_waves.ElasticPlanarWaves.analytical_solution(), tarch.plotter.api.output.Visualiser.PatchFileData.apply_renderer_to_data(), scenarios.elastic_planar_waves.ElasticPlanarWaves.initial_conditions(), and scenarios.scenario.Scenario.set_global_simulation_parameters().
|
protected |
Definition at line 82 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_to_plot().
|
protected |
Definition at line 73 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 90 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 85 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 69 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 70 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 83 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_to_plot().
|
protected |
Definition at line 64 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by _construct_narrow_to_interior_matrix(), and add_implementation_files_to_project().
|
protected |
Definition at line 75 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by add_implementation_files_to_project().
|
protected |
Definition at line 65 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
Referenced by _construct_narrow_to_interior_matrix(), and add_implementation_files_to_project().
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.postprocessing_action_set = None |
Definition at line 101 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.
| solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.preprocessing_action_set = None |
Definition at line 100 of file ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.py.