23 PetscFunctionBeginUser;
25 ierr = PetscFinalized(&finalized); CHKERRV(ierr);
26 if (finalized)
return;
28 ierr = VecDestroy(&
UGlobal); CHKERRV(ierr);
29 ierr = VecDestroy(&
pGlobal); CHKERRV(ierr);
38 PetscFunctionBeginUser;
41 ierr = VecDestroy(&
UGlobal); CHKERRQ(ierr);
42 ierr = VecDestroy(&
pGlobal); CHKERRQ(ierr);
49 PetscFunctionReturn(0);
57 PetscFunctionBeginUser;
61 PetscFunctionReturn(0);
67 PetscFunctionBeginUser;
69 solution = std::make_shared<SolutionSimple>(mesh);
71 PetscFunctionReturn(0);
PetscMPIInt mpiRank
Rank of the local process.
MPI_Comm comm
MPI communicator.
PetscMPIInt mpiSize
Size of MPI communicator.
std::string info
String containing information about the solution.
virtual PetscErrorCode destroy()
Manually destroy data.
virtual ~SolutionBase()
Default destructor.
Vec UGlobal
Packed PETSc Vec object for the velocity vector field.
type::Mesh mesh
Shared pointer to the underlying Cartesian mesh object.
PetscErrorCode printInfo() const
Print information about the solution to standard output.
Vec pGlobal
PETSc Vec for the pressure scalar field.
PetscInt dim
Number of dimensions.
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
PetscErrorCode print(const std::string &info)
Print information of a parallel object to standard output.
std::shared_ptr< solution::SolutionBase > Solution
Type definition of solution object.
PetscErrorCode createSolution(const type::Mesh &mesh, type::Solution &solution)
Factory function to create a petibm::solution::Solution object.
Prototypes of I/O functions.
A toolbox for building flow solvers.
Definition of the class petibm::solution::SolutionBase, the type definition petibm::type::Solution,...
Definition of class petibm::solution::SolutionSimple.