• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CH_TIME函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CH_TIME函数的典型用法代码示例。如果您正苦于以下问题:C++ CH_TIME函数的具体用法?C++ CH_TIME怎么用?C++ CH_TIME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CH_TIME函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CH_TIME

//-----------------------------------------------------------------------
//  AMR Factory define function
void VCAMRPoissonOp2Factory::define(const ProblemDomain&                           a_coarseDomain,
                                   const Vector<DisjointBoxLayout>&               a_grids,
                                   const Vector<int>&                             a_refRatios,
                                   const Real&                                    a_coarsedx,
                                   BCHolder                                       a_bc,
                                   const Real&                                    a_alpha,
                                   Vector<RefCountedPtr<LevelData<FArrayBox> > >& a_aCoef,
                                   const Real&                                    a_beta,
                                   Vector<RefCountedPtr<LevelData<FluxBox> > >&   a_bCoef)
{
  CH_TIME("VCAMRPoissonOp2Factory::define");

  setDefaultValues();

  m_boxes = a_grids;

  m_refRatios = a_refRatios;

  m_bc = a_bc;

  m_dx.resize(a_grids.size());
  m_dx[0] = a_coarsedx;

  m_domains.resize(a_grids.size());
  m_domains[0] = a_coarseDomain;

  m_exchangeCopiers.resize(a_grids.size());
  m_exchangeCopiers[0].exchangeDefine(a_grids[0], IntVect::Unit);
  m_exchangeCopiers[0].trimEdges(a_grids[0], IntVect::Unit);

  m_cfregion.resize(a_grids.size());
  m_cfregion[0].define(a_grids[0], m_domains[0]);

  for (int i = 1; i < a_grids.size(); i++)
    {
      m_dx[i] = m_dx[i-1] / m_refRatios[i-1];

      m_domains[i] = m_domains[i-1];
      m_domains[i].refine(m_refRatios[i-1]);

      m_exchangeCopiers[i].exchangeDefine(a_grids[i], IntVect::Unit);
      m_exchangeCopiers[i].trimEdges(a_grids[i], IntVect::Unit);

      m_cfregion[i].define(a_grids[i], m_domains[i]);
    }

  m_alpha = a_alpha;
  m_aCoef = a_aCoef;

  m_beta  = a_beta;
  m_bCoef = a_bCoef;
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:54,代码来源:VCAMRPoissonOp2.cpp


示例2: setSolverParams

void
EBCompositeCCProjector::
setSolverParams(int  a_numSmooths,
                int  a_iterMax,
                int  a_mgcycle,
                Real a_hang,
                Real a_tolerance,
                int  a_verbosity,
                Real a_normThresh)
{
  CH_TIME("EBCompositeCCProjector::setSolverParams");
  m_macProjector->setSolverParams(a_numSmooths, a_iterMax, a_mgcycle, a_hang, a_tolerance,a_verbosity,a_normThresh);
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:13,代码来源:EBCompositeCCProjector.cpp


示例3: averageStressToFaces

void
EBCompositeCCProjector::
averageStressToFaces(Vector<LevelData<EBFluxFAB>* >&  a_macVeloc,
                     Vector<LevelData<EBCellFAB>* >&  a_velocity)
{
  CH_TIME("EBCompositeCCProjector::averageVelocityToFaces");
  //interpolate and then send stuff on through to level function
  int ncomp = a_velocity[0]->nComp();
  Interval interv(0, ncomp-1);
  Vector<LevelData<EBCellFAB> *> amrPhi = m_macProjector->getPhi();
  for (int ilev = 0; ilev < m_numLevels; ilev++)
    {
      if (ilev > 0)
        {
          //so it can be reused quadcfi is a one-variable animal
          //when we have ebalias, we can accomplish this without copies.
          //for now, tough luck
          //use phi for scratch space
          LevelData<EBCellFAB>& phiCoar = *amrPhi[ilev-1];
          LevelData<EBCellFAB>& phiFine = *amrPhi[ilev  ];
          for (int idir = 0; idir < ncomp; idir++)
            {
              Interval phiInterv(0, 0);
              Interval velInterv(idir, idir);
              a_velocity[ilev-1]->copyTo(velInterv, phiCoar, phiInterv);
              a_velocity[ilev  ]->copyTo(velInterv, phiFine, phiInterv);
              m_quadCFI[ilev]->interpolate(phiFine,
                                           phiCoar,
                                           phiInterv);

              //on copy back, we need ghost cells, so do the data iterator loop
              for (DataIterator dit = phiFine.dataIterator(); dit.ok(); ++dit)
                {
                  Box region = phiFine[dit()].getRegion(); //includes ghost cells
                  (*a_velocity[ilev])[dit()].copy(region, velInterv, region, phiFine[dit()], phiInterv);
                }

              EBLevelDataOps::setVal(phiFine, 0.0);
              EBLevelDataOps::setVal(phiCoar, 0.0);
            }
        }
      a_velocity[ilev]->exchange(interv);
      ccpAverageStressToFaces(*a_macVeloc[ilev],
                              *a_velocity[ilev],
                              m_eblg[ilev].getDBL(),
                              m_eblg[ilev].getEBISL(),
                              m_eblg[ilev].getDomain(),
                              m_dx[ilev],
                              *m_eblg[ilev].getCFIVS());
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:51,代码来源:EBCompositeCCProjector.cpp


示例4: CH_TIME

void NonAggregatedEBStencil::applyInhomDomBC(EBCellFAB&             a_lofphi,
                                             const EBCellFAB&       a_phi,
                                             const Real             a_factor) const

{
  CH_TIME("NonAggregatedEBStencil::applyInhomDomBC");
  for (int isrc = 0; isrc < m_srcVofs.size(); isrc++)
    {
      const VolIndex& vof = m_srcVofs[isrc];
      Real& lphi       = a_lofphi(vof, m_destVar);
      const Real& sour = a_phi(vof,0);
      lphi += a_factor*sour;
    }
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:14,代码来源:NonAggregatedEBStencil.cpp


示例5: advectToFacesBCG

void
EBLevelAdvect::
advectToFacesBCG(EBFluxFAB&                         a_extrapState,
                 BaseIVFAB<Real>&                   a_boundaryPrim,
                 const EBCellFAB &                  a_consState,
                 const EBCellFAB &                  a_normalVel,
                 const EBFluxFAB &                  a_advectionVel,
                 const Box&                         a_cellBox,
                 const EBISBox&                     a_ebisBox,
                 const Real&                        a_dt,
                 const Real&                        a_time,
                 const EBCellFAB &                  a_source,
                 const DataIndex&                   a_dit,
                 bool   a_doBoundaryPrim)
{
  CH_TIME("EBLevelAdvect::advectToFacesBCG (fluxfab)");
  IntVectSet cfivs; //not used here.  only used in flux interpolation
  m_ebPatchAdvect[a_dit]->setTimeAndDt(a_time, a_dt);
  // EBCellFAB& primState = m_ebPatchAdvect[a_dit]->getPrimState();
  m_ebPatchAdvect[a_dit]->setVelocities(a_normalVel, a_advectionVel);

  //placeholder (no flattening used here)
  EBCellFAB flattening;
  //not reused
  EBCellFAB  slopesPrim[SpaceDim];
  EBCellFAB  slopesSeco[SpaceDim];
  bool verbose = false;

  m_ebPatchAdvect[a_dit]->extrapolateBCG(a_extrapState,
                                         // primState,
                                         slopesPrim,
                                         slopesSeco,
                                         flattening,
                                         a_consState,
                                         a_source,
                                         a_cellBox,
                                         a_dit,
                                         verbose);

  if (a_doBoundaryPrim)
    {
      IntVectSet irregIVS = a_ebisBox.getIrregIVS(a_cellBox);
      m_ebPatchAdvect[a_dit]->computeEBIrregFlux(a_boundaryPrim,
                                                 // primState,
                                                 a_consState,
                                                 slopesPrim,
                                                 irregIVS,
                                                 a_source);
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:50,代码来源:EBLevelAdvect.cpp


示例6: CH_TIME

void
MappedLevelFluxRegister::setToZero()
{
    CH_TIME("MappedLevelFluxRegister::setToZero");
    if (m_isDefined & FluxRegCoarseDefined) {
        for (DataIterator d = m_coarFlux.dataIterator(); d.ok(); ++d) {
            m_coarFlux[d].setVal(0.0);
        }
    }
    if (m_isDefined & FluxRegFineDefined) {
        for (DataIterator d = m_fineFlux.dataIterator(); d.ok(); ++d) {
            m_fineFlux[d].setVal(0.0);
        }
    }
}
开发者ID:UNC-CFD,项目名称:somar,代码行数:15,代码来源:MappedLevelFluxRegister.cpp


示例7: EBStenVarCoef

EBStenVarCoef::
EBStenVarCoef(const Vector<VolIndex>& a_srcVofs,
              const BaseIVFAB<VoFStencil>& a_vofStencil,
              const Box& a_box,
              const EBISBox& a_ebisBox,
              const IntVect& a_ghostVect,
              int a_varDest)
  : m_box(       a_box       ),
    m_ebisBox(   a_ebisBox   ),
    m_ghostVect( a_ghostVect ),
    m_destVar(   a_varDest   )
{
  CH_TIME("EBStenVarCoef::EBStenVarCoef");
  computeOffsets(a_srcVofs, a_vofStencil);
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:15,代码来源:EBStenVarCoef.cpp


示例8: residual

void EBPoissonOp::
residual(LevelData<EBCellFAB>&       a_residual,
         const LevelData<EBCellFAB>& a_phi,
         const LevelData<EBCellFAB>& a_rhs,
         bool                        a_homogeneousPhysBC)
{
  CH_TIME("EBPoissonOp::residual");
  //this is a multigrid operator so only homogeneous CF BC
  //and null coar level
  CH_assert(a_residual.ghostVect() == m_ghostCellsRHS);
  CH_assert(a_phi.ghostVect() == m_ghostCellsPhi);
  DataIterator dit = a_residual.dataIterator();
  applyOp(a_residual,a_phi, a_homogeneousPhysBC, dit );
  axby(a_residual,a_residual,a_rhs,-1.0, 1.0);
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:15,代码来源:EBPoissonOp.cpp


示例9: enforceGradientBC

void
EBCompositeMACProjector::
enforceGradientBC(Vector<LevelData<EBFluxFAB>* >&       a_grad,
                  const Vector<LevelData<EBCellFAB>* >& a_phi)
{
  CH_TIME("EBCompositeMACProjector::enforceGradientBC");
  for (int ilev = 0; ilev < m_numLevels; ilev++)
    {
      EBLevelMACProjector::setCurLevel(ilev);
      macEnforceGradientBC(*a_grad[ilev],  *a_phi[ilev],
                           m_eblg[ilev].getDBL(), m_eblg[ilev].getEBISL(),
                           m_eblg[ilev].getDomain(),   m_dx[ilev],
                           m_origin,m_time,m_baseDomainBCFactPhi);
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:15,代码来源:EBCompositeMACProjector.cpp


示例10: correctVelocityComponent

void
EBCompositeMACProjector::
correctVelocityComponent(Vector<LayoutData< Vector< BaseIVFAB<Real> * > >* >      &  a_coveredVelLo,
                         Vector<LayoutData< Vector< BaseIVFAB<Real> * > >* >      &  a_coveredVelHi,
                         const Vector< LayoutData< Vector< Vector<VolIndex> > >* >&  a_coveredFaceLo,
                         const Vector< LayoutData< Vector< Vector<VolIndex> > >* >&  a_coveredFaceHi,
                         const Vector< LayoutData< Vector< IntVectSet > >* >      &  a_coveredSetsLo,
                         const Vector< LayoutData< Vector< IntVectSet > >* >      &  a_coveredSetsHi,
                         const Vector<LevelData<EBFluxFAB>* >                     &  a_macGradient,
                         int                                                         a_coveredFaceDir,
                         int                                                         a_velComp)
{
  CH_TIME("EBCompositeMACProjector::correctVelocityComponent");
  for (int ilev = 0; ilev < m_numLevels; ilev++)
    {
      for (SideIterator sit; sit.ok(); ++sit)
        {
          LayoutData<Vector<BaseIVFAB<Real>* > >*        velPtr = NULL;
          const LayoutData<Vector<Vector<VolIndex> > >* facePtr = NULL;
          const LayoutData<Vector<IntVectSet>  >*       setsPtr = NULL;
          if (sit() == Side::Lo)
            {
              velPtr  =  a_coveredVelLo[ilev];
              facePtr = a_coveredFaceLo[ilev];
              setsPtr = a_coveredSetsLo[ilev];
            }
          else
            {
              velPtr  =  a_coveredVelHi[ilev];
              facePtr = a_coveredFaceHi[ilev];
              setsPtr = a_coveredSetsHi[ilev];
            }

          const LevelData<EBFluxFAB>& macGradient = *a_macGradient[ilev];
          for (DataIterator dit = m_eblg[ilev].getDBL().dataIterator(); dit.ok(); ++dit)
            {
              const EBFluxFAB       & macGradFAB  = macGradient[dit()];
              const Vector<VolIndex>& coveredFace =  (*facePtr)[dit()][a_coveredFaceDir];
              const IntVectSet      & coveredSets =  (*setsPtr)[dit()][a_coveredFaceDir];
              BaseIVFAB<Real>       & coveredVel  = *((*velPtr)[dit()][a_coveredFaceDir]);
              const EBISBox& ebisBox = m_eblg[ilev].getEBISL()[dit()];

              correctVelocityComponent(coveredVel, coveredFace, coveredSets, macGradFAB, ebisBox,
                                       a_coveredFaceDir, sit(), a_velComp);
            }
        }
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:48,代码来源:EBCompositeMACProjector.cpp


示例11: fillLambda

void
EBGradDivFilter::
fillLambda()
{
  CH_TIME("EBGradDivFilter::fillLambda");
  Real lambdaVal = 1.0e10;
  for (int idir = 0; idir < SpaceDim; idir++)
    {
      Real lambdaDir  = m_lambdaScale*m_dxFine[idir]*m_dxFine[idir];
      lambdaVal = Min(lambdaVal, lambdaDir);
    }
  for (DataIterator dit = m_gridsFine.dataIterator(); dit.ok(); ++dit)
    {
      m_lambda[dit()].setVal(lambdaVal);
    }
}
开发者ID:siddarthc,项目名称:CHOMBO-EBAMRRANS,代码行数:16,代码来源:EBGradDivFilter.cpp


示例12: redistribute

void
EBCoarToFineRedist::
redistribute(LevelData<EBCellFAB>& a_fineSolution,
             const Interval& a_variables)
{
  CH_TIME("EBCoarToFineRedist::redistribute");
  //copy the buffer to the fine layout
  m_regsCoar.copyTo(a_variables, m_regsCedFine, a_variables);
  //redistribute the coarsened fine registers to the fine solution
  for (DataIterator dit = m_gridsFine.dataIterator(); dit.ok(); ++dit)
    {
      const BaseIVFAB<Real>& regCoar = m_regsCedFine[dit()];
      const IntVectSet& ivsCoar = m_setsCedFine[dit()];
      const EBISBox& ebisBoxCoar = m_ebislCedFine[dit()];
      const BaseIVFAB<VoFStencil>& stenFAB = m_stenCedFine[dit()];

      EBCellFAB& solFAB = a_fineSolution[dit()];

      for (VoFIterator vofitCoar(ivsCoar, ebisBoxCoar.getEBGraph());
          vofitCoar.ok(); ++vofitCoar)
        {
          const VolIndex& srcVoFCoar = vofitCoar();
          const VoFStencil& vofsten = stenFAB(srcVoFCoar, 0);
          for (int isten = 0; isten < vofsten.size(); isten++)
            {
              const Real& weight = vofsten.weight(isten);
              const VolIndex& dstVoFCoar = vofsten.vof(isten);
              Vector<VolIndex> vofsFine =
                m_ebislCedFine.refine(dstVoFCoar,m_refRat, dit());

              for (int ivar = a_variables.begin();
                  ivar <= a_variables.end();  ivar++)
                {
                  Real dmCoar = regCoar(srcVoFCoar, ivar);
                  for (int ifine = 0; ifine < vofsFine.size(); ifine++)
                    {

                      const VolIndex& dstVoFFine = vofsFine[ifine];
                      //ufine += (wcoar*dmCoar) (piecewise constant density diff)
                      Real dUFine = dmCoar*weight;
                      solFAB(dstVoFFine, ivar) += dUFine;
                    }
                }
            }
        }
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:47,代码来源:EBCoarToFineRedist.cpp


示例13: setToZero

void
EBCoarToFineRedist::
setToZero()
{
  CH_TIME("EBCoarToFineRedist::setToZero");
  for (DataIterator dit = m_gridsCedFine.dataIterator();
      dit.ok(); ++dit)
    {
      m_regsCedFine[dit()].setVal(0.0);
    }

  for (DataIterator dit = m_gridsCoar.dataIterator();
      dit.ok(); ++dit)
    {
      m_regsCoar[dit()].setVal(0.0);
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:17,代码来源:EBCoarToFineRedist.cpp


示例14: setToZero

void
EBFineToCoarRedist::
setToZero()
{
  CH_TIME("EBFineToCoarRedist::setToZero");
  for (DataIterator dit = m_gridsRefCoar.dataIterator();
      dit.ok(); ++dit)
    {
      m_regsRefCoar[dit()].setVal(0.0);
    }

  for (DataIterator dit = m_gridsFine.dataIterator();
      dit.ok(); ++dit)
    {
      m_regsFine[dit()].setVal(0.0);
    }
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:17,代码来源:EBFineToCoarRedist.cpp


示例15: CH_TIME

void
EBMGInterp::pwcInterpMG(LevelData<EBCellFAB>&       a_fineData,
                        const LevelData<EBCellFAB>& a_coarData,
                        const Interval&             a_variables)
{
  CH_TIME("EBMGInterp::pwcInterpMG");
  CH_assert(a_fineData.ghostVect() == m_ghost);
  CH_assert(a_coarData.ghostVect() == m_ghost);

  for (DataIterator dit = m_coarGrids.dataIterator(); dit.ok(); ++dit)
    {
      pwcInterpFAB(a_fineData[dit()],
                   m_coarGrids[dit()],
                   a_coarData[dit()],
                   dit(),
                   a_variables);
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:18,代码来源:EBMGInterp.cpp


示例16: enforceVelocityBC

void
EBCompositeMACProjector::
enforceVelocityBC(Vector<LevelData<EBFluxFAB>* >&  a_velocity,
                  const bool&                      a_doDivFreeOutflow)
{
  CH_TIME("EBCompositeMACProjector::enforceVelocityBC");
  for (int ilev = 0; ilev < m_numLevels; ilev++)
    {
      macEnforceVelocityBC(*a_velocity[ilev],
                           m_eblg[ilev].getDBL(),
                           m_eblg[ilev].getEBISL(),
                           m_eblg[ilev].getDomain(),
                           m_dx[ilev],
                           m_origin,
                           m_baseDomainBCFactVel,
                           m_time,
                           a_doDivFreeOutflow,
                           NULL);
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:20,代码来源:EBCompositeMACProjector.cpp


示例17: preCond

void EBPoissonOp::
preCond(LevelData<EBCellFAB>&       a_lhs,
        const LevelData<EBCellFAB>& a_rhs)
{
  CH_TIME("EBPoissonOp::preCond");

  // Recall that the operator is: alpha*phi + beta*lap(phi)
  // For isotropic-dx Poisson: alpha=0,beta=1 and the
  //    diagonal term of this operator is: 4/h/h in 2D, 6/h/h in 3D,
  // For anisotropic-dx Helmholtz: alpha*phi + beta*lap(phi) and the
  //    diagonal term of this operator is: alpha - beta*(2/dx/dx + 2/dy/dy [+ 2/dz/dz])
  // Inverse of the diagonal term is our initial multiplier.

  getInvDiagRHS(a_lhs,a_rhs);
  //relax(a_lhs, a_rhs, m_numPreCondIters);
  for (int iter = 0; iter < m_numPreCondIters; iter++)
    {
      levelJacobi(a_lhs, a_rhs);
    }

}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:21,代码来源:EBPoissonOp.cpp


示例18: CH_TIME

void
EBCoarsen::define(const EBLevelGrid&             a_eblgFine,
                  const EBLevelGrid&             a_eblgCoar,
                  const int&                     a_nref,
                  const int&                     a_nvar)
{
  CH_TIME("EBCoarsen:define");
  CH_assert(a_nref > 0);
  CH_assert(a_nvar > 0);
  CH_assert(a_eblgFine.getDBL().coarsenable(a_nref));
  CH_assert(a_eblgFine.getEBIS()->isDefined());
  CH_assert(a_eblgCoar.getEBIS()->isDefined());
  m_cfivsPtr = a_eblgFine.getCFIVS();
  m_isDefined  = true;
  m_refRat     = a_nref;
  m_nComp      = a_nvar;
  m_gridsCoar  = a_eblgCoar.getDBL();
  m_gridsFine  = a_eblgFine.getDBL();
  m_ebislCoar  = a_eblgCoar.getEBISL();
  m_ebislFine  = a_eblgFine.getEBISL();
  m_domainCoar = a_eblgCoar.getDomain();
  m_domainFine = a_eblgFine.getDomain();

  IntVect ghost = 4*IntVect::Unit;
  int nghost = 4;

  m_coarsenedFineGrids = DisjointBoxLayout();
  coarsen(m_coarsenedFineGrids, m_gridsFine, m_refRat);
  a_eblgFine.getEBIS()->fillEBISLayout(m_coarsenedFineEBISL,
                                       m_coarsenedFineGrids,
                                       m_domainCoar, nghost);
  m_coarsenedFineEBISL.setMaxRefinementRatio(m_refRat, a_eblgFine.getEBIS());
  EBCellFactory ebcellfact(m_coarsenedFineEBISL);
  m_coarsenedFineData.define(m_coarsenedFineGrids, m_nComp,
                             ghost, ebcellfact);

  //define the coarsening stencil for irreg vofs and
  //  for coarse vofs next to the cf interface if refRat<4
  defineStencil(*a_eblgFine.getCFIVS());
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:40,代码来源:EBCoarsen.cpp


示例19: setSolverParams

void
EBCompositeMACProjector::
setSolverParams(int  a_numSmooths,
                int  a_iterMax,
                int  a_mgcycle,
                Real a_hang,
                Real a_tolerance,
                int  a_verbosity,
                Real a_normThresh)
{
  CH_TIME("EBCompositeMACProjector::setSolverParams");
  m_solver.setSolverParameters(a_numSmooths,
                               a_numSmooths,
                               a_numSmooths,
                               a_mgcycle,
                               a_iterMax,
                               a_tolerance,
                               a_hang,
                               a_normThresh);

  m_solver.m_verbosity = a_verbosity;

  if (m_bottomSolverType==0)
    {
      m_bottomSolverBiCG.m_verbosity = a_verbosity - 2;
      m_bottomSolverBiCG.m_hang = -0.1;//because BiCGStab can be a bouncy ride
    }
  else if (m_bottomSolverType==1)
    {
      m_bottomSolverSimp.setNumSmooths(128*a_numSmooths);
    }
  else if (m_bottomSolverType==2)
    {
      //GMRES
    }
  else
    {
      MayDay::Error("EBCompositeMACProjector::setSolverParams bad bottomSolverType");
    }
}
开发者ID:rsnemmen,项目名称:Chombo,代码行数:40,代码来源:EBCompositeMACProjector.cpp


示例20: colorGS

void EBPoissonOp::
colorGS(LevelData<EBCellFAB>&       a_phi,
        const LevelData<EBCellFAB>& a_rhs,
        const IntVect& a_color,
        int icolor)
{
  CH_TIME("EBPoissonOp::colorGS");

  //this is a multigrid operator so only homogeneous CF BC and null coar level
  CH_assert(a_rhs.ghostVect()    == m_ghostCellsRHS);
  CH_assert(a_phi.ghostVect()    == m_ghostCellsPhi);

  a_phi.exchange();


  Real weight = m_alpha;
  for (int idir = 0; idir < SpaceDim; idir++)
    {
      weight += -2.0 * m_beta * m_invDx2[idir];
    }
  weight = 1.0 / weight;


  for (DataIterator dit = a_phi.dataIterator(); dit.ok(); ++dit)
    {
      EBCellFAB& phifab = a_phi[dit()];
      m_colorEBStencil[icolor][dit()]->cache(phifab);
    }

  GSColorAllRegular(  a_phi, a_rhs, a_color, weight, true);

  for (DataIterator dit = a_phi.dataIterator(); dit.ok(); ++dit)
    {
      EBCellFAB& phifab = a_phi[dit()];
      m_colorEBStencil[icolor][dit()]->uncache(phifab);
    }

  GSColorAllIrregular(a_phi, a_rhs, a_color, true, icolor);
}
开发者ID:dtgraves,项目名称:EBAMRCNS,代码行数:39,代码来源:EBPoissonOp.cpp



注:本文中的CH_TIME函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CH_assert函数代码示例发布时间:2022-05-30
下一篇:
C++ CHSPEC_CHANNEL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap