OGS
NumLib::EquationSystem Class Referenceabstract

Detailed Description

Collection of basic methods every equation system must provide.

Definition at line 30 of file EquationSystem.h.

#include <EquationSystem.h>

Inheritance diagram for NumLib::EquationSystem:
[legend]

Public Member Functions

virtual bool isLinear () const =0
 
virtual bool requiresNormalization () const =0
 
virtual void preIteration (const unsigned iter, GlobalVector const &x)
 
virtual IterationResult postIteration (GlobalVector const &x)
 
virtual MathLib::MatrixSpecifications getMatrixSpecifications (const int process_id) const =0
 
virtual ~EquationSystem ()=default
 

Constructor & Destructor Documentation

◆ ~EquationSystem()

virtual NumLib::EquationSystem::~EquationSystem ( )
virtualdefault

Member Function Documentation

◆ getMatrixSpecifications()

virtual MathLib::MatrixSpecifications NumLib::EquationSystem::getMatrixSpecifications ( const int process_id) const
pure virtual

◆ isLinear()

virtual bool NumLib::EquationSystem::isLinear ( ) const
pure virtual

Check whether this is actually a linear equation system.

Remarks
Depending on its parameters an in general nonlinear equation system can be linear in special cases. With this method it is possible to detect that at runtime and thus save some computations.

◆ postIteration()

virtual IterationResult NumLib::EquationSystem::postIteration ( GlobalVector const & x)
inlinevirtual

Post-processes an iteration in the solution process of this equation.

Parameters
xthe current approximate solution of the equation.
Returns
A status flag indicating id the current iteration succeeded.

Definition at line 68 of file EquationSystem.h.

69 {
70 (void)x; // by default do nothing
72 }

References NumLib::SUCCESS.

◆ preIteration()

virtual void NumLib::EquationSystem::preIteration ( const unsigned iter,
GlobalVector const & x )
inlinevirtual

Prepares a new iteration in the solution process of this equation.

Parameters
iterthe current iteration number, starting from 1.
xthe current approximate solution of the equation.

Definition at line 56 of file EquationSystem.h.

57 {
58 (void)iter;
59 (void)x; // by default do nothing
60 }

◆ requiresNormalization()

virtual bool NumLib::EquationSystem::requiresNormalization ( ) const
pure virtual

Check whether normalization of A and rhs is required.

Remarks
In some processes, a normalization operation is required, to calculate A^T * A, and overwrite A; also calculate A^T * rhs and overwrite rhs. This parameter reflect whether such operation is required.

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