void Console::output(const ExecFlagType & type) { // Return if the current output is not on the desired interval if (type != EXEC_FINAL && !onInterval()) return; // Output the system information first; this forces this to be the first item to write by default // However, 'output_system_information_on' still operates correctly, so it may be changed by the user if (shouldOutput("system_information", type) && !(type == EXEC_INITIAL && _initialized)) outputSystemInformation(); // Write the input if (shouldOutput("input", type)) outputInput(); // Write the timestep information ("Time Step 0 ..."), this is controlled with "execute_on" if (type == EXEC_TIMESTEP_BEGIN || (type == EXEC_INITIAL && _execute_on.contains(EXEC_INITIAL)) || (type == EXEC_FINAL && _execute_on.contains(EXEC_FINAL))) writeTimestepInformation(); // Print Non-linear Residual (control with "execute_on") if (type == EXEC_NONLINEAR && _execute_on.contains(EXEC_NONLINEAR)) { if (_nonlinear_iter == 0) _old_nonlinear_norm = std::numeric_limits<Real>::max(); _console << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << outputNorm(_old_nonlinear_norm, _norm) << '\n'; _old_nonlinear_norm = _norm; } // Print Linear Residual (control with "execute_on") else if (type == EXEC_LINEAR && _execute_on.contains(EXEC_LINEAR)) { if (_linear_iter == 0) _old_linear_norm = std::numeric_limits<Real>::max(); _console << std::setw(7) << _linear_iter << " Linear |R| = " << outputNorm(_old_linear_norm, _norm) << '\n'; _old_linear_norm = _norm; } // Write variable norms else if (type == EXEC_TIMESTEP_END) writeVariableNorms(); // Write Postprocessors and Scalars if (shouldOutput("postprocessors", type)) outputPostprocessors(); if (shouldOutput("scalars", type)) outputScalarVariables(); // Write the file writeStreamToFile(); }
void OutputBase::output() { // Call the various output types, if data exists if (hasNodalVariableOutput()) outputNodalVariables(); if (hasElementalVariableOutput()) outputElementalVariables(); if (hasPostprocessorOutput()) outputPostprocessors(); if (hasScalarOutput()) outputScalarVariables(); }
void AdvancedOutput<T>::output(const ExecFlagType & type) { // Call the various output types, if data exists if (shouldOutput("nodal", type)) { outputNodalVariables(); _last_output_time["nodal"] = T::_time; } if (shouldOutput("elemental", type)) { outputElementalVariables(); _last_output_time["elemental"] = T::_time; } if (shouldOutput("postprocessors", type)) { outputPostprocessors(); _last_output_time["postprocessors"] = T::_time; } if (shouldOutput("vector_postprocessors", type)) { outputVectorPostprocessors(); _last_output_time["vector_postprocessors"] = T::_time; } if (shouldOutput("scalars", type)) { outputScalarVariables(); _last_output_time["scalars"] = T::_time; } if (shouldOutput("system_information", type)) { outputSystemInformation(); _last_output_time["system_information"] = T::_time; } if (shouldOutput("input", type)) { outputInput(); _last_output_time["input"] = T::_time; } }