Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeshSet Class Reference

The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh information. More...

#include <MeshSet.hpp>

Collaboration diagram for MeshSet:

Public Member Functions

 MeshSet ()
 
 ~MeshSet ()
 
void add_mesh (Mesquite::Mesh *mesh, MsqError &err)
 adds a mesh to the MeshSet. More...
 
void set_domain_constraint (MeshDomain *domain, MsqError &err)
 Sets the geometrical domain for the MeshSet. More...
 
Mesquite::MeshDomainget_domain_constraint ()
 Returns the domain associated with the MeshSet from which the Patch originates. More...
 
void get_meshes (msq_std::list< Mesquite::Mesh * > &mesh_list) const
 returns the list of mesh pointers previously added. More...
 
int space_dim () const
 Returns the number of coordinates in the Mesh's geometric coordinate system. More...
 
bool get_next_patch (PatchData &pd, PatchDataUser *pd_user, MsqError &err)
 Gets the next PatchData. More...
 
bool get_next_patch (PatchData &pd, PatchDataParameters &pd_params, MsqError &err)
 
void reset (MsqError &err)
 Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex. More...
 
void update_mesh (const PatchData &pd, MsqError &err)
 Updates the coordinates in the underlying mesh with the coordinates stored in PatchData. More...
 
void set_flag_to_cull (MsqVertex::FlagMask f_m)
 Sets the cullFlag. More...
 
bool clear_all_soft_fixed_flags (MsqError &err)
 
void write_vtk (const char *out_filebase, MsqError &err)
 
void write_gnuplot (const char *out_filebase, MsqError &err)
 
Meshget_current_mesh ()
 
 MeshSet ()
 
 ~MeshSet ()
 
void add_mesh (Mesquite::Mesh *mesh, MsqError &err)
 adds a mesh to the MeshSet. More...
 
void set_domain_constraint (MeshDomain *domain, MsqError &err)
 Sets the geometrical domain for the MeshSet. More...
 
Mesquite::MeshDomainget_domain_constraint ()
 Returns the domain associated with the MeshSet from which the Patch originates. More...
 
void get_meshes (msq_std::list< Mesquite::Mesh * > &mesh_list) const
 returns the list of mesh pointers previously added. More...
 
int space_dim () const
 Returns the number of coordinates in the Mesh's geometric coordinate system. More...
 
bool get_next_patch (PatchData &pd, PatchDataUser *pd_user, MsqError &err)
 Gets the next PatchData. More...
 
bool get_next_patch (PatchData &pd, PatchDataParameters &pd_params, MsqError &err)
 
void reset (MsqError &err)
 Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex. More...
 
void update_mesh (const PatchData &pd, MsqError &err)
 Updates the coordinates in the underlying mesh with the coordinates stored in PatchData. More...
 
void set_flag_to_cull (MsqVertex::FlagMask f_m)
 Sets the cullFlag. More...
 
bool clear_all_soft_fixed_flags (MsqError &err)
 
void write_vtk (const char *out_filebase, MsqError &err)
 
void write_gnuplot (const char *out_filebase, MsqError &err)
 
Meshget_current_mesh ()
 

Private Member Functions

bool get_next_elem_on_vert_patch (PatchData &, PatchDataParameters &, MsqError &)
 
bool get_next_global_patch (PatchData &, PatchDataParameters &, MsqError &)
 
bool get_next_elem_on_vert_patch (PatchData &, PatchDataParameters &, MsqError &)
 
bool get_next_global_patch (PatchData &, PatchDataParameters &, MsqError &)
 

Private Attributes

msq_std::list< Mesquite::Mesh * > meshSet
 Meshes in this MeshSet. More...
 
msq_std::list< Mesquite::Mesh * >
::iterator 
currentMesh
 Keeps track of which Mesh* we're currently working with in get_next_patch(). More...
 
Mesquite::VertexIteratorvertexIterator
 Keeps track of where we are in the current mesh's vertex list. More...
 
int spaceDim
 The number of coordinates in this mesh (2D or 3D) More...
 
Mesquite::EntityTopology elementType
 The topological dimension of the elements in this MeshSet, where Mesquite::TRIANGLE indicates 2D elements (faces) and Mesquite::TETRAHEDRON indicates 3D elements (regions). More...
 
msq_stdc::size_t * csrOffsets
 These are arrays that we cache so we don't have to reallocate at every patch. More...
 
Mesquite::EntityTopologyelemTopologies
 
bool * vertexOnBoundary
 
msq_stdc::size_t csrOffsetsSize
 
msq_stdc::size_t vertArraySize
 
msq_stdc::size_t elemArraySize
 
Mesquite::MeshDomainmDomain
 
Mesquite::MsqVertex::FlagMask cullFlag
 

Detailed Description

The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh information.

MeshSet objects are passed to the various Mesquite algorithms in order to assess the quality, improve the mesh, etc...

Definition at line 69 of file includeLinks/MeshSet.hpp.

Constructor & Destructor Documentation

MeshSet ( )

Definition at line 65 of file Mesh/MeshSet.cpp.

References MeshSet::cullFlag, and MsqVertex::MSQ_SOFT_FIXED.

65  :
66  vertexIterator(NULL),
67  spaceDim(0),
68  csrOffsets(0),
69 // csrData(0),
70 // vertArray(NULL),
71 // elemArray(NULL),
72  elemTopologies(0),
74  csrOffsetsSize(0),
75 // csrDataSize(0),
76  vertArraySize(0),
77  elemArraySize(0),
78  mDomain(NULL)
79 {
81 }
msq_stdc::size_t elemArraySize
msq_stdc::size_t vertArraySize
Mesquite::VertexIterator * vertexIterator
Keeps track of where we are in the current mesh&#39;s vertex list.
vertex is fixed. This flag can be set on and off.
msq_stdc::size_t csrOffsetsSize
int spaceDim
The number of coordinates in this mesh (2D or 3D)
msq_stdc::size_t * csrOffsets
These are arrays that we cache so we don&#39;t have to reallocate at every patch.
Mesquite::MeshDomain * mDomain
Mesquite::EntityTopology * elemTopologies
Mesquite::MsqVertex::FlagMask cullFlag
~MeshSet ( )

Definition at line 83 of file Mesh/MeshSet.cpp.

References MeshSet::csrOffsets, MeshSet::elemTopologies, MeshSet::meshSet, MeshSet::vertexIterator, and MeshSet::vertexOnBoundary.

84 {
85  // Delete the vertex iterator
86  delete vertexIterator;
87  // Release all of our meshes
88  list<Mesquite::Mesh*>::iterator it = meshSet.begin();
89  while(!(it == meshSet.end()))
90  (*it++)->release();
91 
92  // Delete cache arrays
93  delete [] csrOffsets;
94 // delete [] csrData;
95 // delete [] vertArray;
96 // delete [] elemArray;
97  delete [] elemTopologies;
98  delete [] vertexOnBoundary;
99 }
Mesquite::VertexIterator * vertexIterator
Keeps track of where we are in the current mesh&#39;s vertex list.
msq_stdc::size_t * csrOffsets
These are arrays that we cache so we don&#39;t have to reallocate at every patch.
Mesquite::EntityTopology * elemTopologies
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
MeshSet ( )
~MeshSet ( )

Member Function Documentation

void add_mesh ( Mesquite::Mesh mh,
MsqError err 
)

adds a mesh to the MeshSet.

If several meshes are added, the mesh information will be retrieved seamlessly, as if dealing with a single mesh.

adds a Mesquite::Mesh to the MeshSet. If used several times, it concatenates the vertices from several meshes into one Mesquite::MeshSet.

Definition at line 108 of file Mesh/MeshSet.cpp.

References Mesh::get_geometric_dimension(), MsqError::INVALID_STATE, MeshSet::meshSet, MSQ_ERRRTN, MSQ_SETERR, and MeshSet::spaceDim.

Referenced by Rocmop::smooth_mesquite().

109 {
110  // sets MeshSet::SpaceDim
111  int dim = mesh->get_geometric_dimension(err); MSQ_ERRRTN(err);
112  if (spaceDim == 0)
113  spaceDim = dim;
114  else if (dim != spaceDim)
115  {
116  MSQ_SETERR(err)( "Meshes of different dimensions added to the same MeshSet.",
118  return;
119  }
120 
121  // adds the Mesh* to the MeshSet.
122  meshSet.push_front(mesh);
123 }
int spaceDim
The number of coordinates in this mesh (2D or 3D)
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
object is in an invalid state
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.

Here is the call graph for this function:

Here is the caller graph for this function:

void add_mesh ( Mesquite::Mesh mesh,
MsqError err 
)

adds a mesh to the MeshSet.

If several meshes are added, the mesh information will be retrieved seamlessly, as if dealing with a single mesh.

bool clear_all_soft_fixed_flags ( MsqError err)

Definition at line 596 of file Mesh/MeshSet.cpp.

References MeshSet::currentMesh, EntityIterator::is_at_end(), MeshSet::meshSet, MSQ_CHKERR, MeshSet::reset(), and MeshSet::vertexIterator.

Referenced by TerminationCriterion::cleanup().

597 {
598  //variable to store the center vertex's fixed flag
599  MsqVertex::FlagMask fixed_byte;
600  bool finished_with_vertices=false;
601  // initialize everything.
602  if (!vertexIterator)
603  { reset(err); if(MSQ_CHKERR(err)) return false; }
604  // currentVertex is pointing at next potential center vertex.
605 
606  while(!finished_with_vertices){
607  // Move to next mesh if necessary
608  if (vertexIterator->is_at_end())
609  {
610  delete vertexIterator;
611  ++currentMesh;
612  if (currentMesh == meshSet.end())
613  {
614  vertexIterator = NULL;
615  finished_with_vertices=true;
616  }
617  if(!finished_with_vertices){
618  vertexIterator = (*currentMesh)->vertex_iterator(err);
619  if (MSQ_CHKERR(err)) return false;
620  }
621  }
622  //otherwise we check to see if this vertex has been culled
623  else{
624  //get the fixed_bit_flag
625  (*currentMesh)->vertex_get_byte(**vertexIterator,&fixed_byte, err);
626  if (MSQ_CHKERR(err)) return false;
627  fixed_byte &= (~MsqVertex::MSQ_SOFT_FIXED);
628  (*currentMesh)->vertex_set_byte(**vertexIterator,fixed_byte, err);
629  if (MSQ_CHKERR(err)) return false;
630  ++(*vertexIterator);
631  }
632  }
633  return true;
634 }
Mesquite::VertexIterator * vertexIterator
Keeps track of where we are in the current mesh&#39;s vertex list.
msq_std::list< Mesquite::Mesh * >::iterator currentMesh
Keeps track of which Mesh* we&#39;re currently working with in get_next_patch().
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
virtual bool is_at_end() const =0
Returns false until the iterator has been advanced PAST the last entity.
void reset(MsqError &err)
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex...

Here is the call graph for this function:

Here is the caller graph for this function:

bool clear_all_soft_fixed_flags ( MsqError err)
Mesh* get_current_mesh ( )
inline

Definition at line 146 of file includeLinks/MeshSet.hpp.

References MeshSet::currentMesh, and MeshSet::meshSet.

Referenced by CornerTagHandles::get_current_mesh().

147  { return meshSet.empty() ? 0 : *currentMesh; }
msq_std::list< Mesquite::Mesh * >::iterator currentMesh
Keeps track of which Mesh* we&#39;re currently working with in get_next_patch().
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.

Here is the caller graph for this function:

Mesh* get_current_mesh ( )
inline

Definition at line 146 of file src/Mesh/MeshSet.hpp.

References MeshSet::currentMesh, and MeshSet::meshSet.

147  { return meshSet.empty() ? 0 : *currentMesh; }
msq_std::list< Mesquite::Mesh * >::iterator currentMesh
Keeps track of which Mesh* we&#39;re currently working with in get_next_patch().
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
Mesquite::MeshDomain* get_domain_constraint ( )
inline

Returns the domain associated with the MeshSet from which the Patch originates.

NULL if no domain is defined.

Definition at line 88 of file src/Mesh/MeshSet.hpp.

References MeshSet::mDomain.

89  { return mDomain; }
Mesquite::MeshDomain * mDomain
Mesquite::MeshDomain* get_domain_constraint ( )
inline

Returns the domain associated with the MeshSet from which the Patch originates.

NULL if no domain is defined.

Definition at line 88 of file includeLinks/MeshSet.hpp.

References MeshSet::mDomain.

Referenced by PatchData::get_domain_normal_at_element(), PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), PatchData::set_mesh_set(), PatchData::snap_vertex_to_domain(), and PatchData::update_cached_normals().

89  { return mDomain; }
Mesquite::MeshDomain * mDomain

Here is the caller graph for this function:

void get_meshes ( msq_std::list< Mesquite::Mesh * > &  mesh_list) const
inline

returns the list of mesh pointers previously added.

Definition at line 92 of file includeLinks/MeshSet.hpp.

References MeshSet::meshSet.

93  { mesh_list = meshSet; }
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
void get_meshes ( msq_std::list< Mesquite::Mesh * > &  mesh_list) const
inline

returns the list of mesh pointers previously added.

Definition at line 92 of file src/Mesh/MeshSet.hpp.

References MeshSet::meshSet.

93  { mesh_list = meshSet; }
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
bool get_next_elem_on_vert_patch ( PatchData ,
PatchDataParameters ,
MsqError  
)
private
bool get_next_elem_on_vert_patch ( PatchData pd,
PatchDataParameters pd_params,
MsqError err 
)
private

Definition at line 208 of file Mesh/MeshSet.cpp.

References MeshSet::csrOffsets, MeshSet::csrOffsetsSize, MeshSet::cullFlag, MeshSet::currentMesh, PatchData::domainHint, MeshSet::elemArraySize, PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::ELEMENTS_ON_VERTEX_PATCH, MeshSet::elemTopologies, PatchDataParameters::get_culling_method_bits(), PatchData::get_element_array(), PatchDataParameters::get_nb_layers(), PatchData::get_vertex_array(), MeshDomain::hint(), i, PatchData::initialize_data(), EntityIterator::is_at_end(), MeshSet::mDomain, MeshSet::meshSet, MSQ_CHKERR, MSQ_ERRZERO, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, PatchData::mType, PatchData::NO_BOUNDARY_VTX, Mesquite::NO_DOMAIN_HINT, PatchData::NO_INTERIOR_VTX, MsqError::NOT_IMPLEMENTED, MeshSet::reset(), PatchDataMem< X >::resize(), PatchData::vertexArray, MsqVertex::vertexBitFlags, PatchData::vertexHandlesArray, and MeshSet::vertexIterator.

Referenced by MeshSet::get_next_patch().

211 {
212  size_t i;
213 
214  // Get the patch parameters.
215  long unsigned int culling_method_bits = pd_params.get_culling_method_bits();
216 
217  //variable to store the center vertex's fixed flag
218  MsqVertex::FlagMask center_fixed_byte;
219  // Make sure we're only getting a patch depth of 1
220  int num_layers = pd_params.get_nb_layers(err);
221  if (MSQ_CHKERR(err)) return false;
222 
223  if ((unsigned)num_layers > (unsigned)1)
224  {
225  MSQ_SETERR(err)( "no implementation for patch depth > 1.",
227  return false;
228  }
229 
230  // Set the patch type
232  pd.domainHint = NO_DOMAIN_HINT;
233  if (mDomain)
234  pd.domainHint = mDomain->hint();
235 
236  // If this is our first time through the mesh,
237  // initialize everything.
238  if (!vertexIterator)
239  {
240  reset(err);
241  if (MSQ_CHKERR(err)) return false;
242  }
243 
244  // currentVertex is pointing at next potential center vertex.
245  // Move forward in the list of vertices if necessary.
246  bool next_vertex_identified = false;
247  while (!next_vertex_identified)
248  {
249  // Move to next mesh if necessary
250  while (vertexIterator->is_at_end())
251  {
252  delete vertexIterator;
253  ++currentMesh;
254  if (currentMesh == meshSet.end())
255  {
256  vertexIterator = NULL;
257  return false;
258  }
259  vertexIterator = (*currentMesh)->vertex_iterator(err); MSQ_CHKERR(err);
260  }
261 
262  bool on_bnd = false;
263  bool is_mid = false;
265  (*currentMesh)->vertices_are_on_boundary(&vtx, &on_bnd, 1, err);
266  if (MSQ_CHKERR(err)) return false;
267  //(*currentMesh)->vertices_are_midnodes(&vtx, &is_mid, 1, err);
268  //if (MSQ_CHKERR(err)) return false;
269 
270  //always skip midnodes
271  if (is_mid)
272  {
273  vertexIterator->operator++();
274  }
275  //if this is a 'boundary' fixed flag, skip it now
276  else if ((culling_method_bits & PatchData::NO_BOUNDARY_VTX)
277  && (on_bnd==true))
278  {
279  ++(*vertexIterator);
280  }
281  else if ((culling_method_bits & PatchData::NO_INTERIOR_VTX)
282  && (on_bnd==false))
283  {
284  ++(*vertexIterator);
285  }
286  //otherwise we check to see if this vertex has been culled
287  else{
288  //get the fixed_bit_flag for the center vertex
289  (*currentMesh)->vertex_get_byte(**vertexIterator,&center_fixed_byte, err);
290  if (MSQ_CHKERR(err)) return false;
291 
292  //remove the hard fixed flag if it has been set
293  center_fixed_byte &= ~(MsqVertex::MSQ_HARD_FIXED);
294  //if it is culled, skip it
295  if(center_fixed_byte & cullFlag)
296  {
297  ++(*vertexIterator);
298  }
299  else
300  {
301  // We found the right one
302  next_vertex_identified = true;
303  }//end else (vertex was not fixed [boundary] or culled)
304  }//end else (iterator was not at the end and vertex was not boundary)
305  }//end while (!next_vertex_identified)
307  vertexIterator->operator++();
308  if(num_layers == 0 ){
309  pd.vertexArray.resize( 1 );
310  MsqVertex* pd_vert_array = pd.get_vertex_array(err);
311  (*currentMesh)->vertices_get_coordinates(&vertex,
312  pd_vert_array,
313  1,
314  err); MSQ_ERRZERO(err);
315  pd_vert_array[0].vertexBitFlags=center_fixed_byte;
316 
317  pd.vertexHandlesArray.resize(1);
318  pd.vertexHandlesArray[0]=vertex;
319 
320  pd.initialize_data( NULL, err ); MSQ_ERRZERO(err);
321  return true;
322  }
323  // Get the number of elements in this vertex
324  size_t num_elems =
325  (*currentMesh)->vertex_get_attached_element_count(vertex, err);
326  if (MSQ_CHKERR(err)) return false;
327  pd.elementHandlesArray.resize( num_elems );
328 
329  // Get the elements attached to this vertex
330  if (elemArraySize < num_elems)
331  {
332  delete [] elemTopologies;
333  elemTopologies = new EntityTopology[num_elems];
334  elemArraySize = num_elems;
335  }
336 
337  (*currentMesh)->vertex_get_attached_elements(vertex,
338  &pd.elementHandlesArray[0],
339  num_elems, err);
340  if (MSQ_CHKERR(err)) return false;
341 
342  // Get the topologies of those elements
343  (*currentMesh)->elements_get_topologies(&pd.elementHandlesArray[0],
345  num_elems, err);
346  if (MSQ_CHKERR(err)) return false;
347 
348  // Figure out how many vertices we need to allocate
349  //size_t num_vert_uses = 1;
350  //size_t i;
351  //for (i = 0; i < num_elems; ++i)
352  // num_vert_uses += vertices_in_topology(elemTopologies[i]);
353  size_t num_vert_uses = (*currentMesh)->
354  get_vertex_use_count( &pd.elementHandlesArray[0], num_elems, err );
355  MSQ_ERRZERO(err);
356 
357  // All elems share at least 1 vertex (the center vertex). The
358  // center vertex is used 1 time, but it was counted num_elems times.
359  size_t num_verts = num_vert_uses - num_elems + 1;
360  pd.vertexHandlesArray.resize( num_verts );
361  pd.elementArray.resize( num_elems );
362  pd.elemConnectivityArray.resize( num_vert_uses );
363 
364  // Get the vertices attached to those elements
365 
366  if (csrOffsetsSize < num_elems + 1)
367  {
368  delete [] csrOffsets;
369  csrOffsets = new size_t[num_elems + 1];
370  csrOffsetsSize = num_elems + 1;
371  }
372  (*currentMesh)->elements_get_attached_vertices(&pd.elementHandlesArray[0],
373  num_elems,
374  &pd.vertexHandlesArray[0],
375  num_verts,
376  &pd.elemConnectivityArray[0],
377  num_vert_uses,
378  csrOffsets,
379  err);
380  if (MSQ_CHKERR(err)) return false;
381 
382  // Update with actual vertex count
383  pd.vertexHandlesArray.resize( num_verts );
384 
385  // Put the elements into the PatchData
386  MsqMeshEntity* pd_elem_array = pd.get_element_array(err);
387  for (i = 0; i < num_elems; ++i)
388  pd_elem_array[i].set_element_type( elemTopologies[i] );
389  pd.initialize_data( csrOffsets, err ); MSQ_ERRZERO(err);
390 
391  // Get the coordinates of the vertices and its flags.
392  pd.vertexArray.resize( num_verts );
393  MsqVertex* pd_vert_array = pd.get_vertex_array(err);
394  //get the coordinates
395  (*currentMesh)->vertices_get_coordinates(&pd.vertexHandlesArray[0],
396  pd_vert_array,
397  num_verts,
398  err);
399  if (MSQ_CHKERR(err)) return false;
400  for (i = 0; i < num_verts; i++)
401  {
402 
403  // If it's not the center vertex, mark it as hard fixed
404  if (pd.vertexHandlesArray[i] != vertex)
405  {
406  // Get its flags
407  (*currentMesh)->vertex_get_byte(pd.vertexHandlesArray[i],
408  &(pd_vert_array[i].vertexBitFlags),
409  err);
410  if (MSQ_CHKERR(err)) return false;
411  pd_vert_array[i].vertexBitFlags |= MsqVertex::MSQ_HARD_FIXED;
412  }
413  //else it is the center vertex. We therefore already have
414  //the fixed flag stored center_fixed_byte. The hard fixed
415  //flag has already been removed (when flag was retreived).
416  else{
417  pd_vert_array[i].vertexBitFlags = (center_fixed_byte);
418  }
419  }
420 
421  return true;
422 }
msq_stdc::size_t elemArraySize
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
EntityTopology
Definition: Mesquite.hpp:92
Mesquite::VertexIterator * vertexIterator
Keeps track of where we are in the current mesh&#39;s vertex list.
requested functionality is not (yet) implemented
EntityHandle VertexHandle
msq_stdc::size_t csrOffsetsSize
msq_std::list< Mesquite::Mesh * >::iterator currentMesh
Keeps track of which Mesh* we&#39;re currently working with in get_next_patch().
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
msq_stdc::size_t * csrOffsets
These are arrays that we cache so we don&#39;t have to reallocate at every patch.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
Mesquite::MeshDomain * mDomain
blockLoc i
Definition: read.cpp:79
virtual DomainHint hint() const =0
Give a hint about the nature of the domain for better performance.
Mesquite::EntityTopology * elemTopologies
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
vertex is always fixed. This can only be set on and never off.
Mesquite::MsqVertex::FlagMask cullFlag
virtual bool is_at_end() const =0
Returns false until the iterator has been advanced PAST the last entity.
void reset(MsqError &err)
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex...

Here is the call graph for this function:

Here is the caller graph for this function:

bool get_next_global_patch ( PatchData pd,
PatchDataParameters pd_params,
MsqError err 
)
private

Definition at line 425 of file Mesh/MeshSet.cpp.

References PatchData::domainHint, PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::get_element_array(), PatchData::get_vertex_array(), PatchData::GLOBAL_PATCH, MeshDomain::hint(), i, PatchData::initialize_data(), MeshSet::mDomain, MeshSet::meshSet, MSQ_CHKERR, MSQ_ERRZERO, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, PatchData::mType, Mesquite::NO_DOMAIN_HINT, MsqError::NOT_IMPLEMENTED, MeshSet::reset(), PatchDataMem< X >::resize(), PatchDataMem< X >::size(), MeshSet::vertArraySize, PatchData::vertexArray, MsqVertex::vertexBitFlags, PatchData::vertexHandlesArray, and MeshSet::vertexOnBoundary.

Referenced by MeshSet::get_next_patch().

428 {
429  // We only support global patches for a single Mesh
430  if (meshSet.size() != 1)
431  {
432  MSQ_SETERR(err)(
433  "Global patches only supported for single-Mesh MeshSets.",
435  return false;
436  }
437 
438  pd.mType = PatchData::GLOBAL_PATCH;
439  pd.domainHint = NO_DOMAIN_HINT;
440  if (mDomain)
441  pd.domainHint = mDomain->hint();
442 
443  // for a global patch, we always reset to start of the mesh.
444  reset(err);
445  if (MSQ_CHKERR(err)) return false;
446 
447  size_t i;
448 
449  // Get sizes for mesh data
450  size_t num_verts, num_elems, num_uses;
451  (*currentMesh)->get_all_sizes( num_verts, num_elems, num_uses, err ); MSQ_ERRZERO(err);
452 
453  // Get handles and connectivity
454  pd.vertexHandlesArray.resize( num_verts );
455  pd.elementHandlesArray.resize( num_elems );
456  pd.elemConnectivityArray.resize( num_uses );
457  msq_std::vector<size_t> offsets(num_elems+1);
458  (*currentMesh)->get_all_mesh( &pd.vertexHandlesArray[0], num_verts,
459  &pd.elementHandlesArray[0], num_elems,
460  &offsets[0], offsets.size(),
461  &pd.elemConnectivityArray[0],
462  pd.elemConnectivityArray.size(),
463  err ); MSQ_ERRZERO(err);
464 
465  // Get element topologies
466  pd.elementArray.resize( num_elems );
467  msq_std::vector<EntityTopology> elem_topologies(num_elems);
468  (*currentMesh)->elements_get_topologies( &pd.elementHandlesArray[0],
469  &elem_topologies[0],
470  num_elems, err );MSQ_ERRZERO(err);
471 
472  // Put them into the patch
473  MsqMeshEntity* pd_elem_array = pd.get_element_array(err);MSQ_ERRZERO(err);
474  for (i = 0; i < num_elems; ++i)
475  pd_elem_array[i].set_element_type( elem_topologies[i] );
476 
477  // Complete connectivity data in patch
478  pd.initialize_data( &offsets[0], err ); MSQ_ERRZERO(err);
479 
480 
481  // Get vertex coordinates
482  pd.vertexArray.resize( num_verts );
483  MsqVertex* pd_vert_array = pd.get_vertex_array(err);MSQ_ERRZERO(err);
484  (*currentMesh)->vertices_get_coordinates(&pd.vertexHandlesArray[0],
485  pd_vert_array,
486  num_verts,
487  err); MSQ_ERRZERO(err);
488 
489  // Get vertex boundary flag
490  if (vertArraySize < num_verts)
491  {
492  delete [] vertexOnBoundary;
493  vertArraySize = num_verts;
494  vertexOnBoundary = new bool[vertArraySize];
495  }
496  (*currentMesh)->vertices_are_on_boundary( &pd.vertexHandlesArray[0],
498  num_verts,
499  err );MSQ_ERRZERO(err);
500 
501  for (i = 0; i < num_verts; i++)
502  {
503  // Get its flags
504  /*(*currentMesh)->vertex_get_byte(vertArray[i],
505  &(pd_vert_array[i].vertexBitFlags),
506  err); MSQ_CHKERR(err);*/
507  // Set its hard-fixed flag
508  if (/*(*currentMesh)->vertex_is_fixed(vertArray[i], err) ||*/
509  vertexOnBoundary[i])
510  {
511  pd_vert_array[i].vertexBitFlags |= MsqVertex::MSQ_HARD_FIXED;
512  }
513  else
514  {
515  pd_vert_array[i].vertexBitFlags &= ~(MsqVertex::MSQ_HARD_FIXED);
516  }
517  }
518 
519  return true;
520 }
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
msq_stdc::size_t vertArraySize
requested functionality is not (yet) implemented
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
Mesquite::MeshDomain * mDomain
blockLoc i
Definition: read.cpp:79
virtual DomainHint hint() const =0
Give a hint about the nature of the domain for better performance.
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
vertex is always fixed. This can only be set on and never off.
void reset(MsqError &err)
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex...

Here is the call graph for this function:

Here is the caller graph for this function:

bool get_next_global_patch ( PatchData ,
PatchDataParameters ,
MsqError  
)
private
bool get_next_patch ( PatchData pd,
PatchDataUser pd_user,
MsqError err 
)
inline

Gets the next PatchData.

The type of the patch is usually set on the algorithm with set_patch_type() and propagated to the MeshSet. This version of the get_next_patch() function is the most often used. It actually delegates to the original get_next_patch function, which has a slightly different signature.

Definition at line 107 of file src/Mesh/MeshSet.hpp.

References PatchDataUser::get_all_parameters(), and MeshSet::get_next_patch().

110  {
111  return get_next_patch(pd, pd_user->get_all_parameters(), err);
112  }
bool get_next_patch(PatchData &pd, PatchDataUser *pd_user, MsqError &err)
Gets the next PatchData.

Here is the call graph for this function:

bool get_next_patch ( PatchData pd,
PatchDataUser pd_user,
MsqError err 
)
inline

Gets the next PatchData.

The type of the patch is usually set on the algorithm with set_patch_type() and propagated to the MeshSet. This version of the get_next_patch() function is the most often used. It actually delegates to the original get_next_patch function, which has a slightly different signature.

Definition at line 107 of file includeLinks/MeshSet.hpp.

References PatchDataUser::get_all_parameters().

Referenced by TerminationCriterion::accumulate_outer(), TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), MeshSet::get_next_patch(), VertexMover::loop_over_mesh(), MeshTransform::loop_over_mesh(), QualityAssessor::loop_over_mesh(), TerminationCriterion::reset_outer(), InstructionQueue::run_instructions(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().

110  {
111  return get_next_patch(pd, pd_user->get_all_parameters(), err);
112  }
bool get_next_patch(PatchData &pd, PatchDataUser *pd_user, MsqError &err)
Gets the next PatchData.

Here is the call graph for this function:

Here is the caller graph for this function:

bool get_next_patch ( PatchData pd,
PatchDataParameters pd_params,
MsqError err 
)

This version of get_next_patch() is rarely used, but this is where the implementation actually is. See the most frequently used signature: get_next_patch(PatchData &pd, PatchDataUser* pd_user, MsqError &err).

bool get_next_patch ( PatchData pd,
PatchDataParameters pd_params,
MsqError err 
)

This version of get_next_patch() is rarely used, but this is where the implementation actually is. See the most frequently used signature: get_next_patch(PatchData &pd, PatchDataUser* pd_user, MsqError &err).

Definition at line 175 of file Mesh/MeshSet.cpp.

References PatchData::clear(), PatchData::domainSet, PatchData::ELEMENTS_ON_VERTEX_PATCH, MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchDataParameters::get_patch_type(), PatchData::GLOBAL_PATCH, MeshSet::mDomain, PatchData::meshSet, MSQ_CHKERR, MSQ_FUNCTION_TIMER, MSQ_SETERR, and MsqError::NOT_IMPLEMENTED.

178 {
179  MSQ_FUNCTION_TIMER( "MeshSet::get_next_patch" );
180 
181  // get rid of previous Patch information (but keep memory allocated).
182  pd.clear();
183 
184  // Mark this MeshSet as the originator
185  pd.meshSet = this;
186  pd.domainSet = (mDomain != NULL);
187 
188  bool result = false;
189  switch (pd_params.get_patch_type())
190  {
192  result = get_next_elem_on_vert_patch( pd, pd_params, err );
193  break;
195  result = get_next_global_patch( pd, pd_params, err );
196  break;
197  default:
198  MSQ_SETERR(err)( "no implementation for specified patch type.",
200  result = false;
201  break;
202  }
203 
204  return !MSQ_CHKERR(err) && result;
205 }
requested functionality is not (yet) implemented
bool get_next_global_patch(PatchData &, PatchDataParameters &, MsqError &)
bool get_next_elem_on_vert_patch(PatchData &, PatchDataParameters &, MsqError &)
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
Mesquite::MeshDomain * mDomain

Here is the call graph for this function:

void reset ( MsqError err)

Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex.

Resets the MeshSet object. The current vertex is set back to the first vertex in the first mesh handle.

Definition at line 131 of file Mesh/MeshSet.cpp.

References MeshSet::currentMesh, MeshSet::meshSet, MSQ_ERRRTN, EntityIterator::restart(), and MeshSet::vertexIterator.

Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), VertexMover::loop_over_mesh(), and TargetCalculator::reset_reference_meshset().

132 {
133  // If we have at least one mesh...
134  if (meshSet.size())
135  {
136  // If we aren't already on the first mesh...
137  if (!vertexIterator || !(currentMesh == meshSet.begin()))
138  {
139  currentMesh = meshSet.begin();
140  delete vertexIterator;
141  vertexIterator = (*currentMesh)->vertex_iterator(err); MSQ_ERRRTN(err);
142  }
143  else // We ARE on the first mesh...
144  {
145  // ...so we can re-use the iterator.
147  }
148  }
149  else
150  {
151  // This is probably redundant...
152  vertexIterator = NULL;
153  }
154 }
Mesquite::VertexIterator * vertexIterator
Keeps track of where we are in the current mesh&#39;s vertex list.
msq_std::list< Mesquite::Mesh * >::iterator currentMesh
Keeps track of which Mesh* we&#39;re currently working with in get_next_patch().
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
virtual void restart()=0
Moves the iterator back to the first entity in the list.
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.

Here is the call graph for this function:

Here is the caller graph for this function:

void reset ( MsqError err)

Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex.

void set_domain_constraint ( MeshDomain domain,
MsqError err 
)

Sets the geometrical domain for the MeshSet.

This can only be used with surface meshes.

Definition at line 157 of file Mesh/MeshSet.cpp.

References MeshSet::mDomain.

158 {
159  mDomain = domain;
160 }
Mesquite::MeshDomain * mDomain
void set_domain_constraint ( MeshDomain domain,
MsqError err 
)

Sets the geometrical domain for the MeshSet.

This can only be used with surface meshes.

void set_flag_to_cull ( MsqVertex::FlagMask  f_m)
inline

Sets the cullFlag.

This flag is used to dermine which vertices should be culled. For local schemes, get_next_patch() will not build a patch around a a culled vertex.

Definition at line 135 of file src/Mesh/MeshSet.hpp.

References MeshSet::cullFlag.

136  {
137  cullFlag=f_m;
138  }
Mesquite::MsqVertex::FlagMask cullFlag
void set_flag_to_cull ( MsqVertex::FlagMask  f_m)
inline

Sets the cullFlag.

This flag is used to dermine which vertices should be culled. For local schemes, get_next_patch() will not build a patch around a a culled vertex.

Definition at line 135 of file includeLinks/MeshSet.hpp.

References MeshSet::cullFlag.

136  {
137  cullFlag=f_m;
138  }
Mesquite::MsqVertex::FlagMask cullFlag
int space_dim ( ) const
inline

Returns the number of coordinates in the Mesh's geometric coordinate system.

Definition at line 98 of file src/Mesh/MeshSet.hpp.

References MeshSet::spaceDim.

99  { return spaceDim; }
int spaceDim
The number of coordinates in this mesh (2D or 3D)
int space_dim ( ) const
inline

Returns the number of coordinates in the Mesh's geometric coordinate system.

Definition at line 98 of file includeLinks/MeshSet.hpp.

References MeshSet::spaceDim.

Referenced by NonSmoothSteepestDescent::optimize_vertex_positions().

99  { return spaceDim; }
int spaceDim
The number of coordinates in this mesh (2D or 3D)

Here is the caller graph for this function:

void update_mesh ( const PatchData pd,
MsqError err 
)

Updates the coordinates in the underlying mesh with the coordinates stored in PatchData.

void update_mesh ( const PatchData pd,
MsqError err 
)

Updates the coordinates in the underlying mesh with the coordinates stored in PatchData.

Definition at line 524 of file Mesh/MeshSet.cpp.

References PatchData::ELEMENTS_ON_VERTEX_PATCH, PatchData::GLOBAL_PATCH, i, EntityIterator::is_at_end(), MSQ_ERRRTN, MSQ_FUNCTION_TIMER, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, MsqError::NOT_IMPLEMENTED, PatchData::num_nodes(), PatchData::type(), PatchData::vertexArray, and PatchData::vertexHandlesArray.

Referenced by PatchData::update_mesh().

525 {
526  MSQ_FUNCTION_TIMER( "MeshSet::update_mesh" );
527  if (pd.num_nodes() == 0)
528  return;
529 
530  size_t i;
531 
532  switch (pd.type())
533  {
534  // If the patch type is marked as local,
535  // all handles belong to the currentMesh.
537  // For each vertex, update the coordinates
538  // and the "mesquite byte".
539  for (i = 0; i < pd.num_nodes(); i++)
540  {
541  if(!pd.vertexArray[i].is_flag_set( MsqVertex::MSQ_HARD_FIXED))
542  {
543  (*currentMesh)->vertex_set_coordinates(pd.vertexHandlesArray[i],
544  pd.vertexArray[i],
545  err); MSQ_ERRRTN(err);
546  }
547 
548  (*currentMesh)->vertex_set_byte(pd.vertexHandlesArray[i],
549  pd.vertexArray[i].vertexBitFlags,
550  err); MSQ_ERRRTN(err);
551  }
552  break;
553 
554  // If the patch type is marked as global,
555  // the handles may belong to more than
556  // one Mesh.
558  {
559  list<Mesquite::Mesh*>::iterator mesh_itr = meshSet.begin();
560  assert( mesh_itr != meshSet.end() );
561  Mesquite::Mesh* cur_mesh = *mesh_itr;
562  Mesquite::VertexIterator *vert_itr = cur_mesh->vertex_iterator(err);
563  MSQ_ERRRTN(err);
564  for (i = 0; i < pd.num_nodes(); i++)
565  {
566  if (vert_itr->is_at_end())
567  {
568  mesh_itr++;
569  if ( mesh_itr==meshSet.end() )
570  return;
571  cur_mesh = *mesh_itr;
572  delete vert_itr;
573  vert_itr = cur_mesh->vertex_iterator(err); MSQ_ERRRTN(err);
574  }
575  if(!pd.vertexArray[i].is_flag_set( MsqVertex::MSQ_HARD_FIXED))
576  {
577  cur_mesh->vertex_set_coordinates(pd.vertexHandlesArray[i],
578  pd.vertexArray[i],
579  err); MSQ_ERRRTN(err);
580  }
581  cur_mesh->vertex_set_byte(pd.vertexHandlesArray[i],
582  pd.vertexArray[i].vertexBitFlags,
583  err); MSQ_ERRRTN(err);
584  }
585  delete vert_itr;
586  }
587  break;
588  default:
589  {
590  MSQ_SETERR(err)("PatchData Type not accepted yet.", MsqError::NOT_IMPLEMENTED);
591  break;
592  }
593  }
594 }
Iterates through a set of entities. An EntityIterator is typically obtained via Mesh::vertex_iterator...
requested functionality is not (yet) implemented
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
blockLoc i
Definition: read.cpp:79
A Mesquite::Mesh is a collection of mesh elements which are composed of mesh vertices. Intermediate objects are not accessible through this interface (where intermediate objects include things like the faces of a hex, or an element&#39;s edges).
msq_std::list< Mesquite::Mesh * > meshSet
Meshes in this MeshSet.
vertex is always fixed. This can only be set on and never off.
virtual bool is_at_end() const =0
Returns false until the iterator has been advanced PAST the last entity.
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.

Here is the call graph for this function:

Here is the caller graph for this function:

void write_gnuplot ( const char *  out_filebase,
MsqError err 
)
void write_gnuplot ( const char *  out_filebase,
Mesquite::MsqError err 
)

Writes a gnuplot file directly from the MeshSet. This means that any mesh imported successfully into Mesquite can be outputed in gnuplot format.

Within gnuplot, use plot 'file1.gpt' w l, 'file2.gpt' w l

This is not geared for performance, since it has to load a global Patch from the mesh to write a mesh file.

Definition at line 755 of file Mesh/MeshSet.cpp.

References PatchData::elementArray, MsqError::FILE_ACCESS, MeshSet::get_next_patch(), PatchData::GLOBAL_PATCH, i, j, MSQ_ERRRTN, MSQ_SETERR, PatchDataParameters::no_culling_method(), PatchData::num_elements(), PatchDataParameters::set_patch_type(), and PatchData::vertexArray.

757 {
758  // Open the file
759  string out_filename = out_filebase;
760  out_filename += ".gpt";
761  ofstream file(out_filename.c_str());
762  if (!file)
763  {
765  return;
766  }
767 
768  // loads a global patch
769  PatchData pd;
770  PatchDataParameters pd_params;
771  pd_params.set_patch_type(PatchData::GLOBAL_PATCH, err); MSQ_ERRRTN(err);
772  pd_params.no_culling_method();
773  get_next_patch(pd, pd_params, err); MSQ_ERRRTN(err);
774 
775  // Write a header
776  file << "\n";
777 
778  for (size_t i=0; i<pd.num_elements(); ++i)
779  {
780  std::vector<size_t> vtx_indices;
781  pd.elementArray[i].get_node_indices(vtx_indices);
782  for (size_t j = 0; j < vtx_indices.size(); ++j)
783  {
784  file << pd.vertexArray[vtx_indices[j]][0] << ' '
785  << pd.vertexArray[vtx_indices[j]][1] << ' '
786  << pd.vertexArray[vtx_indices[j]][2] << '\n';
787  }
788  file << pd.vertexArray[vtx_indices[0]][0] << ' '
789  << pd.vertexArray[vtx_indices[0]][1] << ' '
790  << pd.vertexArray[vtx_indices[0]][2] << '\n';
791  file << '\n';
792  }
793 
794  // Close the file
795  file.close();
796 }
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
blockLoc i
Definition: read.cpp:79
File cannot be opened/created.
j indices j
Definition: Indexing.h:6
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.
bool get_next_patch(PatchData &pd, PatchDataUser *pd_user, MsqError &err)
Gets the next PatchData.

Here is the call graph for this function:

void write_vtk ( const char *  out_filebase,
MsqError err 
)
void write_vtk ( const char *  out_filename,
Mesquite::MsqError err 
)

Writes a VTK file directly from the MeshSet. This means that any mesh imported successfully into Mesquite can be outputed in VTK format. This is not geared for performance, since it has to load a global Patch from the mesh to write a mesh file.

Definition at line 651 of file Mesh/MeshSet.cpp.

References PatchData::elementArray, MsqError::FILE_ACCESS, MeshSet::get_next_patch(), PatchData::GLOBAL_PATCH, Mesquite::HEXAHEDRON, i, j, MSQ_ERRRTN, MSQ_SETERR, PatchDataParameters::no_culling_method(), MsqError::NOT_IMPLEMENTED, PatchData::num_elements(), PatchData::num_nodes(), Mesquite::QUADRILATERAL, PatchDataParameters::set_patch_type(), Mesquite::TETRAHEDRON, Mesquite::TRIANGLE, and PatchData::vertexArray.

653 {
654  // Open the file
655  msq_stdio::ofstream file(out_filename);
656  if (!file)
657  {
659  return;
660  }
661 
662  // loads a global patch
663  PatchData pd;
664  PatchDataParameters pd_params;
665  pd_params.set_patch_type(PatchData::GLOBAL_PATCH, err); MSQ_ERRRTN(err);
666  pd_params.no_culling_method();
667  get_next_patch(pd, pd_params, err); MSQ_ERRRTN(err);
668 
669  // Write a header
670  file << "# vtk DataFile Version 2.0\n";
671  file << "Mesquite Mesh " << out_filename << " .\n";
672  file << "ASCII\n";
673  file << "DATASET UNSTRUCTURED_GRID\n";
674 
675  // Write vertex coordinates
676  file << "POINTS " << pd.num_nodes() << " float\n";
677  size_t i;
678  for (i = 0; i < pd.num_nodes(); i++)
679  {
680  file << pd.vertexArray[i][0] << ' '
681  << pd.vertexArray[i][1] << ' '
682  << pd.vertexArray[i][2] << '\n';
683  }
684 
685  // Write out the connectivity table
686  size_t connectivity_size = 0;
687  for (i = 0; i < pd.num_elements(); ++i)
688  connectivity_size += pd.elementArray[i].node_count()+1;
689 
690  file << "CELLS " << pd.num_elements() << ' ' << connectivity_size << '\n';
691  for (i = 0; i < pd.num_elements(); i++)
692  {
693  std::vector<size_t> vtx_indices;
694  pd.elementArray[i].get_node_indices(vtx_indices);
695  file << vtx_indices.size();
696  for (msq_stdc::size_t j = 0; j < vtx_indices.size(); ++j)
697  {
698  file << ' ' << vtx_indices[j];
699  }
700  file << '\n';
701  }
702 
703  // Write out the element types
704  file << "CELL_TYPES " << pd.num_elements() << '\n';
705  for (i = 0; i < pd.num_elements(); i++)
706  {
707  unsigned char type_id = 0;
708  switch (pd.elementArray[i].get_element_type())
709  {
710  case Mesquite::TRIANGLE:
711  type_id = 5;
712  break;
714  type_id = 9;
715  break;
717  type_id = 10;
718  break;
720  type_id = 12;
721  break;
722  default:
723  MSQ_SETERR(err)("element type not implemented",MsqError::NOT_IMPLEMENTED);
724  break;
725  }
726  file << (int)type_id << '\n';
727  }
728 
729  // Write out which points are fixed.
730  file << "POINT_DATA " << pd.num_nodes()
731  << "\nSCALARS fixed float\nLOOKUP_TABLE default\n";
732  for (i = 0; i < pd.num_nodes(); ++i)
733  {
734  if (pd.vertexArray[i].is_free_vertex())
735  file << "0\n";
736  else
737  file << "1\n";
738  }
739 
740  // Close the file
741  file.close();
742 }
requested functionality is not (yet) implemented
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
blockLoc i
Definition: read.cpp:79
File cannot be opened/created.
j indices j
Definition: Indexing.h:6
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.
bool get_next_patch(PatchData &pd, PatchDataUser *pd_user, MsqError &err)
Gets the next PatchData.

Here is the call graph for this function:

Member Data Documentation

msq_stdc::size_t * csrOffsets
private

These are arrays that we cache so we don't have to reallocate at every patch.

Definition at line 172 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::get_next_elem_on_vert_patch(), and MeshSet::~MeshSet().

msq_stdc::size_t csrOffsetsSize
private

Definition at line 178 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::get_next_elem_on_vert_patch().

msq_std::list< Mesquite::Mesh * >::iterator currentMesh
private

Keeps track of which Mesh* we're currently working with in get_next_patch().

Definition at line 158 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_current_mesh(), MeshSet::get_next_elem_on_vert_patch(), and MeshSet::reset().

msq_stdc::size_t elemArraySize
private

Definition at line 181 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::get_next_elem_on_vert_patch().

Mesquite::EntityTopology elementType
private

The topological dimension of the elements in this MeshSet, where Mesquite::TRIANGLE indicates 2D elements (faces) and Mesquite::TETRAHEDRON indicates 3D elements (regions).

Must be the same for all meshes added with add_mesh().

Definition at line 168 of file includeLinks/MeshSet.hpp.

Mesquite::EntityTopology * elemTopologies
private
int spaceDim
private

The number of coordinates in this mesh (2D or 3D)

Definition at line 162 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::add_mesh(), and MeshSet::space_dim().

msq_stdc::size_t vertArraySize
private

Definition at line 180 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::get_next_global_patch().

Mesquite::VertexIterator * vertexIterator
private

Keeps track of where we are in the current mesh's vertex list.

Definition at line 160 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::reset(), and MeshSet::~MeshSet().

bool * vertexOnBoundary
private

Definition at line 177 of file includeLinks/MeshSet.hpp.

Referenced by MeshSet::get_next_global_patch(), and MeshSet::~MeshSet().


The documentation for this class was generated from the following files: