当前位置: 首页>>代码示例>>C++>>正文


C++ Transient::postStep方法代码示例

本文整理汇总了C++中Transient::postStep方法的典型用法代码示例。如果您正苦于以下问题:C++ Transient::postStep方法的具体用法?C++ Transient::postStep怎么用?C++ Transient::postStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transient的用法示例。


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

示例1:

void
TransientMultiApp::finishStep()
{
  if (!_sub_cycling)
  {
    for (unsigned int i = 0; i < _my_num_apps; i++)
    {
      Transient * ex = _transient_executioners[i];
      ex->endStep();
      ex->postStep();
    }
  }
}
开发者ID:FHilty,项目名称:moose,代码行数:13,代码来源:TransientMultiApp.C

示例2:

void
TransientMultiApp::advanceStep()
{
  if (!_auto_advance && !_sub_cycling)
  {
    for (unsigned int i=0; i<_my_num_apps; i++)
    {
      /*FEProblemBase * problem =*/ appProblemBase(_first_local_app + i);
      Transient * ex = _transient_executioners[i];

      ex->endStep();
      ex->postStep();
      ex->incrementStepOrReject();
    }
  }
}
开发者ID:gnsteve,项目名称:moose,代码行数:16,代码来源:TransientMultiApp.C

示例3: swapper


//.........这里部分代码省略.........

          if (!converged)
          {
            mooseWarning(
                "While sub_cycling ", name(), _first_local_app + i, " failed to converge!\n");

            _failures++;

            if (_failures > _max_failures)
            {
              std::stringstream oss;
              oss << "While sub_cycling " << name() << _first_local_app << i << " REALLY failed!";
              throw MultiAppSolveFailure(oss.str());
            }
          }

          Real solution_change_norm = ex->getSolutionChangeNorm();

          if (_detect_steady_state)
            _console << "Solution change norm: " << solution_change_norm << std::endl;

          if (converged && _detect_steady_state && solution_change_norm < _steady_state_tol)
          {
            _console << "Detected Steady State!  Fast-forwarding to " << target_time << std::endl;

            at_steady = true;

            // Indicate that the next output call (occurs in ex->endStep()) should output,
            // regardless of intervals etc...
            problem.forceOutput();

            // Clean up the end
            ex->endStep(target_time - app_time_offset);
            ex->postStep();
          }
          else
          {
            ex->endStep();
            ex->postStep();
          }
        }

        // If we were looking for a steady state, but didn't reach one, we still need to output one
        // more time, regardless of interval
        if (!at_steady)
          problem.outputStep(EXEC_FORCED);

      } // sub_cycling
      else if (_tolerate_failure)
      {
        ex->takeStep(dt);
        ex->endStep(target_time - app_time_offset);
        ex->postStep();
      }
      else
      {
        _console << "Solving Normal Step!" << std::endl;

        if (_first && !_app.isRecovering())
          problem.advanceState();

        if (auto_advance)
          problem.allowOutput(true);

        ex->takeStep(dt);
开发者ID:FHilty,项目名称:moose,代码行数:66,代码来源:TransientMultiApp.C


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