libMesh
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
libMesh::OFFIO Class Reference

This class is responsible for reading an unstructured, triangulated surface in the standard OFF OOGL format. More...

#include <off_io.h>

Inheritance diagram for libMesh::OFFIO:
[legend]

Public Member Functions

 OFFIO (MeshBase &)
 Constructor. More...
 
virtual void read (const std::string &name) override
 Reads in an OFF OOGL data file based on the string you pass it. More...
 

Protected Member Functions

MeshBasemesh ()
 
void set_n_partitions (unsigned int n_parts)
 Sets the number of partitions in the mesh. More...
 
void skip_comment_lines (std::istream &in, const char comment_start)
 Reads input from in, skipping all the lines that start with the character comment_start. More...
 

Protected Attributes

std::vector< bool > elems_of_dimension
 A vector of bools describing what dimension elements have been encountered when reading a mesh. More...
 

Private Member Functions

void read_stream (std::istream &in)
 Implementation of the read() function. More...
 

Detailed Description

This class is responsible for reading an unstructured, triangulated surface in the standard OFF OOGL format.

Author
John W. Peterson
Date
2004 Reads OOF OOGL triangulated surface files.

Definition at line 39 of file off_io.h.

Constructor & Destructor Documentation

◆ OFFIO()

libMesh::OFFIO::OFFIO ( MeshBase mesh_in)
explicit

Constructor.

Takes a non-const Mesh reference which it will fill up with elements.

Definition at line 68 of file off_io.h.

68  :
69  MeshInput<MeshBase> (mesh_in)
70 {}

Member Function Documentation

◆ mesh()

MeshBase & libMesh::MeshInput< MeshBase >::mesh ( )
protectedinherited
Returns
The object as a writable reference.

Definition at line 169 of file mesh_input.h.

Referenced by libMesh::XdrIO::write_parallel().

170 {
171  if (_obj == nullptr)
172  libmesh_error_msg("ERROR: _obj should not be nullptr!");
173  return *_obj;
174 }
MeshBase * _obj
A pointer to a non-const object object.
Definition: mesh_input.h:114

◆ read()

virtual void libMesh::OFFIO::read ( const std::string &  name)
overridevirtual

Reads in an OFF OOGL data file based on the string you pass it.

Implements libMesh::MeshInput< MeshBase >.

◆ read_stream()

void libMesh::OFFIO::read_stream ( std::istream &  in)
private

Implementation of the read() function.

This function is called by the public interface function and implements reading the file.

◆ set_n_partitions()

void libMesh::MeshInput< MeshBase >::set_n_partitions ( unsigned int  n_parts)
protectedinherited

Sets the number of partitions in the mesh.

Typically this gets done by the partitioner, but some parallel file formats begin "pre-partitioned".

Definition at line 91 of file mesh_input.h.

References libMesh::MeshInput< MT >::mesh().

91 { this->mesh().set_n_partitions() = n_parts; }
unsigned int & set_n_partitions()
Definition: mesh_base.h:1371

◆ skip_comment_lines()

void libMesh::MeshInput< MeshBase >::skip_comment_lines ( std::istream &  in,
const char  comment_start 
)
protectedinherited

Reads input from in, skipping all the lines that start with the character comment_start.

Definition at line 179 of file mesh_input.h.

181 {
182  char c, line[256];
183 
184  while (in.get(c), c==comment_start)
185  in.getline (line, 255);
186 
187  // put back first character of
188  // first non-comment line
189  in.putback (c);
190 }

Member Data Documentation

◆ elems_of_dimension

std::vector<bool> libMesh::MeshInput< MeshBase >::elems_of_dimension
protectedinherited

A vector of bools describing what dimension elements have been encountered when reading a mesh.

Definition at line 97 of file mesh_input.h.


The documentation for this class was generated from the following file: