23 #include "libmesh/matlab_io.h" 24 #include "libmesh/mesh_base.h" 25 #include "libmesh/face_tri3.h" 35 std::ifstream in (
name.c_str());
46 libmesh_assert_equal_to (this->
mesh().processor_id(), 0);
58 libmesh_error_msg(
"Cannot open dimension 2 mesh file when configured without 2D support.");
64 unsigned int nNodes=0, nElem=0;
70 libmesh_assert_greater (nNodes, 0);
71 libmesh_assert_greater (nElem, 0);
75 Real x=0., y=0., z=0.;
77 for (
unsigned int i=0; i<nNodes; i++)
88 unsigned int node=0, dummy=0;
90 for (
unsigned int i=0; i<nElem; i++)
95 for (
unsigned int n=0; n<3; n++)
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
virtual Node *& set_node(const unsigned int i)
virtual void read(const std::string &name) override
Reads in a matlab data file based on the string you pass it.
This is the base class from which all geometric element types are derived.
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.
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.
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.
void read_stream(std::istream &in)
Implementation of the read() function.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static std::unique_ptr< Elem > build_with_id(const ElemType type, dof_id_type id)
Calls the build() method above with a nullptr parent, and additionally sets the newly-created Elem's ...
virtual const Node * node_ptr(const dof_id_type i) const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.