PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
operators.h
Go to the documentation of this file.
1
8#include <petscmat.h>
9
10#include <petibm/bodypack.h>
11#include <petibm/boundary.h>
12#include <petibm/delta.h>
13#include <petibm/mesh.h>
14#include <petibm/type.h>
15
79namespace petibm
80{
86namespace operators
87{
103PetscErrorCode createR(const type::Mesh &mesh, Mat &R);
104
120PetscErrorCode createRInv(const type::Mesh &mesh, Mat &RInv);
121
140PetscErrorCode createMHead(const type::Mesh &mesh, Mat &MHead);
141
156PetscErrorCode createM(const type::Mesh &mesh, Mat &M);
157
168PetscErrorCode createIdentity(const type::Mesh &mesh, Mat &I);
169
193PetscErrorCode createGradient(const type::Mesh &mesh, Mat &G,
194 const PetscBool &normalize = PETSC_TRUE);
195
221PetscErrorCode createDivergence(const type::Mesh &mesh,
222 const type::Boundary &bc, Mat &D,
223 Mat &DCorrection,
224 const PetscBool &normalize = PETSC_TRUE);
225
245PetscErrorCode createLaplacian(const type::Mesh &mesh, const type::Boundary &bc,
246 Mat &L, Mat &LCorrection);
247
264PetscErrorCode createConvection(const type::Mesh &mesh,
265 const type::Boundary &bc, Mat &H);
266
294PetscErrorCode createBnHead(const Mat &Op, const PetscReal &dt,
295 const PetscReal &coeff, const PetscInt &n,
296 Mat &BnHead);
297
317PetscErrorCode createBn(const Mat &Op, const Mat &R, const Mat &MHead,
318 const PetscReal &dt, const PetscReal &coeff,
319 const PetscInt &n, Mat &Bn);
320
336PetscErrorCode createBn(const Mat &Op, const Mat &M, const PetscReal &dt,
337 const PetscReal &coeff, const PetscInt &n, Mat &Bn);
338
361PetscErrorCode createDelta(const type::Mesh &mesh, const type::Boundary &bc,
362 const type::BodyPack &bodies,
363 const delta::DeltaKernel &kernel,
364 const PetscInt &kernelSize,
365 Mat &Op);
366
367} // end of namespace operators
368
369} // end of namespace petibm
body::BodyPackBase, type::BodyPack, and factory function.
boundary::BoundaryBase, type::Boundary, and factory function.
Prototype of Delta functions.
std::shared_ptr< body::BodyPackBase > BodyPack
Definition of type::BodyPack.
Definition: bodypack.h:262
std::shared_ptr< boundary::BoundaryBase > Boundary
Type definition of petibm::type::Boundary.
Definition: boundary.h:175
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
Definition: mesh.h:348
PetscErrorCode createRInv(const type::Mesh &mesh, Mat &RInv)
Create a matrix of inversed flux areas, .
PetscErrorCode createMHead(const type::Mesh &mesh, Mat &MHead)
Create a matrix of cell widths of velocity points, .
PetscErrorCode createBn(const Mat &Op, const Mat &R, const Mat &MHead, const PetscReal &dt, const PetscReal &coeff, const PetscInt &n, Mat &Bn)
Create normalized matrix of approximated , .
Definition: createbn.cpp:98
PetscErrorCode createDivergence(const type::Mesh &mesh, const type::Boundary &bc, Mat &D, Mat &DCorrection, const PetscBool &normalize=PETSC_TRUE)
Create a divergence operator, , and corresponding boundary correction, , for velocity fields.
PetscErrorCode createIdentity(const type::Mesh &mesh, Mat &I)
Create an identity matrix for velocity fields.
PetscErrorCode createGradient(const type::Mesh &mesh, Mat &G, const PetscBool &normalize=PETSC_TRUE)
Create a gradient operator, , for pressure field.
PetscErrorCode createLaplacian(const type::Mesh &mesh, const type::Boundary &bc, Mat &L, Mat &LCorrection)
Create a Laplacian operator, , and boundary correction, for velocity fields.
PetscErrorCode createM(const type::Mesh &mesh, Mat &M)
Create a matrix .
PetscErrorCode createBnHead(const Mat &Op, const PetscReal &dt, const PetscReal &coeff, const PetscInt &n, Mat &BnHead)
Create non-normalized matrix of approximated , .
Definition: createbn.cpp:19
PetscErrorCode createConvection(const type::Mesh &mesh, const type::Boundary &bc, Mat &H)
Create a matrix-free Mat for convection operator, .
PetscErrorCode createDelta(const type::Mesh &mesh, const type::Boundary &bc, const type::BodyPack &bodies, const delta::DeltaKernel &kernel, const PetscInt &kernelSize, Mat &Op)
Create a Delta operator, .
Definition: createdelta.cpp:34
PetscErrorCode createR(const type::Mesh &mesh, Mat &R)
Create a matrix of flux areas, .
Prototype of mesh::MeshBase, type::Mesh, and factory function.
std::function< PetscReal(const PetscReal &r, const PetscReal &dr)> DeltaKernel
Typedef to choose the regularized delta kernel to use.
Definition: delta.h:47
A toolbox for building flow solvers.
Definition: bodypack.h:52
Definition of user-defined types for convenience.