On Thu, Aug 4, 2011 at 3:48 AM, robert <robert.bod...@unil.ch> wrote: > Hi, > > could you just tell me how you implemented the public members > 'element_attributes' and 'node_attributes'? In tetgen_io.C I just tried: > > std::vector<Real> el_attr; > // Read attributes from the stream. > for (unsigned int j=0; j<nAttri; j++){ > ele_stream >> dummy; > ///roberts_region.push_back(dummy); /// by R.B. > el_attr.push_back(dummy); > } > if (el_attr.size()>0) /// by R.B. > element_attributes.push_back(el_attr); /// by R.B. > nAttriel = nAttri; /// by R.B. > > } > > where element_attributes is defined as public: std::vector< > std::vector<Real> > in tetgen_io.h. I did the same for node_attributes. > However, I get some bad alloc when reading the mesh.
Use the test code I posted as an example. There is no reason to have the vector el_attr or push_back() anything yourself, it's already handled by the TetGenIO class. -- John ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users