IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
IBTK::CCPoissonPETScLevelSolver Class Reference

Class CCPoissonPETScLevelSolver is a concrete PETScLevelSolver for solving elliptic equations of the form \( \mbox{$L u$} = \mbox{$(C I + \nabla \cdot D \nabla) u$} = f \) on a single SAMRAI::hier::PatchLevel. More...

#include <ibtk/CCPoissonPETScLevelSolver.h>

Inheritance diagram for IBTK::CCPoissonPETScLevelSolver:
Inheritance graph
[legend]

Public Member Functions

 CCPoissonPETScLevelSolver (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, std::string default_options_prefix)
 Constructor. More...
 
 ~CCPoissonPETScLevelSolver ()
 Destructor. More...
 
void setKSPType (const std::string &ksp_type)
 Set the KSP type. More...
 
void setOptionsPrefix (const std::string &options_prefix)
 Set the options prefix used by this PETSc solver object. More...
 
const KSP & getPETScKSP () const
 Get the PETSc KSP object. More...
 
void getASMSubdomains (std::vector< IS > **nonoverlapping_subdomains, std::vector< IS > **overlapping_subdomains)
 Get ASM subdomains. More...
 
virtual void setPoissonSpecifications (const SAMRAI::solv::PoissonSpecifications &poisson_spec)
 Set the SAMRAI::solv::PoissonSpecifications object used to specify the coefficients for the scalar-valued or vector-valued Laplace operator. More...
 
virtual void setPhysicalBcCoef (SAMRAI::solv::RobinBcCoefStrategy< NDIM > *bc_coef)
 Set the SAMRAI::solv::RobinBcCoefStrategy object used to specify physical boundary conditions. More...
 
virtual void setPhysicalBcCoefs (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &bc_coefs)
 Set the SAMRAI::solv::RobinBcCoefStrategy objects used to specify physical boundary conditions. More...
 

Static Public Member Functions

static SAMRAI::tbox::Pointer< PoissonSolverallocate_solver (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const std::string &default_options_prefix)
 Static function to construct a CCPoissonPETScLevelSolver. More...
 

Protected Member Functions

void generateASMSubdomains (std::vector< std::set< int > > &overlap_is, std::vector< std::set< int > > &nonoverlap_is) override
 Generate IS/subdomains for Schwartz type preconditioners. More...
 
void initializeSolverStateSpecialized (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override
 Compute hierarchy dependent data required for solving \(Ax=b\). More...
 
void deallocateSolverStateSpecialized () override
 Remove all hierarchy dependent data allocated by initializeSolverStateSpecialized(). More...
 
void copyToPETScVec (Vec &petsc_x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x) override
 Copy a generic vector to the PETSc representation. More...
 
void copyFromPETScVec (Vec &petsc_x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x) override
 Copy a generic vector from the PETSc representation. More...
 
void setupKSPVecs (Vec &petsc_x, Vec &petsc_b, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override
 Copy solution and right-hand-side data to the PETSc representation, including any modifications to account for boundary conditions. More...
 
void initSpecialized (const std::string &object_name, bool homogeneous_bc) override
 

Protected Attributes

SAMRAI::solv::PoissonSpecifications d_poisson_spec = SAMRAI::solv::PoissonSpecifications("")
 
std::unique_ptr< SAMRAI::solv::RobinBcCoefStrategy< NDIM > > d_default_bc_coef
 
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_bc_coefs
 

Private Member Functions

 CCPoissonPETScLevelSolver ()=delete
 Default constructor. More...
 
 CCPoissonPETScLevelSolver (const CCPoissonPETScLevelSolver &from)=delete
 Copy constructor. More...
 
CCPoissonPETScLevelSolveroperator= (const CCPoissonPETScLevelSolver &that)=delete
 Assignment operator. More...
 

Private Attributes

PETSc objects.
SAMRAI::tbox::Pointer< SAMRAI::hier::VariableContextd_context
 
std::vector< intd_num_dofs_per_proc
 
int d_dof_index_idx = IBTK::invalid_index
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, int > > d_dof_index_var
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > d_data_synch_sched
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > d_ghost_fill_sched
 

Functions to access solver parameters.

virtual void setMaxIterations (int max_iterations)
 Set the maximum number of nonlinear iterations to use per solve. More...
 
virtual int getMaxIterations () const
 Get the maximum number of nonlinear iterations to use per solve. More...
 
virtual void setAbsoluteTolerance (double abs_residual_tol)
 Set the absolute residual tolerance for convergence. More...
 
virtual double getAbsoluteTolerance () const
 Get the absolute residual tolerance for convergence. More...
 
virtual void setRelativeTolerance (double rel_residual_tol)
 Set the relative residual tolerance for convergence. More...
 
virtual double getRelativeTolerance () const
 Get the relative residual tolerance for convergence. More...
 

Logging functions.

virtual void setLoggingEnabled (bool enable_logging=true)
 Enable or disable logging. More...
 
virtual bool getLoggingEnabled () const
 Determine whether logging is enabled or disabled. More...
 
void init (const std::string &object_name, bool homogeneous_bc)
 
virtual void initSpecialized (const std::string &object_name, bool homogeneous_bc)
 
std::string d_object_name = "unitialized"
 
bool d_is_initialized = false
 
bool d_homogeneous_bc = false
 
double d_solution_time = std::numeric_limits<double>::quiet_NaN()
 
double d_current_time = std::numeric_limits<double>::quiet_NaN()
 
double d_new_time = std::numeric_limits<double>::quiet_NaN()
 
double d_rel_residual_tol = 0.0
 
double d_abs_residual_tol = 0.0
 
int d_max_iterations = 100
 
int d_current_iterations = 0
 
double d_current_residual_norm = std::numeric_limits<double>::quiet_NaN()
 
SAMRAI::tbox::Pointer< HierarchyMathOpsd_hier_math_ops
 
bool d_hier_math_ops_external = false
 
bool d_enable_logging = false
 

Functions to access solver parameters.

virtual void setInitialGuessNonzero (bool initial_guess_nonzero=true)
 Set whether the initial guess is non-zero. More...
 
virtual bool getInitialGuessNonzero () const
 Get whether the initial guess is non-zero. More...
 

Logging functions.

virtual void printClassData (std::ostream &stream) override
 Print class data to stream. More...
 
bool d_initial_guess_nonzero = true
 
bool d_nullspace_contains_constant_vec = false
 
std::vector< SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > > d_nullspace_basis_vecs
 

Linear solver functionality.

void setNullSpace (bool contains_constant_vec, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > > &nullspace_basis_vecs=std::vector< SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > >()) override
 Set the nullspace of the linear system. More...
 
bool solveSystem (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override
 Solve the linear system of equations \(Ax=b\) for \(x\). More...
 
void initializeSolverState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override
 Compute hierarchy dependent data required for solving \(Ax=b\). More...
 
void deallocateSolverState () override
 Remove all hierarchy dependent data allocated by initializeSolverState(). More...
 
void init (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const std::string &default_options_prefix)
 Basic initialization. More...
 
virtual void generateFieldSplitSubdomains (std::vector< std::string > &field_names, std::vector< std::set< int > > &field_is)
 Generate IS/subdomains for fieldsplit type preconditioners. More...
 
virtual void setupNullSpace ()
 Setup the solver nullspace (if any). More...
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 Associated hierarchy. More...
 
int d_level_num = IBTK::invalid_level_number
 Associated patch level and C-F boundary (for level numbers > 0). More...
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > d_level
 
SAMRAI::tbox::Pointer< SAMRAI::hier::CoarseFineBoundary< NDIM > > d_cf_boundary
 
SAMRAIDataCache d_cached_eulerian_data
 Scratch data. More...
 

Field split preconditioner.

std::vector< std::string > d_field_name
 
std::vector< IS > d_field_is
 
static PetscErrorCode PCApply_Additive (PC pc, Vec x, Vec y)
 Apply the preconditioner to x and store the result in y. More...
 
static PetscErrorCode PCApply_Multiplicative (PC pc, Vec x, Vec y)
 Apply the preconditioner to x and store the result in y. More...
 
static PetscErrorCode PCApply_RedBlackMultiplicative (PC pc, Vec x, Vec y)
 Apply the preconditioner to x and store the result in y. More...
 

Detailed Description

This solver class uses the PETSc library to solve linear equations of the form \( (C I + \nabla \cdot D \nabla ) u = f \), where \(C\) and \(D\) are scalars, and \(u\) and \(f\) are cell-centered arrays. The discretization is second-order accurate.

Robin boundary conditions may be specified through the interface class SAMRAI::solv::RobinBcCoefStrategy.

The user must perform the following steps to use class CCPoissonPETScLevelSolver:

  1. Create a CCPoissonPETScLevelSolver object.
  2. Set the problem specification via setPoissonSpecifications(), setPhysicalBcCoef(), and setHomogeneousBc().
  3. Initialize CCPoissonPETScLevelSolver object using the function initializeSolverState().
  4. Solve the linear system using the member function solveSystem(), passing in SAMRAI::solv::SAMRAIVectorReal objects corresponding to \(u\) and \(f\).

Sample parameters for initialization from database (and their default values):

options_prefix = ""           // see setOptionsPrefix()
ksp_type = "gmres"            // see setKSPType()
initial_guess_nonzero = TRUE  // see setInitialGuessNonzero()
rel_residual_tol = 1.0e-5     // see setRelativeTolerance()
abs_residual_tol = 1.0e-50    // see setAbsoluteTolerance()
max_iterations = 10000        // see setMaxIterations()
enable_logging = FALSE        // see setLoggingEnabled()

PETSc is developed at the Argonne National Laboratory Mathematics and Computer Science Division. For more information about PETSc, see http://www.mcs.anl.gov/petsc/petsc-as.

Constructor & Destructor Documentation

◆ CCPoissonPETScLevelSolver() [1/3]

IBTK::CCPoissonPETScLevelSolver::CCPoissonPETScLevelSolver ( const std::string &  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
std::string  default_options_prefix 
)

◆ ~CCPoissonPETScLevelSolver()

IBTK::CCPoissonPETScLevelSolver::~CCPoissonPETScLevelSolver ( )

◆ CCPoissonPETScLevelSolver() [2/3]

IBTK::CCPoissonPETScLevelSolver::CCPoissonPETScLevelSolver ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ CCPoissonPETScLevelSolver() [3/3]

IBTK::CCPoissonPETScLevelSolver::CCPoissonPETScLevelSolver ( const CCPoissonPETScLevelSolver from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ allocate_solver()

static SAMRAI::tbox::Pointer<PoissonSolver> IBTK::CCPoissonPETScLevelSolver::allocate_solver ( const std::string &  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
const std::string &  default_options_prefix 
)
inlinestatic

◆ generateASMSubdomains()

void IBTK::CCPoissonPETScLevelSolver::generateASMSubdomains ( std::vector< std::set< int > > &  overlap_is,
std::vector< std::set< int > > &  nonoverlap_is 
)
overrideprotectedvirtual

Reimplemented from IBTK::PETScLevelSolver.

◆ initializeSolverStateSpecialized()

void IBTK::CCPoissonPETScLevelSolver::initializeSolverStateSpecialized ( const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  b 
)
overrideprotectedvirtual

◆ deallocateSolverStateSpecialized()

void IBTK::CCPoissonPETScLevelSolver::deallocateSolverStateSpecialized ( )
overrideprotectedvirtual

◆ copyToPETScVec()

void IBTK::CCPoissonPETScLevelSolver::copyToPETScVec ( Vec &  petsc_x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x 
)
overrideprotectedvirtual

◆ copyFromPETScVec()

void IBTK::CCPoissonPETScLevelSolver::copyFromPETScVec ( Vec &  petsc_x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x 
)
overrideprotectedvirtual

◆ setupKSPVecs()

void IBTK::CCPoissonPETScLevelSolver::setupKSPVecs ( Vec &  petsc_x,
Vec &  petsc_b,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  b 
)
overrideprotectedvirtual

◆ operator=()

CCPoissonPETScLevelSolver& IBTK::CCPoissonPETScLevelSolver::operator= ( const CCPoissonPETScLevelSolver that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ setKSPType()

void IBTK::PETScLevelSolver::setKSPType ( const std::string &  ksp_type)
inherited

◆ setOptionsPrefix()

void IBTK::PETScLevelSolver::setOptionsPrefix ( const std::string &  options_prefix)
inherited

◆ getPETScKSP()

const KSP& IBTK::PETScLevelSolver::getPETScKSP ( ) const
inherited

◆ getASMSubdomains()

void IBTK::PETScLevelSolver::getASMSubdomains ( std::vector< IS > **  nonoverlapping_subdomains,
std::vector< IS > **  overlapping_subdomains 
)
inherited

◆ setNullSpace()

void IBTK::PETScLevelSolver::setNullSpace ( bool  contains_constant_vec,
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > > &  nullspace_basis_vecs = std::vector< SAMRAI::tbox::PointerSAMRAI::solv::SAMRAIVectorReal< NDIM, double > > >() 
)
overridevirtualinherited

Reimplemented from IBTK::LinearSolver.

◆ solveSystem()

bool IBTK::PETScLevelSolver::solveSystem ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  b 
)
overridevirtualinherited

Before calling solveSystem(), the form of the solution x and right-hand-side b vectors must be set properly by the user on all patch interiors on the specified range of levels in the patch hierarchy. The user is responsible for all data management for the quantities associated with the solution and right-hand-side vectors. In particular, patch data in these vectors must be allocated prior to calling this method.

Parameters
xsolution vector
bright-hand-side vector

Conditions on Parameters:

  • vectors x and b must have same patch hierarchy
  • vectors x and b must have same structure, depth, etc.
Note
The vector arguments for solveSystem() need not match those for initializeSolverState(). However, there must be a certain degree of similarity, including:
  • hierarchy configuration (hierarchy pointer and range of levels)
  • number, type and alignment of vector component data
  • ghost cell widths of data in the solution x and right-hand-side b vectors
Note
The solver need not be initialized prior to calling solveSystem(); however, see initializeSolverState() and deallocateSolverState() for opportunities to save overhead when performing multiple consecutive solves.
See also
initializeSolverState
deallocateSolverState
Returns
true if the solver converged to the specified tolerances, false otherwise

Implements IBTK::GeneralSolver.

◆ initializeSolverState()

void IBTK::PETScLevelSolver::initializeSolverState ( const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  b 
)
overridevirtualinherited

By default, the solveSystem() method computes some required hierarchy dependent data before solving and removes that data after the solve. For multiple solves that use the same hierarchy configuration, it is more efficient to:

  1. initialize the hierarchy-dependent data required by the solver via initializeSolverState(),
  2. solve the system one or more times via solveSystem(), and
  3. remove the hierarchy-dependent data via deallocateSolverState().

Note that it is generally necessary to reinitialize the solver state when the hierarchy configuration changes.

Parameters
xsolution vector
bright-hand-side vector

Conditions on Parameters:

  • vectors x and b must have same patch hierarchy
  • vectors x and b must have same structure, depth, etc.
Note
The vector arguments for solveSystem() need not match those for initializeSolverState(). However, there must be a certain degree of similarity, including:
  • hierarchy configuration (hierarchy pointer and range of levels)
  • number, type and alignment of vector component data
  • ghost cell widths of data in the solution x and right-hand-side b vectors
Note
It is safe to call initializeSolverState() when the state is already initialized. In this case, the solver state is first deallocated and then reinitialized.
Subclasses of class PETScLevelSolver should not override this method. Instead, they should override the protected method initializeSolverStateSpecialized().
See also
deallocateSolverState

Reimplemented from IBTK::GeneralSolver.

◆ deallocateSolverState()

void IBTK::PETScLevelSolver::deallocateSolverState ( )
overridevirtualinherited
Note
It is safe to call deallocateSolverState() when the solver state is already deallocated.
Subclasses of class PETScLevelSolver should not override this method. Instead, they should override the protected method deallocatedSolverStateSpecialized().
See also
initializeSolverState

Reimplemented from IBTK::GeneralSolver.

◆ init() [1/2]

void IBTK::PETScLevelSolver::init ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
const std::string &  default_options_prefix 
)
protectedinherited

◆ init() [2/2]

void IBTK::GeneralSolver::init ( const std::string &  object_name,
bool  homogeneous_bc 
)
protectedinherited

◆ generateFieldSplitSubdomains()

virtual void IBTK::PETScLevelSolver::generateFieldSplitSubdomains ( std::vector< std::string > &  field_names,
std::vector< std::set< int > > &  field_is 
)
protectedvirtualinherited

◆ setupNullSpace()

virtual void IBTK::PETScLevelSolver::setupNullSpace ( )
protectedvirtualinherited

◆ PCApply_Additive()

static PetscErrorCode IBTK::PETScLevelSolver::PCApply_Additive ( PC  pc,
Vec  x,
Vec  y 
)
staticprivateinherited

◆ PCApply_Multiplicative()

static PetscErrorCode IBTK::PETScLevelSolver::PCApply_Multiplicative ( PC  pc,
Vec  x,
Vec  y 
)
staticprivateinherited

◆ PCApply_RedBlackMultiplicative()

static PetscErrorCode IBTK::PETScLevelSolver::PCApply_RedBlackMultiplicative ( PC  pc,
Vec  x,
Vec  y 
)
staticprivateinherited

◆ getNullSpaceContainsConstantVector()

virtual bool IBTK::LinearSolver::getNullSpaceContainsConstantVector ( ) const
virtualinherited

◆ getNullSpaceBasisVectors()

virtual const std::vector<SAMRAI::tbox::Pointer<SAMRAI::solv::SAMRAIVectorReal<NDIM, double> > >& IBTK::LinearSolver::getNullSpaceBasisVectors ( ) const
virtualinherited

◆ setInitialGuessNonzero()

virtual void IBTK::LinearSolver::setInitialGuessNonzero ( bool  initial_guess_nonzero = true)
virtualinherited

◆ getInitialGuessNonzero()

virtual bool IBTK::LinearSolver::getInitialGuessNonzero ( ) const
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ printClassData()

virtual void IBTK::LinearSolver::printClassData ( std::ostream &  stream)
overridevirtualinherited

Reimplemented from IBTK::GeneralSolver.

◆ getName()

const std::string& IBTK::GeneralSolver::getName ( ) const
inherited

◆ getIsInitialized()

virtual bool IBTK::GeneralSolver::getIsInitialized ( ) const
virtualinherited

◆ setHomogeneousBc()

virtual void IBTK::GeneralSolver::setHomogeneousBc ( bool  homogeneous_bc)
virtualinherited

◆ getHomogeneousBc()

virtual bool IBTK::GeneralSolver::getHomogeneousBc ( ) const
virtualinherited

◆ setSolutionTime()

virtual void IBTK::GeneralSolver::setSolutionTime ( double  solution_time)
virtualinherited

◆ getSolutionTime()

virtual double IBTK::GeneralSolver::getSolutionTime ( ) const
virtualinherited

◆ setTimeInterval()

virtual void IBTK::GeneralSolver::setTimeInterval ( double  current_time,
double  new_time 
)
virtualinherited

◆ getTimeInterval()

virtual std::pair<double, double> IBTK::GeneralSolver::getTimeInterval ( ) const
virtualinherited

◆ getDt()

virtual double IBTK::GeneralSolver::getDt ( ) const
virtualinherited

◆ setHierarchyMathOps()

virtual void IBTK::GeneralSolver::setHierarchyMathOps ( SAMRAI::tbox::Pointer< HierarchyMathOps hier_math_ops)
virtualinherited

◆ getHierarchyMathOps()

virtual SAMRAI::tbox::Pointer<HierarchyMathOps> IBTK::GeneralSolver::getHierarchyMathOps ( ) const
virtualinherited

◆ setMaxIterations()

virtual void IBTK::GeneralSolver::setMaxIterations ( int  max_iterations)
virtualinherited

◆ getMaxIterations()

virtual int IBTK::GeneralSolver::getMaxIterations ( ) const
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ setAbsoluteTolerance()

virtual void IBTK::GeneralSolver::setAbsoluteTolerance ( double  abs_residual_tol)
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ getAbsoluteTolerance()

virtual double IBTK::GeneralSolver::getAbsoluteTolerance ( ) const
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ setRelativeTolerance()

virtual void IBTK::GeneralSolver::setRelativeTolerance ( double  rel_residual_tol)
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ getRelativeTolerance()

virtual double IBTK::GeneralSolver::getRelativeTolerance ( ) const
virtualinherited

Reimplemented in IBTK::PETScPCLSWrapper.

◆ getNumIterations()

virtual int IBTK::GeneralSolver::getNumIterations ( ) const
virtualinherited

◆ getResidualNorm()

virtual double IBTK::GeneralSolver::getResidualNorm ( ) const
virtualinherited

◆ setLoggingEnabled()

virtual void IBTK::GeneralSolver::setLoggingEnabled ( bool  enable_logging = true)
virtualinherited

◆ getLoggingEnabled()

virtual bool IBTK::GeneralSolver::getLoggingEnabled ( ) const
virtualinherited

◆ initSpecialized() [1/2]

virtual void IBTK::GeneralSolver::initSpecialized ( const std::string &  object_name,
bool  homogeneous_bc 
)
protectedvirtualinherited

Reimplemented in IBTK::PoissonSolver.

◆ setPoissonSpecifications()

virtual void IBTK::PoissonSolver::setPoissonSpecifications ( const SAMRAI::solv::PoissonSpecifications poisson_spec)
virtualinherited

◆ setPhysicalBcCoef()

virtual void IBTK::PoissonSolver::setPhysicalBcCoef ( SAMRAI::solv::RobinBcCoefStrategy< NDIM > *  bc_coef)
virtualinherited
Note
bc_coef may be nullptr. In this case, default boundary conditions (as supplied to the class constructor) are employed.
Parameters
bc_coefPointer to an object that can set the Robin boundary condition coefficients

Reimplemented in IBTK::PoissonFACPreconditioner, and IBTK::KrylovLinearSolverPoissonSolverInterface.

◆ setPhysicalBcCoefs()

virtual void IBTK::PoissonSolver::setPhysicalBcCoefs ( const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  bc_coefs)
virtualinherited
Note
Any of the elements of bc_coefs may be nullptr. In this case, default boundary conditions (as supplied to the class constructor) are employed for that data depth.
Parameters
bc_coefsVector of pointers to objects that can set the Robin boundary condition coefficients

Reimplemented in IBTK::PoissonFACPreconditioner, and IBTK::KrylovLinearSolverPoissonSolverInterface.

◆ initSpecialized() [2/2]

void IBTK::PoissonSolver::initSpecialized ( const std::string &  object_name,
bool  homogeneous_bc 
)
overrideprotectedvirtualinherited

Reimplemented from IBTK::GeneralSolver.

Member Data Documentation

◆ d_context

SAMRAI::tbox::Pointer<SAMRAI::hier::VariableContext> IBTK::CCPoissonPETScLevelSolver::d_context
private

◆ d_num_dofs_per_proc

std::vector<int> IBTK::CCPoissonPETScLevelSolver::d_num_dofs_per_proc
private

◆ d_dof_index_idx

int IBTK::CCPoissonPETScLevelSolver::d_dof_index_idx = IBTK::invalid_index
private

◆ d_dof_index_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, int> > IBTK::CCPoissonPETScLevelSolver::d_dof_index_var
private

◆ d_data_synch_sched

SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineSchedule<NDIM> > IBTK::CCPoissonPETScLevelSolver::d_data_synch_sched
private

◆ d_ghost_fill_sched

SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineSchedule<NDIM> > IBTK::CCPoissonPETScLevelSolver::d_ghost_fill_sched
private

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBTK::PETScLevelSolver::d_hierarchy
protectedinherited

◆ d_level_num

int IBTK::PETScLevelSolver::d_level_num = IBTK::invalid_level_number
protectedinherited

◆ d_level

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchLevel<NDIM> > IBTK::PETScLevelSolver::d_level
protectedinherited

◆ d_cf_boundary

SAMRAI::tbox::Pointer<SAMRAI::hier::CoarseFineBoundary<NDIM> > IBTK::PETScLevelSolver::d_cf_boundary
protectedinherited

◆ d_cached_eulerian_data

SAMRAIDataCache IBTK::PETScLevelSolver::d_cached_eulerian_data
protectedinherited

◆ d_ksp_type

std::string IBTK::PETScLevelSolver::d_ksp_type = KSPGMRES
protectedinherited

◆ d_pc_type

std::string IBTK::PETScLevelSolver::d_pc_type = PCILU
protectedinherited

◆ d_shell_pc_type

std::string IBTK::PETScLevelSolver::d_shell_pc_type
protectedinherited

◆ d_options_prefix

std::string IBTK::PETScLevelSolver::d_options_prefix
protectedinherited

◆ d_petsc_ksp

KSP IBTK::PETScLevelSolver::d_petsc_ksp = nullptr
protectedinherited

◆ d_petsc_mat

Mat IBTK::PETScLevelSolver::d_petsc_mat = nullptr
protectedinherited

◆ d_petsc_pc

Mat IBTK::PETScLevelSolver::d_petsc_pc = nullptr
protectedinherited

◆ d_petsc_nullsp

MatNullSpace IBTK::PETScLevelSolver::d_petsc_nullsp
protectedinherited

◆ d_petsc_x

Vec IBTK::PETScLevelSolver::d_petsc_x = nullptr
protectedinherited

◆ d_petsc_b

Vec IBTK::PETScLevelSolver::d_petsc_b = nullptr
protectedinherited

◆ d_local_x

Vec IBTK::PETScLevelSolver::d_local_x
protectedinherited

◆ d_local_y

Vec IBTK::PETScLevelSolver::d_local_y
protectedinherited

◆ d_box_size

SAMRAI::hier::IntVector<NDIM> IBTK::PETScLevelSolver::d_box_size
protectedinherited

◆ d_overlap_size

SAMRAI::hier::IntVector<NDIM> IBTK::PETScLevelSolver::d_overlap_size
protectedinherited

◆ d_n_local_subdomains

int IBTK::PETScLevelSolver::d_n_local_subdomains
protectedinherited

◆ d_n_subdomains_max

int IBTK::PETScLevelSolver::d_n_subdomains_max
protectedinherited

◆ d_overlap_is

std::vector<IS> IBTK::PETScLevelSolver::d_overlap_is
protectedinherited

◆ d_nonoverlap_is

std::vector<IS> IBTK::PETScLevelSolver::d_nonoverlap_is
protectedinherited

◆ d_local_overlap_is

std::vector<IS> IBTK::PETScLevelSolver::d_local_overlap_is
protectedinherited

◆ d_local_nonoverlap_is

std::vector<IS> IBTK::PETScLevelSolver::d_local_nonoverlap_is
protectedinherited

◆ d_restriction

std::vector<VecScatter> IBTK::PETScLevelSolver::d_restriction
protectedinherited

◆ d_prolongation

std::vector<VecScatter> IBTK::PETScLevelSolver::d_prolongation
protectedinherited

◆ d_sub_ksp

std::vector<KSP> IBTK::PETScLevelSolver::d_sub_ksp
protectedinherited

◆ d_sub_mat

Mat* IBTK::PETScLevelSolver::d_sub_mat
protectedinherited

◆ d_sub_bc_mat

Mat * IBTK::PETScLevelSolver::d_sub_bc_mat
protectedinherited

◆ d_sub_x

std::vector<Vec> IBTK::PETScLevelSolver::d_sub_x
protectedinherited

◆ d_sub_y

std::vector<Vec> IBTK::PETScLevelSolver::d_sub_y
protectedinherited

◆ d_field_name

std::vector<std::string> IBTK::PETScLevelSolver::d_field_name
protectedinherited

◆ d_field_is

std::vector<IS> IBTK::PETScLevelSolver::d_field_is
protectedinherited

◆ d_initial_guess_nonzero

bool IBTK::LinearSolver::d_initial_guess_nonzero = true
protectedinherited

◆ d_nullspace_contains_constant_vec

bool IBTK::LinearSolver::d_nullspace_contains_constant_vec = false
protectedinherited

◆ d_nullspace_basis_vecs

std::vector<SAMRAI::tbox::Pointer<SAMRAI::solv::SAMRAIVectorReal<NDIM, double> > > IBTK::LinearSolver::d_nullspace_basis_vecs
protectedinherited

◆ d_object_name

std::string IBTK::GeneralSolver::d_object_name = "unitialized"
protectedinherited

◆ d_is_initialized

bool IBTK::GeneralSolver::d_is_initialized = false
protectedinherited

◆ d_homogeneous_bc

bool IBTK::GeneralSolver::d_homogeneous_bc = false
protectedinherited

◆ d_solution_time

double IBTK::GeneralSolver::d_solution_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_current_time

double IBTK::GeneralSolver::d_current_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_new_time

double IBTK::GeneralSolver::d_new_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_rel_residual_tol

double IBTK::GeneralSolver::d_rel_residual_tol = 0.0
protectedinherited

◆ d_abs_residual_tol

double IBTK::GeneralSolver::d_abs_residual_tol = 0.0
protectedinherited

◆ d_max_iterations

int IBTK::GeneralSolver::d_max_iterations = 100
protectedinherited

◆ d_current_iterations

int IBTK::GeneralSolver::d_current_iterations = 0
protectedinherited

◆ d_current_residual_norm

double IBTK::GeneralSolver::d_current_residual_norm = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_hier_math_ops

SAMRAI::tbox::Pointer<HierarchyMathOps> IBTK::GeneralSolver::d_hier_math_ops
protectedinherited

◆ d_hier_math_ops_external

bool IBTK::GeneralSolver::d_hier_math_ops_external = false
protectedinherited

◆ d_enable_logging

bool IBTK::GeneralSolver::d_enable_logging = false
protectedinherited

◆ d_poisson_spec

SAMRAI::solv::PoissonSpecifications IBTK::PoissonSolver::d_poisson_spec = SAMRAI::solv::PoissonSpecifications("")
protectedinherited

◆ d_default_bc_coef

std::unique_ptr<SAMRAI::solv::RobinBcCoefStrategy<NDIM> > IBTK::PoissonSolver::d_default_bc_coef
protectedinherited

◆ d_bc_coefs

std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBTK::PoissonSolver::d_bc_coefs
protectedinherited

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