PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
delta.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <functional>
11#include <vector>
12
13#include <petscsys.h>
14
15namespace petibm
16{
21namespace delta
22{
32PetscReal Roma_et_al_1999(const PetscReal &r, const PetscReal &dr);
33
43PetscReal Peskin_2002(const PetscReal &r, const PetscReal &dr);
44
46typedef std::function<PetscReal(const PetscReal &r,
47 const PetscReal &dr)> DeltaKernel;
48
55PetscErrorCode getKernel(const std::string &name,
56 DeltaKernel &kernel, PetscInt &size);
57
68PetscReal delta(const std::vector<PetscReal> &source,
69 const std::vector<PetscReal> &target,
70 const std::vector<PetscReal> &widths,
71 const DeltaKernel &kernel);
72
73} // end of namespace delta
74
75} // end of namespace petibm
PetscReal delta(const std::vector< PetscReal > &source, const std::vector< PetscReal > &target, const std::vector< PetscReal > &widths, const DeltaKernel &kernel)
Discrete delta function.
Definition: delta.cpp:65
PetscReal Roma_et_al_1999(const PetscReal &r, const PetscReal &dr)
Regularized delta function from Roma et al. (1999).
Definition: delta.cpp:17
PetscReal Peskin_2002(const PetscReal &r, const PetscReal &dr)
Regularized delta function from Peskin (2002).
Definition: delta.cpp:30
PetscErrorCode getKernel(const std::string &name, DeltaKernel &kernel, PetscInt &size)
Get the delta kernel and size providing the name.
Definition: delta.cpp:42
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