示例#1
0
文件: Exodus.C 项目: Gedema/moose
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++;
}
示例#2
0
文件: Exodus.C 项目: Gedema/moose
void
Exodus::outputElementalVariables()
{
  // Make sure the the file is ready for writing of elemental data
  if (!_exodus_initialized || !hasNodalVariableOutput())
    outputEmptyTimestep();

  // Write the elemental data
  _exodus_io_ptr->set_output_variables(getElementalVariableOutput());
  _exodus_io_ptr->write_element_data(*_es_ptr);
}
示例#3
0
文件: Exodus.C 项目: rppawlo/moose
void
Exodus::outputElementalVariables()
{
  // Make sure the the file is ready for writing of elemental data
  if (!_exodus_initialized || !hasNodalVariableOutput())
    outputEmptyTimestep();

  // Write the elemental data
  std::vector<std::string> elemental(getElementalVariableOutput().begin(), getElementalVariableOutput().end());
  _exodus_io_ptr->set_output_variables(elemental);
  _exodus_io_ptr->write_element_data(*_es_ptr);
}
示例#4
0
文件: Exodus.C 项目: WilkAndy/moose
void
Exodus::outputElementalVariables()
{
  // Make sure the the file is ready for writing of elemental data
  if (!_initialized)
    outputEmptyTimestep();

  std::vector<std::string> v = getElementalVariableOutput();
  for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)

  // Write the elemental data
  _exodus_io_ptr->set_output_variables(getElementalVariableOutput());
  _exodus_io_ptr->write_element_data(*_es_ptr);
}
示例#5
0
文件: Exodus.C 项目: huangh-inl/moose
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");
}