G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsFlowLinSystSolver_direct< T, MatOrder > Class Template Reference

Detailed Description

template<class T, int MatOrder>
class gismo::gsFlowLinSystSolver_direct< T, MatOrder >

Direct solver for linear systems inside the incompressible flow solvers (classes derived from gsFlowSolverBase).

Template Parameters
Tcoefficient type
MatOrdersparse matrix storage order (ColMajor/RowMajor)
+ Inheritance diagram for gsFlowLinSystSolver_direct< T, MatOrder >:
+ Collaboration diagram for gsFlowLinSystSolver_direct< T, MatOrder >:

Public Member Functions

virtual void applySolver (const gsSparseMatrix< T, MatOrder > &mat, const gsMatrix< T > &rhs, gsMatrix< T > &solution)
 Solve the linear system.
 
virtual void applySolver (const gsSparseMatrix< T, MatOrder > &mat, const gsMatrix< T > &rhs, gsMatrix< T > &solution, real_t alpha_u, real_t alpha_p, index_t usize, index_t pdofs)
 Solve the Navier–Stokes linear system with underrelaxation.
 
virtual const T getSolverSetupTime () const
 Returns the total time spent on linear solver setup.
 
virtual const T getSolveTime () const
 Returns the total time spent on solving of the linear systems.
 
 gsFlowLinSystSolver_direct (const gsFlowSolverParams< T > &params)
 Constructor.
 
virtual void setupSolver (const gsSparseMatrix< T, MatOrder > &mat)
 Setup the linear solver for a given matrix.
 

Protected Member Functions

stopwatchStart ()
 Start measuring time (decides whether to use gsStopwatch or MPI_Wtime)
 
stopwatchStop ()
 Stop measuring time (decides whether to use gsStopwatch or MPI_Wtime)
 

Member Function Documentation

◆ applySolver() [1/2]

template<class T , int MatOrder>
void applySolver ( const gsSparseMatrix< T, MatOrder > &  mat,
const gsMatrix< T > &  rhs,
gsMatrix< T > &  solution 
)
virtual

Solve the linear system.

Parameters
[out]solutiona reference to the vector, where the computed solution will be stored

Reimplemented from gsFlowLinSystSolver< T, MatOrder >.

◆ applySolver() [2/2]

template<class T , int MatOrder>
void applySolver ( const gsSparseMatrix< T, MatOrder > &  mat,
const gsMatrix< T > &  rhs,
gsMatrix< T > &  solution,
real_t  alpha_u,
real_t  alpha_p,
index_t  usize,
index_t  pdofs 
)
virtualinherited

Solve the Navier–Stokes linear system with underrelaxation.

Parameters
[in]mata const reference to the system matrix
[in]rhsa const reference to the system right-hand side
[out]solutiona reference to the vector, where the computed solution will be stored
[in]alpha_uvelocity relaxation parameter
[in]alpha_ppressure relaxation parameter
[in]usizesize of the velocity part of the system
[in]pdofsnumber of pressure DOFs