PRISMS-PF Manual v3.0-pre
All Classes Functions Variables Enumerations Pages
linearSolverBase< dim, degree > Class Template Referenceabstract

Base class that handles the assembly and linear solving of a field. More...

#include <linear_solver_base.h>

Inheritance diagram for linearSolverBase< dim, degree >:
GMGSolver< dim, degree > identitySolver< dim, degree >

Public Types

using SystemMatrixType = customPDE< dim, degree, double >
 
using VectorType = dealii::LinearAlgebra::distributed::Vector< double >
 

Public Member Functions

 linearSolverBase (const userInputParameters< dim > &_user_inputs, const variableAttributes &_variable_attributes, const matrixfreeHandler< dim > &_matrix_free_handler, const constraintHandler< dim > &_constraint_handler, solutionHandler< dim > &_solution_handler)
 Constructor.
 
virtual ~linearSolverBase ()=default
 Destructor.
 
virtual void init ()=0
 Initialize the system.
 
virtual void reinit ()=0
 Reinitialize the system.
 
virtual void solve (const double step_length=1.0)=0
 Solve the system Ax=b.
 

Protected Member Functions

void compute_solver_tolerance ()
 Compute the solver tolerance based on the specified tolerance type.
 

Protected Attributes

const userInputParameters< dim > & user_inputs
 User-inputs.
 
const variableAttributesvariable_attributes
 Variable attributes for field.
 
const matrixfreeHandler< dim > & matrix_free_handler
 Matrix-free object handler for non-multigrid data.
 
const constraintHandler< dim > & constraint_handler
 Constraint handler.
 
solutionHandler< dim > & solution_handler
 Solution handler.
 
const unsigned int field_index
 The field index we are solving.
 
std::unordered_map< std::pair< unsigned int, dependencyType >, unsigned int, pairHashresidual_global_to_local_solution
 Mapping from global solution vectors to the local ones for the residual solve.
 
std::vector< VectorType * > residual_src
 Subset of fields that are necessary for the source of the residual solve.
 
VectorType * residual
 Residual vector.
 
std::unordered_map< std::pair< unsigned int, dependencyType >, unsigned int, pairHashnewton_update_global_to_local_solution
 Mapping from global solution vectors to the local ones for the newton update.
 
std::vector< VectorType * > newton_update_src
 Subset of fields that are necessary for the source of the newton update.
 
VectorType * newton_update
 Newton update vector.
 
std::unique_ptr< SystemMatrixTypesystem_matrix
 PDE operator for the residual side.
 
std::unique_ptr< SystemMatrixTypeupdate_system_matrix
 PDE operator for the newton update side.
 
std::map< unsigned int, variableAttributessubset_attributes
 Subset attributes.
 
dealii::SolverControl solver_control
 Solver control.
 
double tolerance = 0.0
 Solver tolerance.
 

Detailed Description

template<int dim, int degree>
class linearSolverBase< dim, degree >

Base class that handles the assembly and linear solving of a field.

Member Function Documentation

◆ init()

template<int dim, int degree>
virtual void linearSolverBase< dim, degree >::init ( )
pure virtual

Initialize the system.

Implemented in GMGSolver< dim, degree >, and identitySolver< dim, degree >.

◆ reinit()

template<int dim, int degree>
virtual void linearSolverBase< dim, degree >::reinit ( )
pure virtual

Reinitialize the system.

Implemented in GMGSolver< dim, degree >, and identitySolver< dim, degree >.

◆ solve()

template<int dim, int degree>
virtual void linearSolverBase< dim, degree >::solve ( const double  step_length = 1.0)
pure virtual

Solve the system Ax=b.

Implemented in GMGSolver< dim, degree >, and identitySolver< dim, degree >.


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