11 #ifndef _NWOEBVISCOUSTENSOROP_H_ 12 #define _NWOEBVISCOUSTENSOROP_H_ 22 #include "ViscousTensorOpF_F.H" 46 #include "NamespaceHeader.H" 80 const int& a_refToFine,
81 const int& a_refToCoar,
84 const bool& a_hasMGObjects,
128 sprintf(filename,
"%s.ebvto.step%d.lev.%d.hdf5",a_name.c_str(),
s_step,
s_whichLev );
136 sprintf(filename,
"%s.ebvto.step%d.lev.%d.hdf5", a_name.c_str(),
s_step,
s_whichLev );
169 bool a_kappaWeighted)
175 for (
int idir = 0; idir <
SpaceDim; idir++)
177 int isrc = 0;
int idst = idir;
int inco = 1;
178 a_rhs[dit()].mult((*
m_acoef)[dit()], isrc, idst, inco);
187 for (
int idir = 0; idir <
SpaceDim; idir++)
189 int isrc = 0;
int idst = idir;
int inco = 1;
190 a_rhs[dit()].divide((*
m_acoef)[dit()], isrc, idst, inco);
214 const Box& a_ghostedBox,
244 bool a_homogeneousBC,
253 bool a_homogeneousBC,
262 bool a_homogeneousPhysBC=
false);
276 bool a_homogeneousPhysBC);
288 const int& a_refRat);
330 const Real& a_scale);
410 bool a_homogeneousBC,
419 bool a_homogeneousBC);
428 bool a_homogeneousBC,
436 bool a_homogeneousBC);
444 bool a_skip_res =
false );
517 const bool& a_homogeneous,
523 const bool& a_homogeneous,
528 const Box& a_faceBox,
690 int isrc,
int idst,
int inco,
691 bool a_interpolateToCentroid);
701 int isrc,
int idst,
int inco,
702 bool a_interpolateToCentroid);
709 const Box & ccFluxBox,
713 int isrc,
int idst,
int inco);
738 #include "NamespaceFooter.H" 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)
virtual void setVal(LevelData< EBCellFAB > &a_lhs, const Real &a_value)
void homogeneousCFInterp(LevelData< EBCellFAB > &a_phi)
Real AMRNorm(const LevelData< EBCellFAB > &a_coarResid, const LevelData< EBCellFAB > &a_fineResid, const int &a_refRat, const int &a_ord)
void operator=(const NWOEBViscousTensorOp &a_opin)
Definition: NWOEBViscousTensorOp.H:731
virtual int refToCoarser()
EBFastFR m_fastFR
Definition: NWOEBViscousTensorOp.H:632
virtual void AMRProlong(LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection)
A reference-counting handle class.
Definition: RefCountedPtr.H:173
EBFastFR-A class to encapsulate a levels worth of flux registers.
Definition: EBFastFR.H:39
void gsrbColorTimed(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, const IntVect &a_color, TimedDataIterator &a_dit)
virtual void createCoarser(LevelData< EBCellFAB > &a_coarse, const LevelData< EBCellFAB > &a_fine, bool a_ghosted)
void defineStencils()
(Re)define the stencils for the given coefficients.
static void getDivergenceStencil(VoFStencil &a_divStencil, const FaceIndex &a_face, const DataIndex &a_dit, const Real &a_dx, const EBLevelGrid &a_eblg)
static for code reuse in bcs
virtual void divideByIdentityCoef(LevelData< EBCellFAB > &a_rhs)
Definition: NWOEBViscousTensorOp.H:183
#define CH_SPACEDIM
Definition: SPACE.H:51
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
void defineStencilsForTimingOnly()
static bool s_forceNoEBCF
Definition: NWOEBViscousTensorOp.H:600
void AMROperatorNC(LevelData< EBCellFAB > &a_LofPhi, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, bool a_homogeneousBC, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
EBLevelGrid m_eblgFine
Definition: NWOEBViscousTensorOp.H:608
RefCountedPtr< LevelData< EBFluxFAB > > m_lambda
Definition: NWOEBViscousTensorOp.H:626
EBLevelGrid m_eblgCoarMG
Definition: NWOEBViscousTensorOp.H:611
virtual ~NWOEBViscousTensorOp()
Destructor.
static void kappaWeight(LevelData< EBCellFAB > &a_data)
one dimensional dynamic array
Definition: Vector.H:53
virtual void assign(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs)
Definition: NWOEBViscousTensorOp.H:57
Definition: FaceIndex.H:28
Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.
Definition: BoxLayout.H:26
void setTime(Real a_oldTime, Real a_mu, Real a_dt)
static void doLazyRelax(bool a_doLazyRelax)
Definition: NWOEBViscousTensorOp.H:498
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:145
static void setForceNoEBCF(bool a_forceNoEBCF)
Definition: NWOEBViscousTensorOp.H:502
static int s_whichLev
Definition: NWOEBViscousTensorOp.H:61
bool m_operatorForTimingOnly
Definition: NWOEBViscousTensorOp.H:717
void writeEBAMRname(const Vector< LevelData< EBCellFAB > * > *a_dataPtr, const char *a_filename)
EBLevelGrid m_eblgCoar
Definition: NWOEBViscousTensorOp.H:610
Definition: EBLevelGrid.H:30
void getCellCenteredCoefficients(LevelData< EBCellFAB > &a_etaCell, LevelData< EBCellFAB > &a_lambdaCell)
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 for code reuse in bcs
RefCountedPtr< LevelData< EBFluxFAB > > m_eta
Definition: NWOEBViscousTensorOp.H:625
DisjointBoxLayout getDBL() const
Definition: EBLevelGrid.H:86
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:117
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_lambdaIrreg
Definition: NWOEBViscousTensorOp.H:628
Definition: DataIterator.H:190
virtual void prolongIncrement(LevelData< EBCellFAB > &a_phiThisLevel, const LevelData< EBCellFAB > &a_correctCoarse)
LayoutData< RefCountedPtr< VCAggStencil > > m_opEBStencil[CH_SPACEDIM]
Definition: NWOEBViscousTensorOp.H:654
virtual void kappaScale(LevelData< EBCellFAB > &a_rhs)
it's tga's world—we just live in it.
Definition: NWOEBViscousTensorOp.H:142
void writeEBLevelname(const LevelData< EBCellFAB > *a_dataPtr, const char *a_filename)
bool m_hasFine
Definition: NWOEBViscousTensorOp.H:644
Definition: EBFaceFAB.H:28
Real m_dx
Definition: NWOEBViscousTensorOp.H:637
static void getFluxStencil(VoFStencil &a_fluxStencil, const RefCountedPtr< LevelData< EBFluxFAB > > &a_eta, const RefCountedPtr< LevelData< EBFluxFAB > > &a_lambda, const Real &a_dx, const EBLevelGrid &a_eblg, const FaceIndex &a_face, const DataIndex &a_dit, int a_ivar)
static for code reuse in bcs
static void getFaceCenteredFluxStencil(VoFStencil &a_fluxStencil, const RefCountedPtr< LevelData< EBFluxFAB > > &a_eta, const RefCountedPtr< LevelData< EBFluxFAB > > &a_lambda, const Real &a_dx, const EBLevelGrid &a_eblg, const FaceIndex &a_face, const DataIndex &a_dit, int a_ivar)
static for code reuse in bcs
EBMGInterp m_ebInterp
Definition: NWOEBViscousTensorOp.H:673
virtual void scale(LevelData< EBCellFAB > &a_lhs, const Real &a_scale)
virtual void residual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, bool a_homogeneousPhysBC=false)
bool m_hasMGObjects
Definition: NWOEBViscousTensorOp.H:648
Piecewise constant interpolation.
Definition: EBMGInterp.H:33
EBLevelGrid m_eblg
Definition: NWOEBViscousTensorOp.H:609
const int SpaceDim
Definition: SPACE.H:38
Definition: AMRMultiGrid.H:39
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: NWOEBViscousTensorOp.H:227
VoF-centered stencil.
Definition: Stencils.H:60
void averageToCells(LevelData< EBCellFAB > &a_cellCoef, const LevelData< EBFluxFAB > &a_faceCoef, const LevelData< BaseIVFAB< Real > > &a_irregCoef)
RefCountedPtr< NWOEBQuadCFInterp > m_interpWithCoarser
Definition: NWOEBViscousTensorOp.H:666
void getVelDotSigma(LevelData< EBFluxFAB > &a_velDotSigma, const LevelData< EBFluxFAB > &a_vel, const LevelData< EBFluxFAB > &a_sigma)
virtual void axby(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, const LevelData< EBCellFAB > &a_y, Real a_a, Real a_b)
A EBFaceFAB-like container for edge-centered fluxes.
Definition: EBFluxFAB.H:25
NWOEBViscousTensorOp()
weak construction is bad
Definition: NWOEBViscousTensorOp.H:720
void cfinterp(const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse)
int m_refToFine
Definition: NWOEBViscousTensorOp.H:646
static bool s_turnOffBCs
Definition: NWOEBViscousTensorOp.H:599
Real m_alpha
Definition: NWOEBViscousTensorOp.H:614
virtual Real localMaxNorm(const LevelData< EBCellFAB > &a_rhs)
virtual Real norm(const LevelData< EBCellFAB > &a_rhs, int a_ord)
LayoutData< IntVectSet > m_ivsIrregCCFlux
Definition: NWOEBViscousTensorOp.H:715
Definition: EBCellFAB.H:29
void faceCenteredAverageCellsToFaces(EBFaceFAB &a_faceData, const EBCellFAB &a_cellData, const Box &ccFluxBox, const EBISBox &a_ebisBox, const ProblemDomain &a_domain, const DataIndex &a_dit, int isrc, int idst, int inco)
LayoutData< VoFIterator > m_vofIterDomLo[CH_SPACEDIM]
Definition: NWOEBViscousTensorOp.H:662
double Real
Definition: REAL.H:33
Copier m_exchangeCopier
Definition: NWOEBViscousTensorOp.H:680
void getVoFStencil(VoFStencil &a_vofStencil, const VolIndex &a_vof, const DataIndex &a_dit, int a_ivar)
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
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)
void averageCellToFace(EBFaceFAB &a_fluxData, const EBCellFAB &a_cellData, const Box &a_grid, const EBISBox &a_ebisBox, const ProblemDomain &a_domain, const DataIndex &a_dit, int isrc, int idst, int inco, bool a_interpolateToCentroid)
LayoutData< BaseIVFAB< Real > > m_betaDiagWeight
Definition: NWOEBViscousTensorOp.H:619
RefCountedPtr< ViscousBaseEBBC > m_ebBC
Definition: NWOEBViscousTensorOp.H:678
virtual void calculateRelaxationCoefficient()
Real m_dxCoar
Definition: NWOEBViscousTensorOp.H:638
virtual void outputAMR(Vector< LevelData< EBCellFAB > * > &a_rhs, string &a_name)
Definition: NWOEBViscousTensorOp.H:133
Real m_beta
Definition: NWOEBViscousTensorOp.H:615
RefCountedPtr< LevelData< EBCellFAB > > m_acoef
Definition: NWOEBViscousTensorOp.H:623
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.
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)
static Real staticMaxNorm(const LevelData< EBCellFAB > &a_rhs, const EBLevelGrid &a_eblg)
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)
Vector< IntVect > m_colors
Definition: NWOEBViscousTensorOp.H:679
void reflux(const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, LevelData< EBCellFAB > &residual, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
void fillVelGhostTimed(const LevelData< EBCellFAB > &a_phi, bool a_homog, TimedDataIterator &a_dit) const
EBMGAverage m_ebAverageMG
Definition: NWOEBViscousTensorOp.H:670
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
LayoutData< BaseIVFAB< Real > > m_alphaDiagWeight
Definition: NWOEBViscousTensorOp.H:617
virtual void create(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs)
virtual void createCoarsened(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_rhs, const int &a_refRat)
Definition: DataIndex.H:112
virtual void AMROperatorNF(LevelData< EBCellFAB > &a_LofPhi, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiCoarse, bool a_homogeneousBC)
virtual void fillGrad(const LevelData< EBCellFAB > &a_phi)
a leveltgaism
Definition: NWOEBViscousTensorOp.H:196
Piecewise constant interpolation.
Definition: EBMGAverage.H:31
LayoutData< VoFIterator > m_vofIterMulti
Definition: NWOEBViscousTensorOp.H:660
virtual void calculateAlphaWeight()
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
void fillVelGhost(const EBCellFAB &a_phi, const DataIndex &a_datInd, bool a_homog) const
void incrementFRCoar(EBFastFR &a_fr, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi)
Definition: FArrayBox.H:45
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)
RefCountedPtr< LevelData< BaseIVFAB< Real > > > m_etaIrreg
Definition: NWOEBViscousTensorOp.H:627
LevelData< EBCellFAB > m_relCoef
Definition: NWOEBViscousTensorOp.H:657
EBMGAverage m_ebAverage
Definition: NWOEBViscousTensorOp.H:669
virtual void AMRRestrict(LevelData< EBCellFAB > &a_resCoarse, const LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection, bool a_skip_res=false)
NWOEBViscousTensorOp(const NWOEBViscousTensorOp &a_opin)
Definition: NWOEBViscousTensorOp.H:726
static int s_step
Definition: NWOEBViscousTensorOp.H:62
Volume of Fluid Index.
Definition: VolIndex.H:31
void incrementFRFine(EBFastFR &a_fr, const LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phi, AMRLevelOp< LevelData< EBCellFAB > > *a_finerOp)
virtual void outputLevel(LevelData< EBCellFAB > &a_rhs, string &a_name)
Definition: NWOEBViscousTensorOp.H:125
virtual void applyOp(LevelData< EBCellFAB > &a_opPhi, const LevelData< EBCellFAB > &a_phi, bool a_homogeneousPhysBC)
RefCountedPtr< ViscousBaseDomainBC > m_domainBC
Definition: NWOEBViscousTensorOp.H:677
int m_refToCoar
Definition: NWOEBViscousTensorOp.H:647
Definition: EBISLayout.H:39
LayoutData< VoFIterator > m_vofIterIrreg
Definition: NWOEBViscousTensorOp.H:659
LayoutData< RefCountedPtr< DivergenceStencil > > m_divergenceStencil
Definition: NWOEBViscousTensorOp.H:604
virtual void AMRUpdateResidual(LevelData< EBCellFAB > &a_residual, const LevelData< EBCellFAB > &a_correction, const LevelData< EBCellFAB > &a_coarseCorrection)
virtual void setAlphaAndBeta(const Real &a_alpha, const Real &a_beta)
for tga to reset stuff
virtual void preCond(LevelData< EBCellFAB > &a_opPhi, const LevelData< EBCellFAB > &a_phi)
void gsrbColor(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, const IntVect &a_color)
virtual void getFlux(EBFluxFAB &a_flux, const LevelData< EBCellFAB > &a_data, const Box &a_grid, const DataIndex &a_dit, Real a_scale)
another leveltgaism
virtual void incr(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, Real a_scale)
virtual void restrictResidual(LevelData< EBCellFAB > &a_resCoarse, LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_rhsFine)
virtual void diagonalScale(LevelData< EBCellFAB > &a_rhs, bool a_kappaWeighted)
another tgaism
Definition: NWOEBViscousTensorOp.H:168
DataIterator dataIterator() const
Parallel iterator.
void getShearStressDotGradU(LevelData< EBCellFAB > &a_source, const LevelData< EBCellFAB > &a_gradU, int a_level)
compute (tau dot grad u) (for energy equation)
void getCCSigma(LevelData< EBCellFAB > &a_source, const LevelData< EBCellFAB > &a_gradU, const LevelData< EBCellFAB > &a_eta, const LevelData< EBCellFAB > &a_lambda)
void applyOpIrregular(EBCellFAB &a_lhs, const EBCellFAB &a_phi, const bool &a_homogeneous, const DataIndex &a_datInd)
void relaxTimed(LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_rhs, TimedDataIterator &a_dit, int a_iterations)
static bool s_doLazyRelax
Definition: NWOEBViscousTensorOp.H:602
void applyOpRegular(EBCellFAB &a_lhs, const EBCellFAB &a_phi, const bool &a_homogeneous, const DataIndex &a_datInd)
virtual void relax(LevelData< EBCellFAB > &a_e, const LevelData< EBCellFAB > &a_residual, int a_iterations)
EBMGInterp m_ebInterpMG
Definition: NWOEBViscousTensorOp.H:674
virtual void setToZero(LevelData< EBCellFAB > &a_lhs)
Definition: TimedDataIterator.H:23
bool m_hasCoar
Definition: NWOEBViscousTensorOp.H:645
virtual Real dotProduct(const LevelData< EBCellFAB > &a_1, const LevelData< EBCellFAB > &a_2)
IntVect m_ghostPhi
Definition: NWOEBViscousTensorOp.H:650
LayoutData< VoFIterator > m_vofIterDomHi[CH_SPACEDIM]
Definition: NWOEBViscousTensorOp.H:663
IntVect m_ghostRHS
Definition: NWOEBViscousTensorOp.H:651