ABLATE Source Documentation  0.12.34
surfaceForce.hpp
1 #ifndef ABLATELIBRARY_FINITEVOLUME_CHEMISTRY_HPP
2 #define ABLATELIBRARY_FINITEVOLUME_CHEMISTRY_HPP
3 
4 #include <petsc.h>
5 #include <memory>
6 #include <vector>
7 #include "domain/range.hpp"
8 #include "finiteVolume/fluxCalculator/fluxCalculator.hpp"
9 #include "flowProcess.hpp"
10 #include "process.hpp"
11 #include "solver/solver.hpp"
12 #include "twoPhaseEulerAdvection.hpp"
13 
14 namespace ablate::finiteVolume::processes {
15 
16 class SurfaceForce : public Process {
17  PetscReal sigma;
18 
19  private:
23  struct VertexStencil {
25  std::vector<PetscInt> stencil;
27  PetscInt stencilSize;
29  PetscInt vertexId;
31  std::vector<PetscScalar> gradientWeights;
33  std::vector<PetscScalar> stencilCoord;
34  };
35  DM dmData;
36 
37  public:
38  // Hold a list of VortexStencils
39  std::vector<VertexStencil> vertexStencils;
40 
41  explicit SurfaceForce(PetscReal sigma);
42 
47  ~SurfaceForce() override;
48 
60  static PetscErrorCode ComputeSource(const FiniteVolumeSolver &solver, DM dm, PetscReal time, Vec locX, Vec locFVec, void *ctx);
61 };
62 } // namespace ablate::finiteVolume::processes
63 #endif
Definition: finiteVolumeSolver.hpp:28
Definition: surfaceForce.hpp:16
static PetscErrorCode ComputeSource(const FiniteVolumeSolver &solver, DM dm, PetscReal time, Vec locX, Vec locFVec, void *ctx)
Definition: surfaceForce.cpp:96
~SurfaceForce() override
Definition: surfaceForce.cpp:297
void Setup(ablate::finiteVolume::FiniteVolumeSolver &flow) override
Definition: surfaceForce.cpp:9