- Timestamp:
- Mar 1, 2006 1:35:45 PM (18 years ago)
- Location:
- trunk/src/mesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mesh/mesh.cc
r249 r250 402 402 void RpMesh3d::print() 403 403 { 404 printf("Mesh nodes=%d elements=%d\n", m_numNodes, m_numElements); 404 405 string str; 405 406 xmlString(str); -
trunk/src/mesh/test_mesh.cc
r248 r250 1 #include <stdio.h> 1 2 #include <string> 2 3 #include "mesh.h" … … 58 59 if (mptr == NULL) 59 60 return 1; 61 62 printf("nodes=%d ", mptr->numNodes()); 63 printf("elem=%d ", mptr->numElements()); 64 printf("nnie=%d\n", mptr->elementSize()); 60 65 61 66 printf("Testing addAllNodes\n"); … … 127 132 meshptr->print(); 128 133 134 printf("Testing serialize\n"); 135 136 int nbytes=0; 137 char* buf = meshptr->serialize(nbytes); 138 139 FILE* fp = fopen("out.tmp", "w"); 140 fwrite(buf, 1, nbytes, fp); 141 fclose(fp); 142 143 printf("Testing deserialize\n"); 144 145 RpMesh3d *newmesh = new RpMesh3d("mymesh", Num_nodes, Num_elements, 4); 146 newmesh->deserialize(buf); 147 newmesh->print(); 148 129 149 return 0; 130 150 }
Note: See TracChangeset
for help on using the changeset viewer.