MsqMeshEntity is the Mesquite object that stores information about the elements in the mesh. More...
#include <MsqMeshEntity.hpp>
Public Member Functions | |
MsqMeshEntity () | |
EntityTopology | get_element_type () const |
Returns element type. More... | |
msq_stdc::size_t | vertex_count () const |
Returns the number of vertices in this element, based on its element type. More... | |
msq_stdc::size_t | node_count () const |
Return number of nodes in element (number of corner vertices + number of higher-order nodes). More... | |
void | get_vertex_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
gets the vertices of the mesh entity More... | |
void | append_vertex_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
void | get_node_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
gets the vertices of the mesh entity More... | |
void | append_node_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
const msq_stdc::size_t * | get_vertex_index_array () const |
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array). More... | |
msq_stdc::size_t * | get_vertex_index_array () |
void | set_element_type (EntityTopology type) |
Sets element data. More... | |
void | set_connectivity (msq_stdc::size_t *indices, size_t num_vertices) |
Set connectivity data (vertex array) for element. More... | |
msq_stdc::size_t | get_vertex_index (msq_stdc::size_t vertex_in_element) const |
void | compute_weighted_jacobian (PatchData &pd, Vector3D &sample_point, Vector3D jacobian_vectors[], short &num_jacobian_vectors, MsqError &err) |
void | get_sample_points (QualityMetric::ElementEvaluationMode mode, msq_std::vector< Vector3D > &coords, MsqError &err) |
Returns a list of sample points given an evaluationmode. More... | |
void | get_centroid (Vector3D ¢roid, const PatchData &pd, MsqError &err) const |
Returns the centroid of the element. More... | |
void | get_connected_vertices (msq_stdc::size_t vertex_index, msq_std::vector< msq_stdc::size_t > &vert_indices, MsqError &err) |
Fills a vector<size_t> with vertices connected to the given vertex through the edges of this MsqMeshEntity. More... | |
double | compute_unsigned_area (PatchData &pd, MsqError &err) |
Computes the area of the element. More... | |
double | compute_unsigned_volume (PatchData &pd, MsqError &err) |
Computes the volume of the element. More... | |
double | compute_signed_area (PatchData &pd, MsqError &err) |
Computes the signed area of the element. More... | |
double | compute_signed_volume (PatchData &pd, MsqError &err) |
Computes the signed volume of the element. More... | |
void | compute_corner_normals (Vector3D normals[], PatchData &pd, MsqError &err) |
Uses a MeshDomain call-back function to compute the normal at the corner. More... | |
void | compute_corner_matrices (PatchData &pd, Matrix3D A[], int num_m3d, MsqError &err) |
Compute matrices which column are the vectors issued from a corner. More... | |
MsqMeshEntity () | |
EntityTopology | get_element_type () const |
Returns element type. More... | |
msq_stdc::size_t | vertex_count () const |
Returns the number of vertices in this element, based on its element type. More... | |
msq_stdc::size_t | node_count () const |
Return number of nodes in element (number of corner vertices + number of higher-order nodes). More... | |
void | get_vertex_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
gets the vertices of the mesh entity More... | |
void | append_vertex_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
void | get_node_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
gets the vertices of the mesh entity More... | |
void | append_node_indices (msq_std::vector< msq_stdc::size_t > &vertex_list) const |
const msq_stdc::size_t * | get_vertex_index_array () const |
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array). More... | |
msq_stdc::size_t * | get_vertex_index_array () |
void | set_element_type (EntityTopology type) |
Sets element data. More... | |
void | set_connectivity (msq_stdc::size_t *indices, size_t num_vertices) |
Set connectivity data (vertex array) for element. More... | |
msq_stdc::size_t | get_vertex_index (msq_stdc::size_t vertex_in_element) const |
void | compute_weighted_jacobian (PatchData &pd, Vector3D &sample_point, Vector3D jacobian_vectors[], short &num_jacobian_vectors, MsqError &err) |
void | get_sample_points (QualityMetric::ElementEvaluationMode mode, msq_std::vector< Vector3D > &coords, MsqError &err) |
Returns a list of sample points given an evaluationmode. More... | |
void | get_centroid (Vector3D ¢roid, const PatchData &pd, MsqError &err) const |
Returns the centroid of the element. More... | |
void | get_connected_vertices (msq_stdc::size_t vertex_index, msq_std::vector< msq_stdc::size_t > &vert_indices, MsqError &err) |
Fills a vector<size_t> with vertices connected to the given vertex through the edges of this MsqMeshEntity. More... | |
double | compute_unsigned_area (PatchData &pd, MsqError &err) |
Computes the area of the element. More... | |
double | compute_unsigned_volume (PatchData &pd, MsqError &err) |
Computes the volume of the element. More... | |
double | compute_signed_area (PatchData &pd, MsqError &err) |
Computes the signed area of the element. More... | |
double | compute_signed_volume (PatchData &pd, MsqError &err) |
Computes the signed volume of the element. More... | |
void | compute_corner_normals (Vector3D normals[], PatchData &pd, MsqError &err) |
Uses a MeshDomain call-back function to compute the normal at the corner. More... | |
void | compute_corner_matrices (PatchData &pd, Matrix3D A[], int num_m3d, MsqError &err) |
Compute matrices which column are the vectors issued from a corner. More... | |
Static Private Member Functions | |
static void | get_linear_quad_jac (Vector3D *sp, Vector3D &coord0, Vector3D &coord1, Vector3D &coord2, Vector3D &coord3, Vector3D *jac) |
static void | get_linear_quad_jac (Vector3D *sp, Vector3D &coord0, Vector3D &coord1, Vector3D &coord2, Vector3D &coord3, Vector3D *jac) |
Private Attributes | |
EntityTopology | mType |
size_t * | vertexIndices |
Pointer to connectivity array. More... | |
size_t | numVertexIndices |
Friends | |
msq_stdio::ostream & | operator<< (msq_stdio::ostream &stream, const MsqMeshEntity &entity) |
msq_stdio::ostream & | operator<< (msq_stdio::ostream &stream, const MsqMeshEntity &entity) |
MsqMeshEntity is the Mesquite object that stores information about the elements in the mesh.
Definition at line 69 of file includeLinks/MsqMeshEntity.hpp.
|
inline |
Definition at line 73 of file includeLinks/MsqMeshEntity.hpp.
|
inline |
Definition at line 73 of file src/Mesh/MsqMeshEntity.hpp.
void append_node_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
void append_node_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
void append_vertex_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
void append_vertex_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
Compute matrices which column are the vectors issued from a corner.
Stores those corner matrices in the mTag data member.
pd | The PatchData the element belongs to. It contains the vertices coords. |
c_m3d | An array of Matrix3D objects. There should be one matrix per element corner (4 for a tet, 8 for an hex). Each column of the matrix will contain a vector corresponding to a corner edge. |
num_m3d | The number of matrices in the c_m3d array. The function will check this number corresponds to the number of corner in the element. If not, an error is set. |
Definition at line 731 of file Mesh/MsqMeshEntity.cpp.
References MsqMeshEntity::compute_corner_normals(), MsqMeshEntity::get_element_type(), PatchData::get_vertex_array(), Mesquite::HEXAHEDRON, MsqError::INVALID_ARG, Mesquite::MSQ_3RT_2_OVER_6RT_3, MSQ_ERRRTN, MSQ_SETERR, MsqError::NOT_IMPLEMENTED, Mesquite::QUADRILATERAL, Matrix3D::set_column(), Mesquite::TETRAHEDRON, Mesquite::TRIANGLE, and MsqMeshEntity::vertexIndices.
Referenced by TargetCalculator::compute_guide_matrices(), TargetCalculator::compute_reference_corner_matrices(), and DistanceFromTarget::compute_T_matrices().
Compute matrices which column are the vectors issued from a corner.
Stores those corner matrices in the mTag data member.
Uses a MeshDomain call-back function to compute the normal at the corner.
Gives the normal at the surface point corner_pt ... but if not available, gives the normalized cross product of corner_vec1 and corner_vec2.
Definition at line 670 of file Mesh/MsqMeshEntity.cpp.
References PatchData::domain_set(), PatchData::get_domain_normals_at_corners(), PatchData::get_element_index(), MsqMeshEntity::get_element_type(), i, MsqError::INVALID_ARG, Vector3D::length(), Mesquite::length(), MSQ_ERRRTN, MSQ_SETERR, Vector3D::normalize(), Mesquite::POLYGON, Mesquite::QUADRILATERAL, Mesquite::TRIANGLE, PatchData::vertex_by_index(), MsqMeshEntity::vertex_count(), and MsqMeshEntity::vertexIndices.
Referenced by MsqMeshEntity::compute_corner_matrices(), I_DFT::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_hessian(), and I_DFT::evaluate_element().
Uses a MeshDomain call-back function to compute the normal at the corner.
Computes the signed area of the element.
Computes the signed area of the element.
Computes the area of the given element. Returned value can be negative. If the entity passed is not a two-dimensional element, an error is set.
Definition at line 419 of file Mesh/MsqMeshEntity.cpp.
References PatchData::get_domain_normal_at_element(), PatchData::get_element_index(), PatchData::get_vertex_array(), MsqError::INVALID_ARG, Vector3D::length(), MSQ_ERRZERO, MSQ_SETERR, MsqMeshEntity::mType, Mesquite::QUADRILATERAL, Mesquite::TRIANGLE, and MsqMeshEntity::vertexIndices.
Computes the signed volume of the element.
Computes the volume of the given element. Returned value can be negative. If the entity passed is not a three-dimensional element, an error is set.
Definition at line 478 of file Mesh/MsqMeshEntity.cpp.
References MsqMeshEntity::compute_weighted_jacobian(), PatchData::get_vertex_array(), Mesquite::HEXAHEDRON, MsqError::INVALID_ARG, MSQ_ERRZERO, MSQ_SETERR, MsqMeshEntity::mType, Mesquite::TETRAHEDRON, and MsqMeshEntity::vertexIndices.
Computes the signed volume of the element.
Computes the area of the element.
Computes the area of the given element. Returned value is always non-negative. If the entity passed is not a two-dimensional element, an error is set.
The returned value is always non-negative.
Definition at line 357 of file Mesh/MsqMeshEntity.cpp.
References PatchData::get_vertex_array(), MsqError::INVALID_ARG, Mesquite::length(), MSQ_ERRZERO, MSQ_SETERR, MsqMeshEntity::mType, Mesquite::QUADRILATERAL, Mesquite::TRIANGLE, and MsqMeshEntity::vertexIndices.
Referenced by ASMQualityMetric::evaluate_element(), and CornerJacobianQualityMetric::evaluate_element().
Computes the area of the element.
The returned value is always non-negative.
Computes the volume of the element.
Computes the volume of the given element. Returned value is always non-negative. If the entity passed is not a three-dimensional element, an error is set.
The returned value is always non-negative.
Definition at line 387 of file Mesh/MsqMeshEntity.cpp.
References MsqMeshEntity::compute_weighted_jacobian(), PatchData::get_vertex_array(), Mesquite::HEXAHEDRON, MsqError::INVALID_ARG, MSQ_ERRZERO, MSQ_SETERR, MsqMeshEntity::mType, Mesquite::TETRAHEDRON, and MsqMeshEntity::vertexIndices.
Referenced by ASMQualityMetric::evaluate_element(), and CornerJacobianQualityMetric::evaluate_element().
Computes the volume of the element.
The returned value is always non-negative.
void compute_weighted_jacobian | ( | PatchData & | pd, |
Vector3D & | sample_point, | ||
Vector3D | jacobian_vectors[], | ||
short & | num_jacobian_vectors, | ||
MsqError & | err | ||
) |
void compute_weighted_jacobian | ( | PatchData & | pd, |
Vector3D & | sample_point, | ||
Vector3D | jacobian_vectors[], | ||
short & | num_jacobian_vectors, | ||
MsqError & | err | ||
) |
fills array of Vector3D's with the jacobian vectors and the number of jacobian vecotors.
Definition at line 118 of file Mesh/MsqMeshEntity.cpp.
References PatchData::get_vertex_array(), Mesquite::HEXAHEDRON, MSQ_ERRRTN, MSQ_SETERR, Mesquite::MSQ_SQRT_THREE_INV, Mesquite::MSQ_SQRT_TWO_INV, MsqError::NOT_IMPLEMENTED, Mesquite::QUADRILATERAL, Vector3D::set(), Mesquite::TETRAHEDRON, and Mesquite::TRIANGLE.
Referenced by VertexMover::check_feasible(), MsqMeshEntity::compute_signed_volume(), MsqMeshEntity::compute_unsigned_volume(), and GeneralizedConditionNumberQualityMetric::evaluate_element().
Returns the centroid of the element.
Returns the centroid of the element.
The centroid of an element containing n vertices with equal masses is located at
where are the vertices coordinates.
Definition at line 106 of file Mesh/MsqMeshEntity.cpp.
References PatchData::get_vertex_array(), i, MSQ_ERRRTN, MsqMeshEntity::vertex_count(), and MsqMeshEntity::vertexIndices.
void get_connected_vertices | ( | msq_stdc::size_t | vertex_index, |
msq_std::vector< msq_stdc::size_t > & | vert_indices, | ||
MsqError & | err | ||
) |
Fills a vector<size_t> with vertices connected to the given vertex through the edges of this MsqMeshEntity.
void get_connected_vertices | ( | msq_stdc::size_t | vertex_index, |
msq_std::vector< msq_stdc::size_t > & | vert_indices, | ||
MsqError & | err | ||
) |
Fills a vector<size_t> with vertices connected to the given vertex through the edges of this MsqMeshEntity.
Referenced by VertexConditionNumberQualityMetric::evaluate_vertex(), and LocalSizeQualityMetric::evaluate_vertex().
|
inline |
Returns element type.
Definition at line 78 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::mType.
Referenced by MsqMeshEntity::compute_corner_matrices(), MsqMeshEntity::compute_corner_normals(), TargetCalculator::compute_default_target_matrices(), RI_DFT::compute_element_analytical_gradient(), IdealWeightInverseMeanRatio::compute_element_analytical_gradient(), IdealWeightMeanRatio::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), IdealWeightInverseMeanRatio::compute_element_analytical_hessian(), IdealWeightMeanRatio::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), TargetCalculator::compute_guide_matrices(), ConditionNumberQualityMetric::evaluate_element(), RI_DFT::evaluate_element(), ASMQualityMetric::evaluate_element(), CornerJacobianQualityMetric::evaluate_element(), UntangleBetaQualityMetric::evaluate_element(), AspectRatioGammaQualityMetric::evaluate_element(), IdealWeightInverseMeanRatio::evaluate_element(), IdealWeightMeanRatio::evaluate_element(), I_DFT::evaluate_element(), PatchData::get_subpatch(), and MeanMidNodeMover::loop_over_mesh().
|
inline |
Returns element type.
Definition at line 78 of file src/Mesh/MsqMeshEntity.hpp.
References MsqMeshEntity::mType.
|
inlinestaticprivate |
Definition at line 211 of file includeLinks/MsqMeshEntity.hpp.
|
staticprivate |
void get_node_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
gets the vertices of the mesh entity
void get_node_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
gets the vertices of the mesh entity
void get_sample_points | ( | QualityMetric::ElementEvaluationMode | mode, |
msq_std::vector< Vector3D > & | coords, | ||
MsqError & | err | ||
) |
Returns a list of sample points given an evaluationmode.
void get_sample_points | ( | QualityMetric::ElementEvaluationMode | mode, |
msq_std::vector< Vector3D > & | coords, | ||
MsqError & | err | ||
) |
Returns a list of sample points given an evaluationmode.
Referenced by VertexMover::check_feasible(), and GeneralizedConditionNumberQualityMetric::evaluate_element().
msq_stdc::size_t get_vertex_index | ( | msq_stdc::size_t | vertex_in_element | ) | const |
|
inline |
Definition at line 203 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::vertex_count(), and MsqMeshEntity::vertexIndices.
Referenced by GeneralizedConditionNumberQualityMetric::compute_condition_number(), PatchData::get_subpatch(), and NonSmoothSteepestDescent::validity_check().
|
inline |
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array).
|
inline |
Very efficient retrieval of vertices indexes (corresponding to the PatchData vertex array).
Definition at line 196 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::vertexIndices.
Referenced by LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), RI_DFT::compute_element_analytical_gradient(), IdealWeightInverseMeanRatio::compute_element_analytical_gradient(), IdealWeightMeanRatio::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), IdealWeightInverseMeanRatio::compute_element_analytical_hessian(), IdealWeightMeanRatio::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), ConditionNumberQualityMetric::evaluate_element(), RI_DFT::evaluate_element(), UntangleBetaQualityMetric::evaluate_element(), IdealWeightInverseMeanRatio::evaluate_element(), IdealWeightMeanRatio::evaluate_element(), I_DFT::evaluate_element(), PatchData::get_domain_normals_at_corners(), MsqHessian::initialize(), PatchData::initialize_data(), and MeanMidNodeMover::loop_over_mesh().
|
inline |
|
inline |
Definition at line 199 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::vertexIndices.
void get_vertex_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
gets the vertices of the mesh entity
void get_vertex_indices | ( | msq_std::vector< msq_stdc::size_t > & | vertex_list | ) | const |
gets the vertices of the mesh entity
Referenced by QualityMetric::compute_element_gradient_expanded(), QualityMetric::compute_element_hessian(), QualityMetric::compute_element_numerical_hessian(), and NonSmoothSteepestDescent::optimize_vertex_positions().
|
inline |
Return number of nodes in element (number of corner vertices + number of higher-order nodes).
Definition at line 86 of file src/Mesh/MsqMeshEntity.hpp.
References MsqMeshEntity::numVertexIndices.
|
inline |
Return number of nodes in element (number of corner vertices + number of higher-order nodes).
Definition at line 86 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::numVertexIndices.
Referenced by PatchData::get_subpatch(), PatchData::initialize_data(), MeanMidNodeMover::loop_over_mesh(), and MsqMeshEntity::vertex_count().
|
inline |
Set connectivity data (vertex array) for element.
MsqMeshEntity keeps the pointer to the passed array, it does not copy it. The caller is still responsible for releasing the memory for the passed index array after the MsqMeshEntity is destroyed. The intention is that this is a pointer to a portion of a larger connectivity array managed by the owning PatchData.
Definition at line 189 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::numVertexIndices, and MsqMeshEntity::vertexIndices.
void set_connectivity | ( | msq_stdc::size_t * | indices, |
size_t | num_vertices | ||
) |
Set connectivity data (vertex array) for element.
MsqMeshEntity keeps the pointer to the passed array, it does not copy it. The caller is still responsible for releasing the memory for the passed index array after the MsqMeshEntity is destroyed. The intention is that this is a pointer to a portion of a larger connectivity array managed by the owning PatchData.
|
inline |
Sets element data.
Definition at line 101 of file src/Mesh/MsqMeshEntity.hpp.
References MsqMeshEntity::mType.
|
inline |
Sets element data.
Definition at line 101 of file includeLinks/MsqMeshEntity.hpp.
References MsqMeshEntity::mType.
|
inline |
Returns the number of vertices in this element, based on its element type.
Definition at line 185 of file includeLinks/MsqMeshEntity.hpp.
References TopologyInfo::corners(), MsqMeshEntity::mType, MsqMeshEntity::node_count(), Mesquite::POLYGON, and Mesquite::POLYHEDRON.
Referenced by MsqHessian::accumulate_entries(), LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), MsqMeshEntity::compute_corner_normals(), RI_DFT::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), QualityMetric::compute_element_numerical_hessian(), TargetCalculator::compute_guide_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), TargetCalculator::compute_target_matrices_and_check_det(), sI_DFT::evaluate_element(), sRI_DFT::evaluate_element(), RI_DFT::evaluate_element(), I_DFT::evaluate_element(), MsqMeshEntity::get_centroid(), PatchData::get_domain_normals_at_corners(), MsqMeshEntity::get_vertex_index(), MsqHessian::initialize(), PatchData::initialize_data(), CornerTagHandles::num_corners(), Mesquite::operator<<(), and CornerTagHandles::save_load_tags().
|
inline |
Returns the number of vertices in this element, based on its element type.
|
friend |
|
friend |
|
private |
Definition at line 167 of file includeLinks/MsqMeshEntity.hpp.
Referenced by MsqMeshEntity::compute_signed_area(), MsqMeshEntity::compute_signed_volume(), MsqMeshEntity::compute_unsigned_area(), MsqMeshEntity::compute_unsigned_volume(), MsqMeshEntity::get_element_type(), MsqMeshEntity::set_element_type(), and MsqMeshEntity::vertex_count().
|
private |
Definition at line 174 of file includeLinks/MsqMeshEntity.hpp.
Referenced by MsqMeshEntity::node_count(), and MsqMeshEntity::set_connectivity().
|
private |
Pointer to connectivity array.
NOTE: The memory occupied by this array is assumed to be owned/managed by the owning PatchData. Do not try to delete/resize/etc. this array directly!
Definition at line 173 of file includeLinks/MsqMeshEntity.hpp.
Referenced by MsqMeshEntity::compute_corner_matrices(), MsqMeshEntity::compute_corner_normals(), MsqMeshEntity::compute_signed_area(), MsqMeshEntity::compute_signed_volume(), MsqMeshEntity::compute_unsigned_area(), MsqMeshEntity::compute_unsigned_volume(), MsqMeshEntity::get_centroid(), MsqMeshEntity::get_vertex_index(), MsqMeshEntity::get_vertex_index_array(), Mesquite::operator<<(), and MsqMeshEntity::set_connectivity().