Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
PetscSetup Class Reference

#include <FakePetscSetup.hpp>

+ Inheritance diagram for PetscSetup:
+ Collaboration diagram for PetscSetup:

Public Member Functions

bool setUpWorld ()
 
bool tearDownWorld ()
 
bool setUpWorld ()
 
bool tearDownWorld ()
 

Detailed Description

This file is designed to be included by any test suites that DO NOT use PETSc. It does the PETSc initialisation and finalisation at the top of a test suite, in order to make sure that only one process is left to run the actual tests.

This file is designed to be included by any test suites that use PETSc. It controls the PETSc initialisation and finalisation.

Definition at line 55 of file FakePetscSetup.hpp.

Member Function Documentation

◆ setUpWorld() [1/2]

bool PetscSetup::setUpWorld ( )
inline

Run the standard setup method for PETSc, but then fake being a single process. Only the process with PETSc rank zero continues beyond setUpWorld(); the others exit gracefully.

Note that we need to keep MPI initialized so we can use MPI_Wtime etc.

Returns
true (by CxxTest convention)

Definition at line 68 of file FakePetscSetup.hpp.

References PetscSetupUtils::CommonSetup(), and PetscSetupUtils::ResetStatusCache().

◆ setUpWorld() [2/2]

bool PetscSetup::setUpWorld ( )
inline

Standard setup method for PETSc.

Returns
true (by CxxTest convention)

Definition at line 59 of file PetscSetupAndFinalize.hpp.

References PetscSetupUtils::CommonSetup().

◆ tearDownWorld() [1/2]

bool PetscSetup::tearDownWorld ( )
inline

Clean up PETSc on the master process after running tests.

Returns
true (by CxxTest convention)

Definition at line 95 of file FakePetscSetup.hpp.

References PetscSetupUtils::CommonFinalize().

◆ tearDownWorld() [2/2]

bool PetscSetup::tearDownWorld ( )
inline

Clean up PETSc after running all tests.

Returns
true (by CxxTest convention)

Causes memory failure (and seg fault) in PETSc 3.2 with MPICH-1

Definition at line 68 of file PetscSetupAndFinalize.hpp.

References PetscSetupUtils::CommonFinalize().


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