92 virtual PetscErrorCode
destroy();
143 virtual PetscErrorCode
write(
const std::string &filePath)
const = 0;
154 virtual PetscErrorCode
read(
const std::string &filePath) = 0;
210typedef std::shared_ptr<solution::SolutionBase>
Solution;
Base (abstract) class for different solution holders.
SolutionBase()=default
Default constructor.
PetscMPIInt mpiRank
Rank of the local process.
virtual PetscErrorCode convert2Flux(const Mat &R)=0
Convert velocity components to velocity fluxes.
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.
virtual PetscErrorCode write(const std::string &filePath) const =0
Write flow field solutions to a file.
type::Mesh mesh
Shared pointer to the underlying Cartesian mesh object.
PetscErrorCode printInfo() const
Print information about the solution to standard output.
virtual PetscErrorCode setInitialConditions(const YAML::Node &node)=0
Set initial conditions of the flow fields.
SolutionBase(const type::Mesh &mesh)
Constructor using a Cartesian mesh.
virtual PetscErrorCode read(const std::string &filePath)=0
Read the flow field solutions from a file.
virtual PetscErrorCode convert2Velocity(const Mat &Rinv)=0
Convert velocity fluxes to velocity components.
Vec pGlobal
PETSc Vec for the pressure scalar field.
PetscInt dim
Number of dimensions.
virtual PetscErrorCode init(const type::Mesh &mesh)=0
Initialize the flow field solutions.
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
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.
Prototype of mesh::MeshBase, type::Mesh, and factory function.
A toolbox for building flow solvers.