20 #ifndef LIBMESH_UNV_IO_H 21 #define LIBMESH_UNV_IO_H 25 #include "libmesh/mesh_input.h" 26 #include "libmesh/mesh_output.h" 78 virtual void read (
const std::string &)
override;
83 virtual void write (
const std::string &)
override;
104 const std::vector<Number> *
get_data (
Node * node)
const;
129 void nodes_in (std::istream & in_file);
152 void nodes_out (std::ostream & out_file);
222 #endif // LIBMESH_UNV_IO_H void write_implementation(std::ostream &out_stream)
The actual implementation of the write function.
bool _verbose
should be be verbose?
UNVIO(MeshBase &mesh)
Constructor.
A Node is like a Point, but with more information.
bool & verbose()
Set the flag indicating if we should be verbose.
std::map< dof_id_type, Node * > _unv_node_id_to_libmesh_node_ptr
Maps UNV node IDs to libMesh Node*s.
static const std::string _elements_dataset_label
label for the element dataset
void nodes_in(std::istream &in_file)
Read nodes from file.
void read_implementation(std::istream &in_stream)
The actual implementation of the read function.
void read_dataset(std::string file_name)
Read a UNV data file containing a dataset of type "2414".
std::map< Node *, std::vector< Number > > _node_data
Map from libMesh Node* to data at that node, as read in by the read_dataset() function.
This class defines an abstract interface for Mesh output.
unsigned char max_elem_dimension_seen()
The libMesh namespace provides an interface to certain functionality in the library.
void nodes_out(std::ostream &out_file)
Outputs nodes to the file out_file.
static const std::string _groups_dataset_label
label for the groups dataset
void elements_out(std::ostream &out_file)
Outputs the element data to the file out_file.
This is the MeshBase class.
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
std::map< unsigned, unsigned > _unv_elem_id_to_libmesh_elem_id
Map UNV element IDs to libmesh element IDs.
bool need_D_to_e(std::string &number)
Replaces "1.1111D+00" with "1.1111e+00" if necessary.
const std::vector< Number > * get_data(Node *node) const
virtual ~UNVIO()
Destructor.
static const std::string _nodes_dataset_label
label for the node dataset
virtual void read(const std::string &) override
This method implements reading a mesh from a specified file.
void elements_in(std::istream &in_file)
Method reads elements and stores them in std::vector<Elem *> _elements in the same order as they come...
The UNVIO class implements the Ideas UNV universal file format.
void groups_in(std::istream &in_file)
Reads the "groups" section of the file.