void Exodus::output() { // Clear the global variables (postprocessors and scalars) _global_names.clear(); _global_values.clear(); // Call the output methods OversampleOutput::output(); // Write the global variables (populated by the output methods) if (!_global_values.empty()) { if (!_exodus_initialized) outputEmptyTimestep(); _exodus_io_ptr->write_global_data(_global_values, _global_names); } if (_output_input) { outputInput(); _output_input = false; } // Increment output call counter, which is reset by outputSetup _exodus_num++; }
void OutputBase::outputInitial() { // Do Nothing if output is not force or if output is disallowed if (!_force_output && !_allow_output) return; // Output the initial condition, if desired if (_force_output || _output_initial) { outputSetup(); _mesh_changed = false; _output_setup_called = true; output(); _num++; } // Output the input, if desired and it has not been output previously if (_output_input) { // Produce warning if an input file does not exist // (parser/action system are not mandatory subsystems) if (_app.actionWarehouse().empty()) mooseWarning("There is no input file to be output"); // Call the input file output function outputInput(); // Do not allow the input file to be written again _output_input = false; } // Set the force output flag to false _force_output = false; }
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 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; } }
void Console::initialSetup() { // Set the string for multiapp output indending if (_app.getOutputWarehouse().multiappLevel() > 0) _multiapp_indent = COLOR_CYAN + _app.name() + ": " + COLOR_DEFAULT; // If file output is desired, wipe out the existing file if not recovering if (!_app.isRecovering()) writeStreamToFile(false); // Enable verbose output if Executioner has it enabled if (_app.getExecutioner()->isParamValid("verbose") && _app.getExecutioner()->getParam<bool>("verbose")) { _verbose = true; _pars.set<bool>("verbose") = true; } // Display a message to indicate the application is running (useful for MultiApps) if (_problem_ptr->hasMultiApps() || _app.getOutputWarehouse().multiappLevel() > 0) write(std::string("\nRunning App: ") + _app.name() + "\n"); // Output the performance log early if (getParam<bool>("setup_log_early")) write(Moose::setup_perf_log.get_perf_info()); // Output the input file if (_output_input) outputInput(); // Output the system information if (_system_information && _allow_output && !_force_output) outputSystemInformation(); // Output the timestep information timestepSetup(); }