Peano
Loading...
Searching...
No Matches
solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling Class Reference

Introduce additive CC Coupling. More...

Inheritance diagram for solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling:
Collaboration diagram for solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling:

Public Member Functions

 __init__ (self, dg_solver, cg_solver, prolongation_matrix, prolongation_matrix_scaling, restriction_matrix, restriction_matrix_scaling, injection_matrix, injection_matrix_scaling, use_fas, smoothing_steps_per_cycle=1)
 get_attributes (self)
 Add a new static attribute to the class.
 get_static_initialisations (self, full_qualified_classname)
 Initialise the new counter.
 get_body_of_prepareTraversal (self)
Public Member Functions inherited from solvers.api.actionsets.DGCGCoupling.AbstractDGCGCoupling
 __init__ (self, dg_solver, cg_solver, prolongation_matrix, prolongation_matrix_scaling, restriction_matrix, restriction_matrix_scaling, injection_matrix, injection_matrix_scaling, use_fas)
 Construct action set.
 get_body_of_operation (self, operation_name)
 Return actual C++ code snippets to be inserted into C++ code.
 get_action_set_name (self)
 Configure name of generated C++ action set.
 user_should_modify_template (self)
 The action set that Peano will generate that corresponds to this class should not be modified by users and can safely be overwritten every time we run the Python toolkit.
 get_includes (self)
 We need the solver repository in this action set, as we directly access the solver object.
Public Member Functions inherited from peano4.solversteps.ActionSet.ActionSet
 __init__ (self, descend_invocation_order=0, parallel=False)
 get_constructor_body (self)
 Define a tailored constructor body.
 get_destructor_body (self)
 get_body_of_getGridControlEvents (self)
 get_body_of_unprepareTraversal (self)

Additional Inherited Members

Data Fields inherited from solvers.api.actionsets.DGCGCoupling.AbstractDGCGCoupling
dict d = {}
Data Fields inherited from peano4.solversteps.ActionSet.ActionSet
 descend_invocation_order = descend_invocation_order
 parallel = parallel
Static Public Attributes inherited from solvers.api.actionsets.DGCGCoupling.AbstractDGCGCoupling
str templateTouchCellFirstTime
Static Public Attributes inherited from peano4.solversteps.ActionSet.ActionSet
str OPERATION_BEGIN_TRAVERSAL = "beginTraversal"
str OPERATION_END_TRAVERSAL = "endTraversal"
str OPERATION_CREATE_PERSISTENT_VERTEX = "createPersistentVertex"
str OPERATION_DESTROY_PERSISTENT_VERTEX = "destroyPersistentVertex"
str OPERATION_CREATE_HANGING_VERTEX = "createHangingVertex"
str OPERATION_DESTROY_HANGING_VERTEX = "destroyHangingVertex"
str OPERATION_CREATE_PERSISTENT_FACE = "createPersistentFace"
str OPERATION_DESTROY_PERSISTENT_FACE = "destroyPersistentFace"
str OPERATION_CREATE_HANGING_FACE = "createHangingFace"
str OPERATION_DESTROY_HANGING_FACE = "destroyHangingFace"
str OPERATION_CREATE_CELL = "createCell"
str OPERATION_DESTROY_CELL = "destroyCell"
str OPERATION_TOUCH_VERTEX_FIRST_TIME = "touchVertexFirstTime"
str OPERATION_TOUCH_VERTEX_LAST_TIME = "touchVertexLastTime"
str OPERATION_TOUCH_FACE_FIRST_TIME = "touchFaceFirstTime"
str OPERATION_TOUCH_FACE_LAST_TIME = "touchFaceLastTime"
str OPERATION_TOUCH_CELL_FIRST_TIME = "touchCellFirstTime"
str OPERATION_TOUCH_CELL_LAST_TIME = "touchCellLastTime"
Protected Attributes inherited from solvers.api.actionsets.DGCGCoupling.AbstractDGCGCoupling
 _use_fas = use_fas

Detailed Description

Introduce additive CC Coupling.

The control logic here is simplistic and prescripted. We follow the following steps for the additive solver with one iteration:

  1. Pre step
    • Interpolate correction, i.e. sum all the hierarchies up. This happens in touchCellFirstTime().
    • Compute and restrict residual and inject solution (if FAS). This happens in touchCellLastTime().
    • Suspend both solvers, but let DG solver project its solution onto the faces.
  2. Compute step
    • All solvers compute.
    • DG solver can project solution onto faces.
    • Return to step 1.

Nothing stops us from repeating the step (2) multiple times, which gives us the opportunity to play around with various multigrid schemes. If we are in the last sweep of (2), the projection onto the faces of the DG solver is not necessary. We'll overwrite this solution a minute later anyway.

Realisation

This action set will map onto a class of its own. We give the class a class attribute which we increment by one in each step. We then make the actual logic depend upon this counter, as we inject the predicates into the superclass: That is, the superclass has some boolean expressions which allow us to switch its features on and off. We make those guys depends upon the new counter.

Definition at line 529 of file DGCGCoupling.py.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ get_attributes()

solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling.get_attributes ( self)

Add a new static attribute to the class.

Reimplemented from peano4.solversteps.ActionSet.ActionSet.

Definition at line 596 of file DGCGCoupling.py.

◆ get_body_of_prepareTraversal()

solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling.get_body_of_prepareTraversal ( self)

Reimplemented from peano4.solversteps.ActionSet.ActionSet.

Definition at line 616 of file DGCGCoupling.py.

◆ get_static_initialisations()

solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling.get_static_initialisations ( self,
full_qualified_classname )

Initialise the new counter.

Reimplemented from peano4.solversteps.ActionSet.ActionSet.

Definition at line 607 of file DGCGCoupling.py.


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