MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::SundialsSolver Class Reference

Base class for interfacing with SUNDIALS packages. More...

#include <sundials.hpp>

Inheritance diagram for mfem::SundialsSolver:
[legend]
Collaboration diagram for mfem::SundialsSolver:
[legend]

Public Member Functions

void * GetMem () const
 Access the SUNDIALS memory structure.
 
int GetFlag () const
 Returns the last flag returned by a call to a SUNDIALS function.
 

Protected Member Functions

bool Parallel () const
 
bool Parallel () const
 
 SundialsSolver ()
 Protected constructor: objects of this type should be constructed only as part of a derived class.
 
void AllocateEmptyNVector (N_Vector &y)
 
void AllocateEmptyNVector (N_Vector &y, MPI_Comm comm)
 

Protected Attributes

void * sundials_mem
 SUNDIALS mem structure.
 
int flag
 Last flag returned from a call to SUNDIALS.
 
bool reinit
 Flag to signal memory reinitialization is need.
 
long saved_global_size
 Global vector length on last initialization.
 
SundialsNVectorY
 State vector.
 
SUNMatrix A
 
SUNMatrix M
 Mass matrix M.
 
SUNLinearSolver LSA
 Linear solver for A.
 
SUNLinearSolver LSM
 Linear solver for M.
 
SUNNonlinearSolver NLS
 Nonlinear solver.
 

Static Protected Attributes

static constexpr double default_rel_tol = 1e-4
 Default scalar relative tolerance.
 
static constexpr double default_abs_tol = 1e-9
 Default scalar absolute tolerance.
 

Detailed Description

Base class for interfacing with SUNDIALS packages.

Definition at line 329 of file sundials.hpp.

Constructor & Destructor Documentation

◆ SundialsSolver()

mfem::SundialsSolver::SundialsSolver ( )
inlineprotected

Protected constructor: objects of this type should be constructed only as part of a derived class.

Definition at line 359 of file sundials.hpp.

Member Function Documentation

◆ AllocateEmptyNVector() [1/2]

void mfem::SundialsSolver::AllocateEmptyNVector ( N_Vector & y)
protected

◆ AllocateEmptyNVector() [2/2]

void mfem::SundialsSolver::AllocateEmptyNVector ( N_Vector & y,
MPI_Comm comm )
protected

◆ GetFlag()

int mfem::SundialsSolver::GetFlag ( ) const
inline

Returns the last flag returned by a call to a SUNDIALS function.

Definition at line 376 of file sundials.hpp.

◆ GetMem()

void * mfem::SundialsSolver::GetMem ( ) const
inline

Access the SUNDIALS memory structure.

Definition at line 373 of file sundials.hpp.

◆ Parallel() [1/2]

bool mfem::SundialsSolver::Parallel ( ) const
inlineprotected

Definition at line 346 of file sundials.hpp.

◆ Parallel() [2/2]

bool mfem::SundialsSolver::Parallel ( ) const
inlineprotected

Definition at line 349 of file sundials.hpp.

Member Data Documentation

◆ A

SUNMatrix mfem::SundialsSolver::A
protected

Linear system A = I - gamma J, M - gamma J, or J.

Definition at line 338 of file sundials.hpp.

◆ default_abs_tol

double mfem::SundialsSolver::default_abs_tol = 1e-9
staticconstexprprotected

Default scalar absolute tolerance.

Definition at line 355 of file sundials.hpp.

◆ default_rel_tol

double mfem::SundialsSolver::default_rel_tol = 1e-4
staticconstexprprotected

Default scalar relative tolerance.

Definition at line 353 of file sundials.hpp.

◆ flag

int mfem::SundialsSolver::flag
mutableprotected

Last flag returned from a call to SUNDIALS.

Definition at line 333 of file sundials.hpp.

◆ LSA

SUNLinearSolver mfem::SundialsSolver::LSA
protected

Linear solver for A.

Definition at line 341 of file sundials.hpp.

◆ LSM

SUNLinearSolver mfem::SundialsSolver::LSM
protected

Linear solver for M.

Definition at line 342 of file sundials.hpp.

◆ M

SUNMatrix mfem::SundialsSolver::M
protected

Mass matrix M.

Definition at line 340 of file sundials.hpp.

◆ NLS

SUNNonlinearSolver mfem::SundialsSolver::NLS
protected

Nonlinear solver.

Definition at line 343 of file sundials.hpp.

◆ reinit

bool mfem::SundialsSolver::reinit
protected

Flag to signal memory reinitialization is need.

Definition at line 334 of file sundials.hpp.

◆ saved_global_size

long mfem::SundialsSolver::saved_global_size
protected

Global vector length on last initialization.

Definition at line 335 of file sundials.hpp.

◆ sundials_mem

void* mfem::SundialsSolver::sundials_mem
protected

SUNDIALS mem structure.

Definition at line 332 of file sundials.hpp.

◆ Y

SundialsNVector* mfem::SundialsSolver::Y
protected

State vector.

Definition at line 337 of file sundials.hpp.


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