PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
rigidkinematics.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "../decoupledibpm/decoupledibpm.h"
13
21{
22public:
25
31 RigidKinematicsSolver(const MPI_Comm &world, const YAML::Node &node);
32
35
37 PetscErrorCode destroy();
38
44 PetscErrorCode init(const MPI_Comm &world, const YAML::Node &node);
45
47 PetscErrorCode advance();
48
50 PetscErrorCode write();
51
53 PetscErrorCode ioInitialData();
54
56
57protected:
59 Vec UB;
60
62 PetscLogStage stageMoveIB;
63
72 virtual PetscErrorCode moveBodies(const PetscReal &ti);
73
81 virtual PetscErrorCode setCoordinatesBodies(
82 const PetscReal &ti){PetscFunctionReturn(0);};
83
91 virtual PetscErrorCode setVelocityBodies(
92 const PetscReal &ti){PetscFunctionReturn(0);};
93
95 virtual PetscErrorCode assembleRHSForces();
96
98 virtual PetscErrorCode writeBodies();
99
100}; // RigidKinematicsSolver
Immersed-boundary method proposed by Li et. al. (2016).
Definition: decoupledibpm.h:23
bool finished()
Evaluate if the simulation is finished.
Helper class to solve cases with moving rigid bodies using the decoupled IBPM.
PetscErrorCode init(const MPI_Comm &world, const YAML::Node &node)
Initialize the decoupled IBPM solver with moving rigid bodies.
PetscErrorCode ioInitialData()
Read or write initial data.
Vec UB
Prescribed boundary velocity vector.
PetscLogStage stageMoveIB
Log stage for moving the bodies.
virtual PetscErrorCode setVelocityBodies(const PetscReal &ti)
Update the velocity of the Lagrangian points.
virtual PetscErrorCode writeBodies()
Write the coordinates of the Lagrangian points for each body.
~RigidKinematicsSolver()
Default destructor.
RigidKinematicsSolver()=default
Default constructor.
PetscErrorCode write()
Write solution, solver info, and body points to files.
PetscErrorCode destroy()
Manually destroy data.
PetscErrorCode advance()
Advance the solution by one time step.
virtual PetscErrorCode assembleRHSForces()
Assemble the right-hand side of the system for the forces.
virtual PetscErrorCode setCoordinatesBodies(const PetscReal &ti)
Update the position of the Lagrangian points.
virtual PetscErrorCode moveBodies(const PetscReal &ti)
Move the bodies and update the solver state.