void Output::outputStep() { // Set output initial related flags, outputting of initial is over at the first call to outputStep _on_initial = false; _output_initial = false; // Only perform output if you should if (!shouldOutput()) return; // If the mesh has changed or the sequence state is true or if it has not been called, call the outputSetup() function if (_mesh_changed || _sequence || _num == 0 || !_output_setup_called) { // Execute the setup function outputSetup(); // Reset the _mesh_changed flag _mesh_changed = false; // outputSetup has been called _output_setup_called = true; } // Update the output number _num++; // Perform the output output(); // Set the force output flag to false _force_output = false; }
void Output::outputFinal() { // If the intermediate steps are being output and the final time step is on an interval it will already have been output by outputStep, so do nothing if (checkInterval() && _output_intermediate) return; // Do nothing if output is not forced or if output is disallowed if (!_force_output && !_allow_output) return; // Do nothing if the output is not forced and final output is not desired if (!_force_output && !_output_final) return; // If the mesh has changed or the sequence state is true, call the outputSetup() function if (_mesh_changed || _sequence || !_output_setup_called) { outputSetup(); _output_setup_called = true; } // Perform the output output(); // Set the force output flag to false _force_output = false; }
void OutputBase::outputStep() { // Do nothing if output is not forced and is not allowed if (!_force_output && !_allow_output) return; // Only continue if output is not forced and the output is on an inveval if (!_force_output && !checkInterval()) return; // If the mesh has changed or the sequence state is true or if it has not been called, call the outputSetup() function if (_mesh_changed || _sequence || _num == 0 || !_output_setup_called) { // Execute the setup function outputSetup(); // Reset the _mesh_changed flag _mesh_changed = false; // outputSetup has been called _output_setup_called = true; } // Update the output number _num++; // Perform the output output(); // Set the force output flag to false _force_output = false; }
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 Output::outputInitial() { if (shouldOutput()) { outputSetup(); _mesh_changed = false; _output_setup_called = true; output(); _num++; } // Set the force output flag to false _force_output = false; }
void Exodus::output(const ExecFlagType & type) { // Do nothing if there is nothing to output if (!hasOutput(type)) return; // Start the performance log Moose::perf_log.push("Exodus::output()", "Output"); // Prepare the ExodusII_IO object outputSetup(); LockFile lf(filename(), processor_id() == 0); // Adjust the position of the output if (_app.hasOutputPosition()) _exodus_io_ptr->set_coordinate_offset(_app.getOutputPosition()); // Clear the global variables (postprocessors and scalars) _global_names.clear(); _global_values.clear(); // Call the individual output methods AdvancedOutput::output(type); // 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); } // Write the input file record if it exists and the output file is initialized if (!_input_record.empty() && _exodus_initialized) { _exodus_io_ptr->write_information_records(_input_record); _input_record.clear(); } // Reset the mesh changed flag _exodus_mesh_changed = false; // Stop the logging Moose::perf_log.pop("Exodus::output()", "Output"); }
void OutputBase::outputFinal() { // Do nothing if output is not force or if output is disallowed if (!_force_output && !_allow_output) return; // Do nothing if the output is not forced and final output is not desired if (!_force_output && !_output_final) return; // If the mesh has changed or the sequence state is true, call the outputSetup() function if (_mesh_changed || _sequence || !_output_setup_called) { outputSetup(); _output_setup_called = true; } // Perform the output output(); // Set the force output flag to false _force_output = false; }