22 #include "libmesh/off_io.h" 23 #include "libmesh/mesh_base.h" 24 #include "libmesh/edge_edge2.h" 25 #include "libmesh/face_tri3.h" 37 std::ifstream in (
name.c_str());
49 libmesh_assert_equal_to (this->
mesh().processor_id(), 0);
60 unsigned int nn, ne, nf;
67 libmesh_assert_equal_to (label,
"OFF");
73 Real x=0., y=0., z=0.;
76 for (
unsigned int n=0; n<nn; n++)
90 for (
unsigned int e=0; e<nf; e++)
104 libmesh_error_msg(
"Cannot open dimension 2 mesh file when configured without 2D support.");
109 std::unique_ptr<Elem> elem;
121 libmesh_error_msg(
"Unsupported nv = " << nv);
126 for (
unsigned int i=0; i<nv; i++)
129 elem->set_node(i) = the_mesh.
node_ptr(nid);
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
The libMesh namespace provides an interface to certain functionality in the library.
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
Add a new Node at Point p to the end of the vertex array, with processor_id procid.
This is the MeshBase class.
void read_stream(std::istream &in)
Implementation of the read() function.
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
void set_mesh_dimension(unsigned char d)
Resets the logical dimension of the mesh.
virtual void clear()
Deletes all the element and node data that is currently stored.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void read(const std::string &name) override
Reads in an OFF OOGL data file based on the string you pass it.
virtual const Node * node_ptr(const dof_id_type i) const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.