11 #ifndef _EBVISCOUSTENSOROP_H_ 12 #define _EBVISCOUSTENSOROP_H_ 43 #include "NamespaceHeader.H" 76 const int& a_refToFine,
77 const int& a_refToCoar,
80 const bool& a_hasMGObjects,
82 const IntVect& a_ghostCellsRHS);
100 const Real& a_dxCoar,
101 const int& a_refToFine,
102 const int& a_refToCoar,
105 const bool& a_hasMGObjects,
106 const IntVect& a_ghostCellsPhi,
107 const IntVect& a_ghostCellsRHS);
120 sprintf(filename,
"%s.ebvto.step%d.lev.%d.hdf5",a_name.c_str(),
s_step,
s_whichLev );
128 sprintf(filename,
"%s.ebvto.step%d.lev.%d.hdf5", a_name.c_str(),
s_step,
s_whichLev );
161 bool a_kappaWeighted)
167 for (
int idir = 0; idir <
SpaceDim; idir++)
169 int isrc = 0;
int idst = idir;
int inco = 1;
170 a_rhs[dit()].mult((*
m_acoef)[dit()], isrc, idst, inco);
179 for (
int idir = 0; idir <
SpaceDim; idir++)
181 int isrc = 0;
int idst = idir;
int inco = 1;
182 a_rhs[dit()].divide((*
m_acoef)[dit()], isrc, idst, inco);
203 const Box& a_ghostedBox,
226 int a_coarseningFactor);
236 bool a_homogeneousBC,
245 bool a_homogeneousBC,
254 bool a_homogeneousPhysBC=
false);
269 bool a_homogeneousPhysBC);
280 const int& a_refRat);
322 const Real& a_scale);
388 bool a_homogeneousBC,
397 bool a_homogeneousBC);
406 bool a_homogeneousBC,
414 bool a_homogeneousBC);
470 const bool& a_homogeneous,
476 const bool& a_homogeneous,
482 const Box& a_faceBox,
663 #include "NamespaceFooter.H" static void doLazyRelax(bool a_doLazyRelax)
Definition: EBViscousTensorOp.H:455
RefCountedPtr< LevelData< EBFluxFAB > > m_lambda
Definition: EBViscousTensorOp.H:585
virtual void setToZero(LevelData< EBCellFAB > &a_lhs)
RefCountedPtr< LevelData< EBCellFAB > > m_acoef0
Definition: EBViscousTensorOp.H:578
IntVect m_ghostCellsRHS
Definition: EBViscousTensorOp.H:611
EBFastFR m_fastFR
Definition: EBViscousTensorOp.H:591
EBMGAverage m_ebAverage
Definition: EBViscousTensorOp.H:632
LayoutData< BaseIVFAB< Real > > m_alphaDiagWeight
Definition: EBViscousTensorOp.H:568
virtual void scale(LevelData< EBCellFAB > &a_lhs, const Real &a_scale)
virtual void kappaScale(LevelData< EBCellFAB > &a_rhs)
it's tga's world—we just live in it.
Definition: EBViscousTensorOp.H:134
virtual void AMRResidual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
virtual void createCoarsened(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const int &a_refRat)
virtual void restrictResidual(LevelData< EBCellFAB > &a_resCoarse, LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_rhsFine)
A reference-counting handle class.
Definition: RefCountedPtr.H:66
EBFastFR-A class to encapsulate a levels worth of flux registers.
Definition: EBFastFR.H:39
void cfinterp(const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse)
#define CH_SPACEDIM
Definition: SPACE.H:52
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_etaIrreg
Definition: EBViscousTensorOp.H:586
LevelData< EBCellFAB > m_grad
Definition: EBViscousTensorOp.H:620
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
EBMGAverage m_ebAverageMG
Definition: EBViscousTensorOp.H:633
virtual void AMROperatorNF(LevelData< EBCellFAB > &a_LofPhi, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse, bool a_homogeneousBC)
static int s_whichLev
Definition: EBViscousTensorOp.H:58
EBViscousTensorOp(const EBViscousTensorOp &a_opin)
Definition: EBViscousTensorOp.H:651
void reflux(const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, LevelData< EBCellFAB > &residual, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
Real m_dxCoar
Definition: EBViscousTensorOp.H:597
LayoutData< BaseIVFAB< Real > > m_betaDiagWeight
Definition: EBViscousTensorOp.H:570
virtual void AMRProlong(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection)
static void kappaWeight(LevelData< EBCellFAB > &a_data)
void AMRResidualNC(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
static void getDivergenceStencil(VoFStencil &a_divStencil, const FaceIndex &a_face, const DataIndex &a_dit, const Real &a_dx, const EBLevelGrid &a_eblg)
one dimensional dynamic array
Definition: Vector.H:52
RefCountedPtr< LevelData< EBCellFAB > > m_acoef1
Definition: EBViscousTensorOp.H:582
void incrementFRCoar(EBFastFR &a_fr, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi)
EBMGInterp m_ebInterpMG
Definition: EBViscousTensorOp.H:637
Definition: FaceIndex.H:28
EBMGInterp m_ebInterp
Definition: EBViscousTensorOp.H:636
virtual void AMRUpdateResidual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection)
RefCountedPtr< LevelData< EBCellFAB > > m_acoef
Definition: EBViscousTensorOp.H:574
static int s_step
Definition: EBViscousTensorOp.H:59
void averageToCells(LevelData< EBCellFAB > &a_cellCoef, const LevelData< EBFluxFAB > &a_faceCoef, const LevelData< BaseIVFAB< Real > > &a_irregCoef)
void getCCSigma(LevelData< EBCellFAB > &a_source, const LevelData< EBCellFAB > &a_gradU, const LevelData< EBCellFAB > &a_eta, const LevelData< EBCellFAB > &a_lambda)
void writeEBAMRname(const Vector< LevelData< EBCellFAB > * > *a_dataPtr, const char *a_filename)
void setTime(Real a_oldTime, Real a_mu, Real a_dt)
Definition: EBLevelGrid.H:30
LayoutData< RefCountedPtr< DivergenceStencil > > m_divergenceStencil
Definition: EBViscousTensorOp.H:555
DisjointBoxLayout getDBL() const
Definition: EBLevelGrid.H:86
virtual void assign(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs)
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:110
void getFluxStencil(VoFStencil &a_fluxStencil, const FaceIndex &a_face, const DataIndex &a_dit, int a_ivar)
Definition: DataIterator.H:140
EBViscousTensorOp()
weak construction is bad
Definition: EBViscousTensorOp.H:645
void writeEBLevelname(const LevelData< EBCellFAB > *a_dataPtr, const char *a_filename)
void getCellCenteredCoefficients(LevelData< EBCellFAB > &a_etaCell, LevelData< EBCellFAB > &a_lambdaCell)
Definition: EBFaceFAB.H:28
void getShearStressDotGradU(LevelData< EBCellFAB > &a_source, const LevelData< EBCellFAB > &a_gradU, int a_level)
compute (tau dot grad u) (for energy equation)
virtual Real norm(const LevelData< EBCellFAB > &a_rhs, int a_ord)
virtual Real dotProduct(const LevelData< EBCellFAB > &a_1, const LevelData< EBCellFAB > &a_2)
RefCountedPtr< EBTensorCFInterp > m_interpWithCoarser
Definition: EBViscousTensorOp.H:629
LayoutData< CFIVS > m_hiCFIVS[CH_SPACEDIM]
Definition: EBViscousTensorOp.H:554
void getVelDotSigma(LevelData< EBFluxFAB > &a_velDotSigma, const LevelData< EBFluxFAB > &a_vel, const LevelData< EBFluxFAB > &a_sigma)
virtual void divideByIdentityCoef(LevelData< EBCellFAB > &a_rhs)
Definition: EBViscousTensorOp.H:175
Piecewise constant interpolation.
Definition: EBMGInterp.H:33
int m_refToCoar
Definition: EBViscousTensorOp.H:606
const int SpaceDim
Definition: SPACE.H:39
Definition: AMRMultiGrid.H:35
VoF-centered stencil.
Definition: Stencils.H:59
static void getGradientStencil(VoFStencil &a_gradStencil, int a_ivar, int a_diffDir, const FaceIndex &a_face, const DataIndex &a_dit, const Real &a_dx, const EBLevelGrid &a_eblg)
static bool s_turnOffBCs
Definition: EBViscousTensorOp.H:550
Real m_dx
Definition: EBViscousTensorOp.H:596
virtual void getFlux(EBFluxFAB &a_flux, const LevelData< EBCellFAB > &a_data, const Box &a_grid, const DataIndex &a_dit, Real a_scale)
another leveltgaism
LayoutData< VoFIterator > m_vofIterMulti
Definition: EBViscousTensorOp.H:623
A EBFaceFAB-like container for edge-centered fluxes.
Definition: EBFluxFAB.H:25
virtual void outputLevel(LevelData< EBCellFAB > &a_rhs, string &a_name)
Definition: EBViscousTensorOp.H:117
void finerOperatorChanged(const MGLevelOp< LevelData< EBCellFAB > > &a_operator, int a_coarseningFactor)
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_lambdaIrreg
Definition: EBViscousTensorOp.H:587
IntVect m_ghostCellsPhi
Definition: EBViscousTensorOp.H:610
virtual void axby(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, const LevelData< EBCellFAB > &a_y, Real a_a, Real a_b)
void calculateRelaxationCoefficient()
LayoutData< CFIVS > m_loCFIVS[CH_SPACEDIM]
Definition: EBViscousTensorOp.H:553
virtual void applyOpNoBoundary(LevelData< EBCellFAB > &a_opPhi, const LevelData< EBCellFAB > &a_phi)
apply operator without any boundary or coarse-fine boundary conditions and no finer level ...
Definition: EBViscousTensorOp.H:215
virtual void setAlphaAndBeta(const Real &a_alpha, const Real &a_beta)
for tga to reset stuff
Definition: EBCellFAB.H:29
virtual void create(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs)
EBLevelGrid m_eblgFine
Definition: EBViscousTensorOp.H:559
double Real
Definition: REAL.H:33
Definition: MultiGrid.H:30
IntVect m_ghostPhi
Definition: EBViscousTensorOp.H:557
EBLevelGrid m_eblg
Definition: EBViscousTensorOp.H:560
virtual void incr(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, Real a_scale)
virtual void prolongIncrement(LevelData< EBCellFAB > &a_phiThisLevel, const LevelData< EBCellFAB > &a_correctCoarse)
void getVoFStencil(VoFStencil &a_vofStencil, const VolIndex &a_vof, const DataIndex &a_dit, int a_ivar)
void gsrbColor(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_lph, const LevelData< EBCellFAB > &a_rhs, const IntVect &a_color)
Real m_beta
Definition: EBViscousTensorOp.H:566
virtual void AMRResidualNF(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousBC)
RefCountedPtr< ViscousBaseDomainBC > m_domainBC
Definition: EBViscousTensorOp.H:640
virtual void AMROperator(LevelData< EBCellFAB > &a_LofPhi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse, bool a_homogeneousBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
void getFaceCenteredFluxStencil(VoFStencil &a_fluxStencil, const FaceIndex &a_face, const DataIndex &a_dit, int a_ivar)
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
Real AMRNorm(const LevelData< EBCellFAB > &a_coarResid, const LevelData< EBCellFAB > &a_fineResid, const int &a_refRat, const int &a_ord)
Vector< IntVect > m_colors
Definition: EBViscousTensorOp.H:642
void applyOpIrregular(EBCellFAB &a_lhs, const EBCellFAB &a_phi, const bool &a_homogeneous, const DataIndex &a_datInd)
virtual void diagonalScale(LevelData< EBCellFAB > &a_rhs, bool a_kappaWeighted)
another tgaism
Definition: EBViscousTensorOp.H:160
void defineStencils()
(Re)define the stencils for the given coefficients.
void incrOpRegularDir(EBCellFAB &a_lhs, const EBCellFAB &a_phi, const bool &a_homogeneous, const int &a_dir, const DataIndex &a_datInd)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void homogeneousCFInterp(LevelData< EBCellFAB > &a_phi)
void getKappaDivSigmaU(LevelData< EBCellFAB > &a_divSigmaU, const LevelData< EBCellFAB > &a_velocity, const LevelData< EBCellFAB > *a_veloCoar, int a_level)
compute volfrac(sigma dot grad u) (for energy equation)
Definition: EBViscousTensorOp.H:54
Definition: DataIndex.H:112
IntVect m_ghostRHS
Definition: EBViscousTensorOp.H:557
LayoutData< VoFIterator > m_vofIterIrreg
Definition: EBViscousTensorOp.H:622
virtual ~EBViscousTensorOp()
Destructor.
bool m_hasCoar
Definition: EBViscousTensorOp.H:604
Piecewise constant interpolation.
Definition: EBMGAverage.H:31
EBLevelGrid m_eblgCoar
Definition: EBViscousTensorOp.H:561
int m_refToFine
Definition: EBViscousTensorOp.H:605
virtual void relax(LevelData< EBCellFAB > &a_e, const LevelData< EBCellFAB > &a_residual, int a_iterations)
void cellGrad(EBCellFAB &a_gradPhi, const EBCellFAB &a_phi, const Box &a_grid, const DataIndex &a_datInd)
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual void residual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousPhysBC=false)
Definition: FArrayBox.H:44
void AMROperatorNC(LevelData< EBCellFAB > &a_LofPhi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, bool a_homogeneousBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
RefCountedPtr< ViscousBaseEBBC > m_ebBC
Definition: EBViscousTensorOp.H:641
Volume of Fluid Index.
Definition: VolIndex.H:31
EBLevelGrid m_eblgCoarMG
Definition: EBViscousTensorOp.H:562
virtual int refToCoarser()
virtual void preCond(LevelData< EBCellFAB > &a_opPhi, const LevelData< EBCellFAB > &a_phi)
virtual void fillGrad(const LevelData< EBCellFAB > &a_phi)
a leveltgaism
RefCountedPtr< LevelData< EBFluxFAB > > m_eta
Definition: EBViscousTensorOp.H:584
void operator=(const EBViscousTensorOp &a_opin)
Definition: EBViscousTensorOp.H:656
virtual void applyOp(LevelData< EBCellFAB > &a_opPhi, const LevelData< EBCellFAB > &a_phi, bool a_homogeneousPhysBC)
virtual void outputAMR(Vector< LevelData< EBCellFAB > * > &a_rhs, string &a_name)
Definition: EBViscousTensorOp.H:125
void incrementFRFine(EBFastFR &a_fr, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
DataIterator dataIterator() const
Parallel iterator.
Real m_alpha
Definition: EBViscousTensorOp.H:565
void calculateAlphaWeight()
LayoutData< VoFIterator > m_vofIterDomHi[CH_SPACEDIM]
Definition: EBViscousTensorOp.H:626
virtual void createCoarser(LevelData< EBCellFAB > &a_coarse, const LevelData< EBCellFAB > &a_fine, bool a_ghosted)
virtual void AMRRestrict(LevelData< EBCellFAB > &a_resCoarse, const LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection)
LevelData< EBCellFAB > m_relCoef
Definition: EBViscousTensorOp.H:617
bool m_hasFine
Definition: EBViscousTensorOp.H:603
static bool s_doLazyRelax
Definition: EBViscousTensorOp.H:551
LayoutData< VoFIterator > m_vofIterDomLo[CH_SPACEDIM]
Definition: EBViscousTensorOp.H:625
LayoutData< RefCountedPtr< EBStencil > > m_opEBStencil[CH_SPACEDIM]
Definition: EBViscousTensorOp.H:614
bool m_hasMGObjects
Definition: EBViscousTensorOp.H:607
virtual void setVal(LevelData< EBCellFAB > &a_lhs, const Real &a_value)