ABLATE Source Documentation  0.12.33
openBoundary.hpp
1 #ifndef ABLATELIBRARY_OPENBOUNDARY_HPP
2 #define ABLATELIBRARY_OPENBOUNDARY_HPP
3 
4 #include "lodiBoundary.hpp"
5 namespace ablate::boundarySolver::lodi {
6 
7 class OpenBoundary : public LODIBoundary {
8  private:
9  // Boundary reflection factor
10  const PetscReal reflectFactor;
11  // Reference pressure
12  const PetscReal referencePressure;
13  // Max Reference Length
14  const PetscReal maxAcousticsLength;
15 
16  public:
17  OpenBoundary(std::shared_ptr<eos::EOS> eos, double reflectFactor, double referencePressure, double maxAcousticsLength,
18  std::shared_ptr<finiteVolume::processes::PressureGradientScaling> pressureGradientScaling = {});
19 
20  void Setup(ablate::boundarySolver::BoundarySolver& bSolver) override;
21 
22  static PetscErrorCode OpenBoundaryFunction(PetscInt dim, const boundarySolver::BoundarySolver::BoundaryFVFaceGeom* fg, const PetscFVCellGeom* boundaryCell, const PetscInt uOff[],
23  const PetscScalar* boundaryValues, const PetscScalar* stencilValues[], const PetscInt aOff[], const PetscScalar* auxValues,
24  const PetscScalar* stencilAuxValues[], PetscInt stencilSize, const PetscInt stencil[], const PetscScalar stencilWeights[], const PetscInt sOff[],
25  PetscScalar source[], void* ctx);
26 };
27 
28 } // namespace ablate::boundarySolver::lodi
29 #endif // ABLATELIBRARY_OPENBOUNDARY_HPP
Definition: boundarySolver.hpp:13
Definition: lodiBoundary.hpp:12
Definition: openBoundary.hpp:7
void Setup(ablate::boundarySolver::BoundarySolver &bSolver) override
Definition: openBoundary.cpp:14