Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::PetscManager Class Reference

The PetscManager class handles the interaction with PETSc library. More...

Public Member Functions

 PetscManager ()
 
virtual ~PetscManager ()
 
void addInitOption (const std::string &option)
 
void addInitOptions (const std::vector< std::string > &options)
 
void addInitOptions (int argc, char **args)
 
bool areOptionsEditable () const
 
void clearInitOptions ()
 
bool finalize ()
 
bool initialize (bool debug)
 

Detailed Description

The PetscManager class handles the interaction with PETSc library.

Definition at line 232 of file system_solvers_large.hpp.

Constructor & Destructor Documentation

◆ PetscManager()

bitpit::PetscManager::PetscManager ( )

Constructor.

Definition at line 563 of file system_solvers_large.cpp.

◆ ~PetscManager()

bitpit::PetscManager::~PetscManager ( )
virtual

Destructor.

Definition at line 572 of file system_solvers_large.cpp.

Member Function Documentation

◆ addInitOption()

void bitpit::PetscManager::addInitOption ( const std::string & option)

Add an initialization option.

Parameters
optionis the option that will be added

Definition at line 482 of file system_solvers_large.cpp.

◆ addInitOptions() [1/2]

void bitpit::PetscManager::addInitOptions ( const std::vector< std::string > & options)

Add initialization options.

Parameters
optionsare the options that will be added

Definition at line 521 of file system_solvers_large.cpp.

◆ addInitOptions() [2/2]

void bitpit::PetscManager::addInitOptions ( int argc,
char ** argv )

Add initialization options.

Parameters
argcis a non-negative value representing the number of arguments passed to the program from the environment in which the program is run
argvis a pointer to the first element of an array of argc + 1 pointers, of which the last one is null and the previous ones, if any, point to null-terminated multibyte strings that represent the arguments passed to the program from the execution environment. If argv[0] is not a null pointer (or, equivalently, if argc > 0), it points to a string that represents the name used to invoke the program, or to an empty string. The value of argv[0] is not propagated to the system solver, the solver will see a dummy name.

Definition at line 505 of file system_solvers_large.cpp.

◆ areOptionsEditable()

bool bitpit::PetscManager::areOptionsEditable ( ) const

Check if initialization options are editable.

Returns
Returns true if initialization options are editable, false otherwise.

Definition at line 582 of file system_solvers_large.cpp.

◆ clearInitOptions()

void bitpit::PetscManager::clearInitOptions ( )

Clear initialization options

Definition at line 535 of file system_solvers_large.cpp.

◆ finalize()

bool bitpit::PetscManager::finalize ( )

PETSc finalization.

If PETSc finalization was already called, it will not be called again.

If MPI initialization has been performed by the PETSc manager and a permanent finalization is requested, this function will call MPI finalization.

Returns
Return true is PETSc has been finalized by this function, false if PETSc was already finalized.

Definition at line 693 of file system_solvers_large.cpp.

◆ initialize()

bool bitpit::PetscManager::initialize ( bool debug)

PETSc initialization.

If PETSc is already initialized, this function is a no-op.

If the MPI initialization has not be called yet, it will be called by this function.

The function can be called more than once.

Parameters
debugif set to true, turns on logging of objects and events, once the logging is enabled it cannot be disabled
Returns
Return true is PETSc has been initialized by this function, false if PETSc was already initialized.

Definition at line 609 of file system_solvers_large.cpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---