コード例 #1
0
ファイル: AuxiliarySystem.C プロジェクト: gnsteve/moose
void
AuxiliarySystem::computeElementalVars(ExecFlagType type)
{
  Moose::perf_log.push("update_aux_vars_elemental()", "Execution");

  // Reference to the Nodal AuxKernel storage
  const MooseObjectWarehouse<AuxKernel> & elemental = _elemental_aux_storage[type];

  // Block Elemental AuxKernels
  PARALLEL_TRY {
    if (elemental.hasActiveBlockObjects())
    {
      ConstElemRange & range = *_mesh.getActiveLocalElementRange();
      ComputeElemAuxVarsThread eavt(_fe_problem, elemental, true);
      Threads::parallel_reduce(range, eavt);

      solution().close();
      _sys.update();
    }

    // Boundary Elemental AuxKernels
    if (elemental.hasActiveBoundaryObjects())
    {
      ConstBndElemRange & bnd_elems = *_mesh.getBoundaryElementRange();
      ComputeElemAuxBcsThread eabt(_fe_problem, elemental, true);
      Threads::parallel_reduce(bnd_elems, eabt);

      solution().close();
      _sys.update();
    }

  }
  PARALLEL_CATCH;
  Moose::perf_log.pop("update_aux_vars_elemental()", "Execution");
}
コード例 #2
0
void
AuxiliarySystem::computeElementalVars(ExecFlagType type)
{
  Moose::perf_log.push("update_aux_vars_elemental()","Solve");

  std::vector<AuxWarehouse> & auxs = _auxs(type);
  bool need_materials = true; //type != EXEC_INITIAL;

  PARALLEL_TRY {
    bool element_auxs_to_compute = false;

    for (unsigned int i=0; i<auxs.size(); i++)
      element_auxs_to_compute |= auxs[i].allElementKernels().size();

    if (element_auxs_to_compute)
    {
      ConstElemRange & range = *_mesh.getActiveLocalElementRange();
      ComputeElemAuxVarsThread eavt(_mproblem, *this, auxs, need_materials);
      Threads::parallel_reduce(range, eavt);

      solution().close();
      _sys.update();
    }

    bool bnd_auxs_to_compute = false;
    for (unsigned int i=0; i<auxs.size(); i++)
      bnd_auxs_to_compute |= auxs[i].allElementalBCs().size();
    if (bnd_auxs_to_compute)
    {
      ConstBndElemRange & bnd_elems = *_mesh.getBoundaryElementRange();
      ComputeElemAuxBcsThread eabt(_mproblem, *this, auxs, need_materials);
      Threads::parallel_reduce(bnd_elems, eabt);

      solution().close();
      _sys.update();
    }

  }
  PARALLEL_CATCH;
  Moose::perf_log.pop("update_aux_vars_elemental()","Solve");
}