void Console::output() { // Print Non-linear Residual if (onNonlinearResidual()) { if (_write_screen) Moose::out << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << outputNorm(_old_nonlinear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << std::scientific << _norm << std::endl; } // Print Linear Residual else if (onLinearResidual()) { if (_write_screen) Moose::out << std::setw(7) << _linear_iter << " Linear |R| = " << outputNorm(_old_linear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(7) << _linear_iter << std::scientific << " Linear |R| = " << std::scientific << _norm << std::endl; } // Call the base class output function else { writeVariableNorms(); TableOutputter::output(); } // Write the file if (_write_file) writeStream(); }
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 Console::output() { // Print Non-linear Residual if (onNonlinearResidual()) { if (_write_screen) Moose::out << _multiapp_indent << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << outputNorm(_old_nonlinear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(2) << _nonlinear_iter << " Nonlinear |R| = " << std::scientific << _norm << std::endl; } // Print Linear Residual else if (onLinearResidual()) { if (_write_screen) Moose::out << _multiapp_indent << std::setw(7) << _linear_iter << " Linear |R| = " << outputNorm(_old_linear_norm, _norm) << std::endl; if (_write_file) _file_output_stream << std::setw(7) << _linear_iter << std::scientific << " Linear |R| = " << std::scientific << _norm << std::endl; } // Call the base class output function else { // Write variable norms writeVariableNorms(); // Perform output of scalars and postprocessors TableOutput::output(); } // Write the file writeStreamToFile(); }