示例#1
0
文件: Nemesis.C 项目: idaholab/moose
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
文件: Exodus.C 项目: rppawlo/moose
void
Exodus::outputNodalVariables()
{
  // Set the output variable to the nodal variables
  std::vector<std::string> nodal(getNodalVariableOutput().begin(), getNodalVariableOutput().end());
  _exodus_io_ptr->set_output_variables(nodal);

  // Write the data via libMesh::ExodusII_IO
  _exodus_io_ptr->write_timestep(filename(), *_es_ptr, _exodus_num, time() + _app.getGlobalTimeOffset());
  _exodus_num++;

  // This satisfies the initialization of the ExodusII_IO object
  _exodus_initialized = true;
}
示例#3
0
文件: Exodus.C 项目: WilkAndy/moose
void
Exodus::outputNodalVariables()
{
  // Set the output variable to the nodal variables
  _exodus_io_ptr->set_output_variables(getNodalVariableOutput());

  // Write the data via libMesh::ExodusII_IO
  _exodus_io_ptr->write_timestep(filename(), *_es_ptr, _exodus_num, _time + _app.getGlobalTimeOffset());

  // This satisfies the initialization of the ExodusII_IO object
  _initialized = true;
}