PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
solutionsimple.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <petscsys.h>
11
12#include <petibm/mesh.h>
13#include <petibm/solution.h>
14
15namespace petibm
16{
17namespace solution
18{
26{
27public:
30
32 virtual ~SolutionSimple();
33
34 // documentation: see petibm::solution::SolutionBase::setInitialConditions
35 virtual PetscErrorCode setInitialConditions(const YAML::Node &node);
36
37 // documentation: see petibm::solution::SolutionBase::convert2Velocity
38 virtual PetscErrorCode convert2Velocity(const Mat &Rinv);
39
40 // documentation: see petibm::solution::SolutionBase::convert2Flux
41 virtual PetscErrorCode convert2Flux(const Mat &R);
42
43 // documentation: see petibm::solution::SolutionBase::write
44 virtual PetscErrorCode write(const std::string &filePath) const;
45
46 // documentation: see petibm::solution::SolutionBase::read
47 virtual PetscErrorCode read(const std::string &filePath);
48
49protected:
50 // documentation: see petibm::solution::SolutionBase::init
51 virtual PetscErrorCode init(const type::Mesh &mesh);
52
58 PetscErrorCode createInfoString();
59
60}; // SolutionSimple
61
62} // end of namespace solution
63} // end of namespace petibm
Base (abstract) class for different solution holders.
Definition: solution.h:60
type::Mesh mesh
Shared pointer to the underlying Cartesian mesh object.
Definition: solution.h:176
Class to hold the velocity vector field and pressure scalar field.
virtual PetscErrorCode convert2Flux(const Mat &R)
Convert velocity components to velocity fluxes.
virtual PetscErrorCode write(const std::string &filePath) const
Write flow field solutions to a file.
virtual PetscErrorCode convert2Velocity(const Mat &Rinv)
Convert velocity fluxes to velocity components.
PetscErrorCode createInfoString()
Create a string with information about the solution.
virtual PetscErrorCode setInitialConditions(const YAML::Node &node)
Set initial conditions of the flow fields.
SolutionSimple(const type::Mesh &mesh)
Constructor using a Cartesian mesh.
virtual PetscErrorCode init(const type::Mesh &mesh)
Initialize the flow field solutions.
virtual ~SolutionSimple()
Default destructor.
virtual PetscErrorCode read(const std::string &filePath)
Read the flow field solutions from a file.
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
Definition: mesh.h:348
Prototype of mesh::MeshBase, type::Mesh, and factory function.
A toolbox for building flow solvers.
Definition: bodypack.h:52
Definition of the class petibm::solution::SolutionBase, the type definition petibm::type::Solution,...