36 std::string name_node, name_ele, dummy;
37 std::string desc =
name;
42 if (name.rfind(
".node") < name.size())
46 std::size_t position = dummy.rfind(
".node");
47 name_ele = dummy.replace(position, 5,
".ele");
50 else if (name.rfind(
".ele") < name.size())
54 std::size_t position = dummy.rfind(
".ele");
55 name_node = dummy.replace(position, 4,
".node");
59 libmesh_error_msg(
"ERROR: Unrecognized file name: " << name);
62 std::ifstream node_stream (name_node.c_str());
63 std::ifstream ele_stream (name_ele.c_str());
65 if ( !node_stream.good() || !ele_stream.good() )
66 libmesh_error_msg(
"ERROR: One or both Input file(s) not good.\n" \
67 <<
"Error opening files " \
81 unsigned int n_node=0, f_n_id=0, nAttri=0, BoundMark=0;
83 std::vector<Number> AttriValue;
92 AttriValue.resize(nAttri);
94 for (
unsigned int i=0; i<n_node; i++)
96 node_stream >> f_n_id;
101 for (
unsigned int j=0; j<3; j++)
102 node_stream >> dummy_val;
105 for (
unsigned int j=0; j<nAttri; j++)
106 node_stream >> AttriValue[j];
110 node_stream >> dummy_val;
116 _node_data.insert (std::make_pair(node, AttriValue));
126 std::vector<Number> AttriValue;
134 AttriValue.resize(nAttri);
136 for (
unsigned int i=0; i<
n_elem; i++)
138 ele_stream >> f_e_id;
142 for (
unsigned int n=0; n<
n_nodes; n++)
143 ele_stream >> dummy_val;
146 for (
unsigned int j=0; j<nAttri; j++)
147 ele_stream >> AttriValue[j];
153 _elem_data.insert (std::make_pair(elem, AttriValue));
std::string name(const ElemQuality q)
A geometric point in (x,y,z) space associated with a DOF.
The base class for all geometric element types.
const dof_id_type n_nodes
const Elem * foreign_id_to_elem(const unsigned int fid) const
std::string _data_descriptor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Node * foreign_id_to_node(const unsigned int fid) const
std::map< const Node *, std::vector< Number > > _node_data
void read_tetgen(const std::string &name)
std::map< const Elem *, std::vector< Number > > _elem_data