ASPECT
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree > Class Template Reference
Inheritance diagram for aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >:
Inheritance graph
[legend]

Public Member Functions

 StokesMatrixFreeHandlerImplementation (Simulator< dim > &, ParameterHandler &prm)
 
 ~StokesMatrixFreeHandlerImplementation () override=default
 
std::pair< double, double > solve () override
 
void setup_dofs () override
 
void evaluate_material_model () override
 
void correct_stokes_rhs () override
 
void build_preconditioner () override
 
double get_workload_imbalance ()
 
- Public Member Functions inherited from aspect::StokesMatrixFreeHandler< dim >
virtual ~StokesMatrixFreeHandler ()=default
 

Static Public Member Functions

static void declare_parameters (ParameterHandler &prm)
 
- Static Public Member Functions inherited from aspect::StokesMatrixFreeHandler< dim >
static void declare_parameters (ParameterHandler &prm)
 

Private Types

typedef MatrixFreeStokesOperators::StokesOperator< dim, velocity_degree, double > StokesMatrixType
 
typedef MatrixFreeStokesOperators::MassMatrixOperator< dim, velocity_degree-1, double > SchurComplementMatrixType
 
typedef MatrixFreeStokesOperators::ABlockOperator< dim, velocity_degree, double > ABlockMatrixType
 

Private Member Functions

void parse_parameters (ParameterHandler &prm)
 

Private Attributes

Simulator< dim > & sim
 
DoFHandler< dim > dof_handler_v
 
DoFHandler< dim > dof_handler_p
 
DoFHandler< dim > dof_handler_projection
 
FESystem< dim > stokes_fe
 
FESystem< dim > fe_v
 
FESystem< dim > fe_p
 
FESystem< dim > fe_projection
 
StokesMatrixType stokes_matrix
 
ABlockMatrixType A_block_matrix
 
SchurComplementMatrixType Schur_complement_block_matrix
 
ConstraintMatrix constraints_v
 
ConstraintMatrix constraints_p
 
ConstraintMatrix constraints_projection
 
MGLevelObject< ABlockMatrixTypemg_matrices_A_block
 
MGLevelObject< SchurComplementMatrixTypemg_matrices_Schur_complement
 
MGConstrainedDoFs mg_constrained_dofs_A_block
 
MGConstrainedDoFs mg_constrained_dofs_Schur_complement
 
MGConstrainedDoFs mg_constrained_dofs_projection
 
::LinearAlgebra::distributed::Vector< double > active_coef_dof_vec
 
MGLevelObject<::LinearAlgebra::distributed::Vector< double > > level_coef_dof_vec
 
MGTransferMatrixFree< dim, double > mg_transfer_A_block
 
MGTransferMatrixFree< dim, double > mg_transfer_Schur_complement
 

Detailed Description

template<int dim, int velocity_degree>
class aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >

Main class of the Matrix-free method. Here are all the functions for setup, assembly and solving the Stokes system.

We need to derive from StokesMatrixFreeHandler to be able to introduce a second template argument for the degree of the Stokes finite element. This way, the main simulator does not need to know about the degree by using a pointer to the base class and we can pick the desired velocity degree at runtime.

Definition at line 103 of file simulator.h.

Member Typedef Documentation

§ StokesMatrixType

template<int dim, int velocity_degree>
typedef MatrixFreeStokesOperators::StokesOperator<dim,velocity_degree,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::StokesMatrixType
private

Definition at line 427 of file stokes_matrix_free.h.

§ SchurComplementMatrixType

template<int dim, int velocity_degree>
typedef MatrixFreeStokesOperators::MassMatrixOperator<dim,velocity_degree-1,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::SchurComplementMatrixType
private

Definition at line 428 of file stokes_matrix_free.h.

§ ABlockMatrixType

template<int dim, int velocity_degree>
typedef MatrixFreeStokesOperators::ABlockOperator<dim,velocity_degree,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::ABlockMatrixType
private

Definition at line 429 of file stokes_matrix_free.h.

Constructor & Destructor Documentation

§ StokesMatrixFreeHandlerImplementation()

template<int dim, int velocity_degree>
aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::StokesMatrixFreeHandlerImplementation ( Simulator< dim > &  ,
ParameterHandler prm 
)

Initialize this class, allowing it to read in relevant parameters as well as giving it a reference to the Simulator that owns it, since it needs to make fairly extensive changes to the internals of the simulator.

§ ~StokesMatrixFreeHandlerImplementation()

template<int dim, int velocity_degree>
aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::~StokesMatrixFreeHandlerImplementation ( )
overridedefault

Destructor.

Member Function Documentation

§ solve()

template<int dim, int velocity_degree>
std::pair<double,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::solve ( )
overridevirtual

Solves the Stokes linear system matrix-free. This is called by Simulator<dim>::solve_stokes().

Implements aspect::StokesMatrixFreeHandler< dim >.

§ setup_dofs()

template<int dim, int velocity_degree>
void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::setup_dofs ( )
overridevirtual

Allocates and sets up the members of the StokesMatrixFreeHandler. This is called by Simulator<dim>::setup_dofs()

Implements aspect::StokesMatrixFreeHandler< dim >.

§ evaluate_material_model()

template<int dim, int velocity_degree>
void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::evaluate_material_model ( )
overridevirtual

Evalute the MaterialModel to query for the viscosity on the active cells, project this viscosity to the multigrid hierarchy, and cache the information for later usage. Also sets pressure scaling and information regarding the compressiblity of the flow.

Implements aspect::StokesMatrixFreeHandler< dim >.

§ correct_stokes_rhs()

template<int dim, int velocity_degree>
void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::correct_stokes_rhs ( )
overridevirtual

Add correction to system RHS for non-zero boundary condition.

Implements aspect::StokesMatrixFreeHandler< dim >.

§ build_preconditioner()

template<int dim, int velocity_degree>
void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::build_preconditioner ( )
overridevirtual

Computes and sets the diagonal for both the mass matrix operator and the A-block operators on each level for the purpose of smoothing inside the multigrid v-cycle.

Implements aspect::StokesMatrixFreeHandler< dim >.

§ get_workload_imbalance()

template<int dim, int velocity_degree>
double aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::get_workload_imbalance ( )

Get the workload imbalance of the distribution of the level hierarchy.

§ declare_parameters()

template<int dim, int velocity_degree>
static void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::declare_parameters ( ParameterHandler prm)
static

Declare parameters. (No actual parameters at the moment).

§ parse_parameters()

template<int dim, int velocity_degree>
void aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::parse_parameters ( ParameterHandler prm)
private

Parse parameters. (No actual parameters at the moment).

Member Data Documentation

§ sim

template<int dim, int velocity_degree>
Simulator<dim>& aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::sim
private

Definition at line 416 of file stokes_matrix_free.h.

§ dof_handler_v

template<int dim, int velocity_degree>
DoFHandler<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::dof_handler_v
private

Definition at line 418 of file stokes_matrix_free.h.

§ dof_handler_p

template<int dim, int velocity_degree>
DoFHandler<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::dof_handler_p
private

Definition at line 419 of file stokes_matrix_free.h.

§ dof_handler_projection

template<int dim, int velocity_degree>
DoFHandler<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::dof_handler_projection
private

Definition at line 420 of file stokes_matrix_free.h.

§ stokes_fe

template<int dim, int velocity_degree>
FESystem<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::stokes_fe
private

Definition at line 422 of file stokes_matrix_free.h.

§ fe_v

template<int dim, int velocity_degree>
FESystem<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::fe_v
private

Definition at line 423 of file stokes_matrix_free.h.

§ fe_p

template<int dim, int velocity_degree>
FESystem<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::fe_p
private

Definition at line 424 of file stokes_matrix_free.h.

§ fe_projection

template<int dim, int velocity_degree>
FESystem<dim> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::fe_projection
private

Definition at line 425 of file stokes_matrix_free.h.

§ stokes_matrix

template<int dim, int velocity_degree>
StokesMatrixType aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::stokes_matrix
private

Definition at line 431 of file stokes_matrix_free.h.

§ A_block_matrix

template<int dim, int velocity_degree>
ABlockMatrixType aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::A_block_matrix
private

Definition at line 432 of file stokes_matrix_free.h.

§ Schur_complement_block_matrix

template<int dim, int velocity_degree>
SchurComplementMatrixType aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::Schur_complement_block_matrix
private

Definition at line 433 of file stokes_matrix_free.h.

§ constraints_v

template<int dim, int velocity_degree>
ConstraintMatrix aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::constraints_v
private

Definition at line 435 of file stokes_matrix_free.h.

§ constraints_p

template<int dim, int velocity_degree>
ConstraintMatrix aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::constraints_p
private

Definition at line 436 of file stokes_matrix_free.h.

§ constraints_projection

template<int dim, int velocity_degree>
ConstraintMatrix aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::constraints_projection
private

Definition at line 437 of file stokes_matrix_free.h.

§ mg_matrices_A_block

template<int dim, int velocity_degree>
MGLevelObject<ABlockMatrixType> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_matrices_A_block
private

Definition at line 439 of file stokes_matrix_free.h.

§ mg_matrices_Schur_complement

template<int dim, int velocity_degree>
MGLevelObject<SchurComplementMatrixType> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_matrices_Schur_complement
private

Definition at line 440 of file stokes_matrix_free.h.

§ mg_constrained_dofs_A_block

template<int dim, int velocity_degree>
MGConstrainedDoFs aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_constrained_dofs_A_block
private

Definition at line 442 of file stokes_matrix_free.h.

§ mg_constrained_dofs_Schur_complement

template<int dim, int velocity_degree>
MGConstrainedDoFs aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_constrained_dofs_Schur_complement
private

Definition at line 443 of file stokes_matrix_free.h.

§ mg_constrained_dofs_projection

template<int dim, int velocity_degree>
MGConstrainedDoFs aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_constrained_dofs_projection
private

Definition at line 444 of file stokes_matrix_free.h.

§ active_coef_dof_vec

template<int dim, int velocity_degree>
::LinearAlgebra::distributed::Vector<double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::active_coef_dof_vec
private

Definition at line 446 of file stokes_matrix_free.h.

§ level_coef_dof_vec

template<int dim, int velocity_degree>
MGLevelObject<::LinearAlgebra::distributed::Vector<double> > aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::level_coef_dof_vec
private

Definition at line 447 of file stokes_matrix_free.h.

§ mg_transfer_A_block

template<int dim, int velocity_degree>
MGTransferMatrixFree<dim,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_transfer_A_block
private

Definition at line 449 of file stokes_matrix_free.h.

§ mg_transfer_Schur_complement

template<int dim, int velocity_degree>
MGTransferMatrixFree<dim,double> aspect::StokesMatrixFreeHandlerImplementation< dim, velocity_degree >::mg_transfer_Schur_complement
private

Definition at line 450 of file stokes_matrix_free.h.


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