Пример #1
0
void
Nemesis::output(const ExecFlagType & type)
{
  if (!shouldOutput(type))
    return;

  // Clear the global variables (postprocessors and scalars)
  _global_names.clear();
  _global_values.clear();

  // Call the output methods
  AdvancedOutput::output(type);

  // Set up the whitelist of nodal variable names to write.
  _nemesis_io_ptr->set_output_variables(
      std::vector<std::string>(getNodalVariableOutput().begin(), getNodalVariableOutput().end()));

  // Write nodal data
  _nemesis_io_ptr->write_timestep(
      filename(), *_es_ptr, _nemesis_num, time() + _app.getGlobalTimeOffset());
  _nemesis_initialized = true;

  // Write elemental data
  std::vector<std::string> elemental(getElementalVariableOutput().begin(),
                                     getElementalVariableOutput().end());
  _nemesis_io_ptr->set_output_variables(elemental);
  _nemesis_io_ptr->write_element_data(*_es_ptr);

  // Increment output call counter for the current file
  _nemesis_num++;

  // Write the global variables (populated by the output methods)
  if (!_global_values.empty())
    _nemesis_io_ptr->write_global_data(_global_values, _global_names);
}
Пример #2
0
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);
}
Пример #3
0
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);
}
Пример #4
0
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);
}