void GMVIO::add_cell_centered_data (const std::string &cell_centered_data_name, const std::vector< Real > *cell_centered_data_vals)Takes a vector of cell-centered data to be plotted. You must ensure that for every active element e, v[e->id()] is a valid number. You can add an arbitrary number of different cell-centered data sets by calling this function multiple times.

{
libmesh_assert (cell_centered_data_vals != NULL);
// Make sure there are *at least* enough entries for all the active elements.
// There can also be entries for inactive elements, they will be ignored.
libmesh_assert (cell_centered_data_vals->size() >=
MeshOutput<MeshBase>::mesh().n_active_elem());
this->_cell_centered_data[cell_centered_data_name] = cell_centered_data_vals;
}

bool & GMVIO::binary () [inline]Flag indicating whether or not to write a binary file. While binary files may end up being smaller than equivalent ASCII files, they will almost certainly take longer to write. The reason for this is that the ostream::write() function which is used to write 'binary' data to streams, only takes a pointer to char as its first argument. This means if you want to write anything other than a buffer of chars, you first have to use a strange memcpy hack to get the data into the desired format. See the templated to_binary_stream() function below.

Definition at line 281 of file gmv_io.h.

References _binary.

Referenced by write(), and write_nodal_data().

{
return _binary;
}

void GMVIO::copy_nodal_solution (EquationSystems &es)If we read in a nodal solution while reading in a mesh, we can attempt to copy that nodal solution into an EquationSystems object.

void GMVIO::write_ascii_old_impl (const std::string &fname, const std::vector< Number > *v = NULL, const std::vector< std::string > *solution_names = NULL) [private]This method implements writing a mesh with nodal data to a specified file where the nodal data and variable names are optionally provided. This will write an ASCII file. This is the old implementation (using subcells) which was the default in libMesh-0.4.3-rc2.

virtual void MeshOutput< MeshBase >::write_equation_systems (const std::string &, const EquationSystems &) [virtual, inherited]This method implements writing a mesh with data to a specified file where the data is taken from the EquationSystems object.

Reimplemented in VTKIO.

void GMVIO::write_nodal_data (const std::string &fname, const std::vector< Number > &soln, const std::vector< std::string > &names) [virtual]This method implements reading a mesh from a specified file. Extension of the MeshInput::read() routine which also takes an optional EquationSystems pointer and tries to read field variables from the GMV file into the EquationSystems object. This method implements writing a mesh with nodal data to a specified file where the nodal data and variable names are provided.

Member Data Documentation

bool GMVIO::_binary [private]Flag to write binary data.

Definition at line 207 of file gmv_io.h.

Referenced by binary().

std::map<std::string, const std::vector<Real>* > GMVIO::_cell_centered_data [private]Storage for arbitrary cell-centered data. Ex: You can use this to plot the effectivity index for a given cell. The map is between the string representing the variable name and a pointer to a vector containing the data.