chombo-discharge
CD_LinearStencil.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_LinearStencil_H
13 #define CD_LinearStencil_H
14 
15 // Chombo includes
16 #include <Stencil.H>
17 #include <ProblemDomain.H>
18 #include <EBISBox.H>
19 
20 // Our includes
21 #include <CD_NamespaceHeader.H>
22 
29 {
30 public:
39  static bool
40  getLinearInterpStencil(VoFStencil& a_stencil,
41  const RealVect& a_pos,
42  const VolIndex& a_vof,
43  const ProblemDomain& a_domain,
44  const EBISBox& a_ebisbox);
45 
46 protected:
50  static constexpr Real tolerance = 1.E-6;
51 
63  static bool
64  computeInterpStencil1D(VoFStencil& a_stencil,
65  const RealVect& a_pos,
66  const VolIndex& a_vof,
67  const ProblemDomain& a_domain,
68  const EBISBox& a_ebisbox,
69  const int a_interpDir);
80  static bool
81  computeInterpStencil2D(VoFStencil& a_stencil,
82  const RealVect& a_pos,
83  const VolIndex& a_vof,
84  const ProblemDomain& a_domain,
85  const EBISBox& a_ebisbox,
86  const int a_noInterpDir = 2);
87 
88 #if CH_SPACEDIM == 3
97  static bool
98  computeInterpStencil3D(VoFStencil& a_stencil,
99  const RealVect& a_pos,
100  const VolIndex& a_vof,
101  const ProblemDomain& a_domain,
102  const EBISBox& a_ebisbox);
103 #endif
104 };
105 
106 #include <CD_NamespaceFooter.H>
107 
108 #endif
Class which computes a bi/tri-linear stencil in cut-cells. This class makes appropriate modifications...
Definition: CD_LinearStencil.H:29
static bool computeInterpStencil2D(VoFStencil &a_stencil, const RealVect &a_pos, const VolIndex &a_vof, const ProblemDomain &a_domain, const EBISBox &a_ebisbox, const int a_noInterpDir=2)
Compute a bilinear interpolation stencil.
Definition: CD_LinearStencil.cpp:135
static constexpr Real tolerance
Tolerance for when we switch between 1D/2D/3D stencils.
Definition: CD_LinearStencil.H:50
static bool computeInterpStencil1D(VoFStencil &a_stencil, const RealVect &a_pos, const VolIndex &a_vof, const ProblemDomain &a_domain, const EBISBox &a_ebisbox, const int a_interpDir)
Compute a linear interpolation stencil.
Definition: CD_LinearStencil.cpp:53
static bool getLinearInterpStencil(VoFStencil &a_stencil, const RealVect &a_pos, const VolIndex &a_vof, const ProblemDomain &a_domain, const EBISBox &a_ebisbox)
Get a bi(tri)linear interpolation stencil in 2D(3D)
Definition: CD_LinearStencil.cpp:22