void
AuxiliarySystem::computeNodalVars(ExecFlagType type)
{
  std::vector<AuxWarehouse> & auxs = _auxs(type);

  // Do we have some kernels to evaluate?
  bool have_block_kernels = false;
  for (std::set<SubdomainID>::const_iterator subdomain_it = _mesh.meshSubdomains().begin();
      subdomain_it != _mesh.meshSubdomains().end();
      ++subdomain_it)
  {
    have_block_kernels |= (auxs[0].activeBlockNodalKernels(*subdomain_it).size() > 0);
  }

  Moose::perf_log.push("update_aux_vars_nodal()","Solve");
  PARALLEL_TRY {
    if (have_block_kernels)
    {
      ConstNodeRange & range = *_mesh.getLocalNodeRange();
      ComputeNodalAuxVarsThread navt(_mproblem, *this, auxs);
      Threads::parallel_reduce(range, navt);

      solution().close();
      _sys.update();
    }
  }
  PARALLEL_CATCH;
  Moose::perf_log.pop("update_aux_vars_nodal()","Solve");

  //Boundary AuxKernels
  Moose::perf_log.push("update_aux_vars_nodal_bcs()","Solve");
  PARALLEL_TRY {
    // after converting this into NodeRange, we can run it in parallel
    ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
    ComputeNodalAuxBcsThread nabt(_mproblem, *this, auxs);
    Threads::parallel_reduce(bnd_nodes, nabt);

    solution().close();
    _sys.update();
  }
  PARALLEL_CATCH;
  Moose::perf_log.pop("update_aux_vars_nodal_bcs()","Solve");
}
Beispiel #2
0
void
AuxiliarySystem::computeNodalVars(ExecFlagType type)
{
  Moose::perf_log.push("update_aux_vars_nodal()", "Execution");

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

  // Block Nodal AuxKernels
  PARALLEL_TRY {
    if (nodal.hasActiveBlockObjects())
    {
      ConstNodeRange & range = *_mesh.getLocalNodeRange();
      ComputeNodalAuxVarsThread navt(_fe_problem, nodal);
      Threads::parallel_reduce(range, navt);

      solution().close();
      _sys.update();
    }
  }
  PARALLEL_CATCH;
  Moose::perf_log.pop("update_aux_vars_nodal()", "Execution");

  // Boundary Nodal AuxKernels
  Moose::perf_log.push("update_aux_vars_nodal_bcs()", "Execution");
  PARALLEL_TRY {
    if (nodal.hasActiveBoundaryObjects())
    {
      ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
      ComputeNodalAuxBcsThread nabt(_fe_problem, nodal);
      Threads::parallel_reduce(bnd_nodes, nabt);

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

  Moose::perf_log.pop("update_aux_vars_nodal_bcs()", "Execution");
}