28 #include "MsqError.hpp"
29 #include "MsqFreeVertexIndexIterator.hpp"
30 #include "TopologyInfo.hpp"
50 {
return "MeanMidNodeMover"; }
74 size_t num_elems, *elem_list;
78 size_t element_index = elem_list[0];
82 unsigned elem_vert_index;
85 for (elem_vert_index = 0; elem_vert_index < num_verts; ++elem_vert_index)
86 if (vert_list[elem_vert_index] == vtx)
91 if (elem_vert_index == num_verts)
103 "Element type %d cannot have higher-order nodes.",
108 if (elem_vert_index < num_corners)
110 MSQ_SETERR(err)(
"Invalid mid-node flag for mesh (mixed connectivity?)",
116 unsigned side, dimension;
121 const unsigned* side_indices =
132 for (
unsigned i = 0;
i < side_size; ++
i)
void update_mesh(MsqError &err)
Updates the underlying mesh (the Mesquite::Mesh implementation) with new node coordinates and flag va...
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
virtual double loop_over_mesh(MeshSet &ms, MsqError &err)
This is the "run" function of PatchDataUser. It can do anything really.
virtual void set_patch_type(PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0)
Sets the Patch Type.
MsqVertex & vertex_by_index(size_t index)
Returns the start of the vertex->element array.
Used to hold the error state and return it to the application.
MsqMeshEntity is the Mesquite object that stores information about the elements in the mesh...
virtual void set_patch_type(PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0)
Sets the Patch Type.
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual ~MeanMidNodeMover()
invalid function argument passed
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
void set_vertex_coordinates(const Vector3D &coords, size_t index, MsqError &err)
set the coordinates of a vertex in the raw array
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
static unsigned corners(EntityTopology topo)
Get the number of defining vertices for a given element topology.
void snap_vertex_to_domain(size_t vertex_index, MsqError &err)
Adjust the position of the specified vertex so that it lies on its constraining domain.
PatchData::PatchType get_patch_type()
Returns the Patch Type.
PatchType
Tells MeshSet how to retrieve the mesh entities that will be stored in PatchData. ...
size_t num_nodes() const
Get number of nodes (vertex + higher-order nodes)
size_t num_vertices() const
number of vertices in the patch.
MsqMeshEntity & element_by_index(size_t index)
static const unsigned * side_vertices(EntityTopology topo, unsigned side_dimension, unsigned side_number, unsigned &num_verts_out, MsqError &err)
Get corner indices of side.
PatchData * get_global_patch()
Returns the Global Patch.
EntityTopology get_element_type() const
Returns element type.
object is in an invalid state
const msq_stdc::size_t * get_vertex_index_array() const
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array)...
size_t * get_vertex_element_adjacencies(size_t vertex_index, size_t &array_len_out, MsqError &err)
virtual PatchDataUser::AlgorithmType get_algorithm_type()
Return the algorithm type (to avoid RTTI use).
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh informati...
static void side_number(EntityTopology topo, unsigned connectivity_length, unsigned node_index, unsigned &side_dimension_out, unsigned &side_number_out, MsqError &err)
Return which side the specified mid-node lies on.
virtual msq_std::string get_name()
Returns the algorithm name.
msq_stdc::size_t node_count() const
Return number of nodes in element (number of corner vertices + number of higher-order nodes)...