void AuxiliarySystem::computeScalarVars(ExecFlagType type) { Moose::perf_log.push("update_aux_vars_scalar()", "Execution"); // Reference to the current storage container const MooseObjectWarehouse<AuxScalarKernel> & storage = _aux_scalar_storage[type]; PARALLEL_TRY { // FIXME: run multi-threaded THREAD_ID tid = 0; if (storage.hasActiveObjects()) { _fe_problem.reinitScalars(tid); // Call compute() method on all active AuxScalarKernel objects const std::vector<MooseSharedPointer<AuxScalarKernel> > & objects = storage.getActiveObjects(tid); for (const auto & obj : objects) obj->compute(); const std::vector<MooseVariableScalar *> & scalar_vars = getScalarVariables(tid); for (const auto & var : scalar_vars) var->insert(solution()); } } PARALLEL_CATCH; Moose::perf_log.pop("update_aux_vars_scalar()", "Execution"); solution().close(); _sys.update(); }
void AuxiliarySystem::computeScalarVars(ExecFlagType type) { Moose::perf_log.push("update_aux_vars_scalar()","Solve"); std::vector<AuxWarehouse> & auxs = _auxs(type); PARALLEL_TRY { // FIXME: run multi-threaded THREAD_ID tid = 0; if (auxs[tid].scalars().size() > 0) { _mproblem.reinitScalars(tid); const std::vector<AuxScalarKernel *> & scalars = auxs[tid].scalars(); for (std::vector<AuxScalarKernel *>::const_iterator it = scalars.begin(); it != scalars.end(); ++it) { AuxScalarKernel * kernel = *it; kernel->compute(); } const std::vector<MooseVariableScalar *> & scalar_vars = getScalarVariables(tid); for (std::vector<MooseVariableScalar *>::const_iterator it = scalar_vars.begin(); it != scalar_vars.end(); ++it) { MooseVariableScalar * var = *it; var->insert(solution()); } } } PARALLEL_CATCH; Moose::perf_log.pop("update_aux_vars_scalar()","Solve"); solution().close(); _sys.update(); }
void AuxiliarySystem::computeScalarVars(ExecFlagType type) { setScalarVariableCoupleableTags(type); // Reference to the current storage container const MooseObjectWarehouse<AuxScalarKernel> & storage = _aux_scalar_storage[type]; if (storage.hasActiveObjects()) { TIME_SECTION(_compute_scalar_vars_timer); PARALLEL_TRY { // FIXME: run multi-threaded THREAD_ID tid = 0; if (storage.hasActiveObjects()) { _fe_problem.reinitScalars(tid); // Call compute() method on all active AuxScalarKernel objects const std::vector<std::shared_ptr<AuxScalarKernel>> & objects = storage.getActiveObjects(tid); for (const auto & obj : objects) obj->compute(); const std::vector<MooseVariableScalar *> & scalar_vars = getScalarVariables(tid); for (const auto & var : scalar_vars) var->insert(solution()); } } PARALLEL_CATCH; solution().close(); _sys.update(); }