chombo-discharge
Loading...
Searching...
No Matches
CD_EBHelmholtzDirichletEBBC.H
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7/*
8 @file CD_EBHelmholtzDirichletEBBC.H
9 @brief Declaration of a boundary condition class for EBHelmholtzOp
10 @author Robert Marskar
11*/
12
13#ifndef CD_EBHELMHOLTZDIRICHLETEBBC_H
14#define CD_EBHELMHOLTZDIRICHLETEBBC_H
15
16// Std includes
17#include <functional>
18
19// Our includes
20#include <CD_VofUtils.H>
21#include <CD_EBHelmholtzEBBC.H>
22#include <CD_NamespaceHeader.H>
23
28{
29public:
34
39
45 virtual void
46 setOrder(const int a_order);
47
53 virtual void
54 setWeight(const int a_weight);
55
60 virtual void
61 setValue(const int a_value);
62
67 virtual void
69
74 virtual void
76
81 virtual void
83
94 virtual void
97 const EBCellFAB& a_phi,
99 const DataIndex& a_dit,
100 const Real& a_beta,
101 const bool& a_homogeneousPhysBC) const override;
102
103protected:
107 bool m_useConstant = false;
108
112 bool m_useFunction = false;
113
117 int m_order = -1;
118
122 int m_weight = -1;
123
128
132 bool m_dropOrder = false;
133
138
143
148
152 virtual void
153 define() override;
154
165 virtual bool
167 const VolIndex& a_vof,
169 const DataIndex& a_dit,
170 const int a_order) const;
171
180 virtual bool
182 const VolIndex& a_vof,
183 const DataIndex& a_dit,
184 const int a_order) const;
185
193 virtual bool
195};
196
197#include <CD_NamespaceFooter.H>
198
199#endif
Various functions for getting Vofs near cut-cells.
Base class for passing Dirichlet EB boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzDirichletEBBC.H:28
virtual bool getJohansenStencil(std::pair< Real, VoFStencil > &a_stencil, const VolIndex &a_vof, const DataIndex &a_dit, const int a_order) const
Get johansen stencil with specified order. Not used but exists for backward compatibility testing and...
Definition CD_EBHelmholtzDirichletEBBC.cpp:313
EBHelmholtzDirichletEBBC()
Default constructor.
Definition CD_EBHelmholtzDirichletEBBC.cpp:24
std::function< Real(const RealVect &a_pos)> m_functionValue
Value on the EB.
Definition CD_EBHelmholtzDirichletEBBC.H:142
int m_order
Stencil approximation order,.
Definition CD_EBHelmholtzDirichletEBBC.H:117
LayoutData< BaseIVFAB< Real > > m_boundaryWeights
Boundary weights.
Definition CD_EBHelmholtzDirichletEBBC.H:147
virtual void setValue(const int a_value)
Set the value on the EB.
Definition CD_EBHelmholtzDirichletEBBC.cpp:54
virtual bool getChomboLsqStencil(std::pair< Real, VoFStencil > &a_stencil, const VolIndex &a_vof, const DataIndex &a_dit) const
Get Chombo's least squares gradient stencil. Not used but kept for backward compatibility testing and...
Definition CD_EBHelmholtzDirichletEBBC.cpp:384
virtual void setDomainDropOrder(const int a_domainSize)
Drop BC order if domain size is equal or below this.
Definition CD_EBHelmholtzDirichletEBBC.cpp:76
bool m_dropOrder
Special flag for dropping stencil order if the cell is a coarsened cell.
Definition CD_EBHelmholtzDirichletEBBC.H:132
virtual void applyEBFlux(VoFIterator &a_vofit, EBCellFAB &a_Lphi, const EBCellFAB &a_phi, const BaseIVFAB< Real > &a_Bcoef, const DataIndex &a_dit, const Real &a_beta, const bool &a_homogeneousPhysBC) const override
Apply the EB flux. This is the version that is called by EBHelmholtzOp.
Definition CD_EBHelmholtzDirichletEBBC.cpp:225
virtual void setOrder(const int a_order)
Set BC order.
Definition CD_EBHelmholtzDirichletEBBC.cpp:35
int m_weight
Distance weighting factor for stencils.
Definition CD_EBHelmholtzDirichletEBBC.H:122
bool m_useFunction
Use function for BC value.
Definition CD_EBHelmholtzDirichletEBBC.H:112
virtual void define() override
User define function.
Definition CD_EBHelmholtzDirichletEBBC.cpp:90
virtual bool getLeastSquaresStencil(std::pair< Real, VoFStencil > &a_stencil, const VolIndex &a_vof, const VofUtils::Neighborhood a_neighborhood, const DataIndex &a_dit, const int a_order) const
Get stencil with specified order.
Definition CD_EBHelmholtzDirichletEBBC.cpp:270
int m_domainDropOrder
Special flag for dropping stencil order when domains become coarser than this.
Definition CD_EBHelmholtzDirichletEBBC.H:127
bool m_useConstant
Use constant for BC.
Definition CD_EBHelmholtzDirichletEBBC.H:107
virtual void setWeight(const int a_weight)
Set stencil weights.
Definition CD_EBHelmholtzDirichletEBBC.cpp:44
virtual void setCoarseGridDropOrder(const bool a_dropOrder)
Signal that we should drop the stencil order if the cell is a coarsened cell.
Definition CD_EBHelmholtzDirichletEBBC.cpp:84
Real m_constantValue
Value on EB.
Definition CD_EBHelmholtzDirichletEBBC.H:137
virtual ~EBHelmholtzDirichletEBBC()
Destructor.
Definition CD_EBHelmholtzDirichletEBBC.cpp:29
Base class for passing EB boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzEBBC.H:30
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26
Neighborhood
Neighborhood type.
Definition CD_VofUtils.H:56