#include <PatchData.hpp>
Public Member Functions | |
PatchData () | |
~PatchData () | |
void | clear_computed_info () |
This function clears the patch information such as maximum volume, etc ... More... | |
bool | have_computed_info (ComputedInfo info) const |
void | get_minmax_element_unsigned_area (double &min, double &max, MsqError &err) |
Returns the maximum volume or area out of all the elements in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
double | get_barrier_delta (MsqError &err) |
Returns delta based on the minimum and maximum corner determinant over all elements in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
double | get_average_Lambda_3d (MsqError &err) |
Returns average corner determinant over all corners in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
void | clear () |
Removes data. More... | |
void | reorder () |
Reorders the mesh data. More... | |
void | allocate_storage (size_t vertex_count, size_t element_count, size_t vertex_use_count, MsqError &err) |
Used by test code when creating a PatchData directly. More... | |
void | initialize_data (size_t *elem_offset_array, MsqError &err) |
Call after filling vertex handle and connectivity arrays to finish initializing the PatchData. More... | |
size_t | num_vertices () const |
number of vertices in the patch. More... | |
size_t | num_elements () const |
number of elements in the Patch. More... | |
size_t | num_corners () |
number of elements corners in the Patch. More... | |
size_t | num_nodes () const |
Get number of nodes (vertex + higher-order nodes) More... | |
int | num_free_vertices (MsqError &err) const |
Returns the number of elements in the current patch who are free to move. More... | |
unsigned | num_free_nodes (MsqError &err) const |
const MsqVertex * | get_vertex_array (MsqError &err) const |
Returns a pointer to the start of the vertex array. More... | |
MsqVertex * | get_vertex_array (MsqError &err) |
const MsqMeshEntity * | get_element_array (MsqError &err) const |
Returns a pointer to the start of the element array. More... | |
MsqMeshEntity * | get_element_array (MsqError &err) |
size_t * | get_connectivity_array () |
const Mesh::ElementHandle * | get_element_handles_array () const |
MsqVertex & | vertex_by_index (size_t index) |
Returns the start of the vertex->element array. More... | |
MsqMeshEntity & | element_by_index (size_t index) |
size_t | get_vertex_index (MsqVertex *vertex) |
size_t | get_element_index (MsqMeshEntity *element) |
void | get_element_vertex_coordinates (size_t elem_index, msq_std::vector< Vector3D > &coords, MsqError &err) |
Get the coordinates of vertices attached to the specified element. More... | |
void | get_element_vertex_indices (size_t elem_index, msq_std::vector< size_t > &vertex_indices, MsqError &err) |
void | get_vertex_element_indices (size_t vertex_index, msq_std::vector< size_t > &elem_indices, MsqError &err) |
size_t * | get_vertex_element_adjacencies (size_t vertex_index, size_t &array_len_out, MsqError &err) |
void | get_adjacent_vertex_indices (size_t vertex_index, msq_std::vector< size_t > &vert_indices, MsqError &err) |
void | get_adjacent_entities_via_n_dim (int n, size_t ent_ind, msq_std::vector< size_t > &adj_ents, MsqError &err) |
Get the indices of entities attached to entity (given by ent_ind). adj_ents is filled with the indices into the entity array of elements adjacent to the given element via an n-dimensional entity. More... | |
void | generate_vertex_to_element_data () |
void | set_vertex_coordinates (const Vector3D &coords, size_t index, MsqError &err) |
set the coordinates of a vertex in the raw array More... | |
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. More... | |
bool | domain_set () |
void | get_domain_normal_at_vertex (size_t vertex_index, bool normalize, Vector3D &surf_norm, MsqError &err) |
void | get_domain_normal_at_element (size_t elem_index, Vector3D &surf_norm, MsqError &err) const |
void | get_domain_normals_at_corners (size_t element_index, Vector3D normals_out[], MsqError &err) |
Get surface normal at a point where the surface is the domain of an element and the point is the location of one of the element corners. More... | |
void | get_domain_normal_at_element (MsqMeshEntity *elem_ptr, Vector3D &surf_norm, MsqError &err) const |
Alternative signature. Same functionality. More... | |
void | move_free_vertices_constrained (Vector3D dk[], size_t nb_vtx, double step_size, MsqError &err) |
Moves free vertices and then snaps the free vertices to the domain. More... | |
void | set_free_vertices_constrained (PatchDataVerticesMemento *memento, Vector3D dk[], size_t nb_vtx, double step_size, MsqError &err) |
double | get_max_vertex_movement_squared (PatchDataVerticesMemento *memento, MsqError &err) |
Calculates the distance each vertex has moved from its original position as defined by the PatchDataVerticesMememnto. More... | |
void | update_mesh (MsqError &err) |
Updates the underlying mesh (the Mesquite::Mesh implementation) with new node coordinates and flag values. More... | |
void | set_all_vertices_soft_free (MsqError &err) |
Remove the soft_fixed flag from all vertices in the patch. More... | |
void | set_all_vertices_soft_fixed (MsqError &err) |
Add a soft_fixed flag to all vertices in the patch. More... | |
void | set_free_vertices_soft_fixed (MsqError &err) |
Add a soft_fixed flag to all free vertices in the patch. More... | |
void | get_subpatch (size_t center_vertex_index, PatchData &pd_to_fill, MsqError &err) |
Fills a PatchData with the elements attached to a center vertex. More... | |
PatchDataVerticesMemento * | create_vertices_memento (MsqError &err, bool include_higher_order=false) |
Creates a memento that holds the current state of the PatchData coordinates. More... | |
void | recreate_vertices_memento (PatchDataVerticesMemento *memento, MsqError &err, bool include_higher_order=false) |
reinstantiates a memento to holds the current state of the PatchData coordinates. More... | |
void | set_to_vertices_memento (PatchDataVerticesMemento *memento, MsqError &err) |
Restore the PatchData coordinates to the state contained in the memento. More... | |
PatchType | type () const |
void | set_mesh_set (MeshSet *ms) |
Sets the originating meshSet. More... | |
MeshSet * | get_mesh_set () |
Returns the originating meshSet. More... | |
void | clear_tag_data () |
PatchData () | |
~PatchData () | |
void | clear_computed_info () |
This function clears the patch information such as maximum volume, etc ... More... | |
bool | have_computed_info (ComputedInfo info) const |
void | get_minmax_element_unsigned_area (double &min, double &max, MsqError &err) |
Returns the maximum volume or area out of all the elements in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
double | get_barrier_delta (MsqError &err) |
Returns delta based on the minimum and maximum corner determinant over all elements in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
double | get_average_Lambda_3d (MsqError &err) |
Returns average corner determinant over all corners in the patch This information is stored in the patch and should not decrease performance when used properly. More... | |
void | clear () |
Removes data. More... | |
void | reorder () |
Reorders the mesh data. More... | |
void | allocate_storage (size_t vertex_count, size_t element_count, size_t vertex_use_count, MsqError &err) |
Used by test code when creating a PatchData directly. More... | |
void | initialize_data (size_t *elem_offset_array, MsqError &err) |
Call after filling vertex handle and connectivity arrays to finish initializing the PatchData. More... | |
size_t | num_vertices () const |
number of vertices in the patch. More... | |
size_t | num_elements () const |
number of elements in the Patch. More... | |
size_t | num_corners () |
number of elements corners in the Patch. More... | |
size_t | num_nodes () const |
Get number of nodes (vertex + higher-order nodes) More... | |
int | num_free_vertices (MsqError &err) const |
Returns the number of elements in the current patch who are free to move. More... | |
unsigned | num_free_nodes (MsqError &err) const |
const MsqVertex * | get_vertex_array (MsqError &err) const |
Returns a pointer to the start of the vertex array. More... | |
MsqVertex * | get_vertex_array (MsqError &err) |
const MsqMeshEntity * | get_element_array (MsqError &err) const |
Returns a pointer to the start of the element array. More... | |
MsqMeshEntity * | get_element_array (MsqError &err) |
size_t * | get_connectivity_array () |
const Mesh::ElementHandle * | get_element_handles_array () const |
MsqVertex & | vertex_by_index (size_t index) |
Returns the start of the vertex->element array. More... | |
MsqMeshEntity & | element_by_index (size_t index) |
size_t | get_vertex_index (MsqVertex *vertex) |
size_t | get_element_index (MsqMeshEntity *element) |
void | get_element_vertex_coordinates (size_t elem_index, msq_std::vector< Vector3D > &coords, MsqError &err) |
Get the coordinates of vertices attached to the specified element. More... | |
void | get_element_vertex_indices (size_t elem_index, msq_std::vector< size_t > &vertex_indices, MsqError &err) |
void | get_vertex_element_indices (size_t vertex_index, msq_std::vector< size_t > &elem_indices, MsqError &err) |
size_t * | get_vertex_element_adjacencies (size_t vertex_index, size_t &array_len_out, MsqError &err) |
void | get_adjacent_vertex_indices (size_t vertex_index, msq_std::vector< size_t > &vert_indices, MsqError &err) |
void | get_adjacent_entities_via_n_dim (int n, size_t ent_ind, msq_std::vector< size_t > &adj_ents, MsqError &err) |
Get the indices of entities attached to entity (given by ent_ind). adj_ents is filled with the indices into the entity array of elements adjacent to the given element via an n-dimensional entity. More... | |
void | generate_vertex_to_element_data () |
void | set_vertex_coordinates (const Vector3D &coords, size_t index, MsqError &err) |
void | snap_vertex_to_domain (size_t vertex_index, MsqError &err) |
bool | domain_set () |
void | get_domain_normal_at_vertex (size_t vertex_index, bool normalize, Vector3D &surf_norm, MsqError &err) |
void | get_domain_normal_at_element (size_t elem_index, Vector3D &surf_norm, MsqError &err) const |
void | get_domain_normals_at_corners (size_t element_index, Vector3D normals_out[], MsqError &err) |
Get surface normal at a point where the surface is the domain of an element and the point is the location of one of the element corners. More... | |
void | get_domain_normal_at_element (MsqMeshEntity *elem_ptr, Vector3D &surf_norm, MsqError &err) const |
Alternative signature. Same functionality. More... | |
void | move_free_vertices_constrained (Vector3D dk[], size_t nb_vtx, double step_size, MsqError &err) |
Moves free vertices and then snaps the free vertices to the domain. More... | |
void | set_free_vertices_constrained (PatchDataVerticesMemento *memento, Vector3D dk[], size_t nb_vtx, double step_size, MsqError &err) |
double | get_max_vertex_movement_squared (PatchDataVerticesMemento *memento, MsqError &err) |
Calculates the distance each vertex has moved from its original position as defined by the PatchDataVerticesMememnto. More... | |
void | update_mesh (MsqError &err) |
Updates the underlying mesh (the Mesquite::Mesh implementation) with new node coordinates and flag values. More... | |
void | set_all_vertices_soft_free (MsqError &err) |
Remove the soft_fixed flag from all vertices in the patch. More... | |
void | set_all_vertices_soft_fixed (MsqError &err) |
Add a soft_fixed flag to all vertices in the patch. More... | |
void | set_free_vertices_soft_fixed (MsqError &err) |
Add a soft_fixed flag to all free vertices in the patch. More... | |
void | get_subpatch (size_t center_vertex_index, PatchData &pd_to_fill, MsqError &err) |
Fills a PatchData with the elements attached to a center vertex. More... | |
PatchDataVerticesMemento * | create_vertices_memento (MsqError &err, bool include_higher_order=false) |
Creates a memento that holds the current state of the PatchData coordinates. More... | |
void | recreate_vertices_memento (PatchDataVerticesMemento *memento, MsqError &err, bool include_higher_order=false) |
reinstantiates a memento to holds the current state of the PatchData coordinates. More... | |
void | set_to_vertices_memento (PatchDataVerticesMemento *memento, MsqError &err) |
Restore the PatchData coordinates to the state contained in the memento. More... | |
PatchType | type () const |
void | set_mesh_set (MeshSet *ms) |
Sets the originating meshSet. More... | |
MeshSet * | get_mesh_set () |
Returns the originating meshSet. More... | |
void | clear_tag_data () |
Public Attributes | |
CornerTag< TargetMatrix > | targetMatrices |
Target matrix data. More... | |
Private Member Functions | |
PatchData (const PatchData &pd) | |
Doesn't allow PatchData to be copied implicitly. More... | |
PatchData & | operator= (const PatchData &pd) |
Doesn't allow a PatchData object to be assigned to another. More... | |
void | note_have_info (ComputedInfo info) |
void | update_cached_normals (MsqError &) |
PatchData (const PatchData &pd) | |
Doesn't allow PatchData to be copied implicitly. More... | |
PatchData & | operator= (const PatchData &pd) |
Doesn't allow a PatchData object to be assigned to another. More... | |
void | note_have_info (ComputedInfo info) |
void | update_cached_normals (MsqError &) |
Private Attributes | |
MeshSet * | meshSet |
bool | domainSet |
DomainHint | domainHint |
PatchType | mType |
PatchDataMem< MsqVertex > | vertexArray |
PatchDataMem< Mesh::VertexHandle > | vertexHandlesArray |
PatchDataMem< MsqMeshEntity > | elementArray |
PatchDataMem< Mesh::ElementHandle > | elementHandlesArray |
PatchDataMem< size_t > | elemConnectivityArray |
PatchDataMem< size_t > | vertAdjacencyArray |
PatchDataMem< size_t > | vertAdjacencyOffsets |
PatchDataMem< Vector3D > | vertexNormals |
size_t | numCornerVertices |
double | computedInfos [MAX_COMPUTED_INFO_ENUM] |
unsigned | haveComputedInfos |
Friends | |
class | MeshSet |
msq_stdio::ostream & | operator<< (msq_stdio::ostream &, const PatchData &) |
Display the coordinates and connectivity information. More... | |
msq_stdio::ostream & | operator<< (msq_stdio::ostream &, const PatchData &) |
Display the coordinates and connectivity information. More... | |
Contains all the mesh information necessary for one iteration of the optimization algorithms over a local mesh patch.
Definition at line 87 of file includeLinks/PatchData.hpp.
enum ComputedInfo |
Definition at line 104 of file includeLinks/PatchData.hpp.
enum ComputedInfo |
Definition at line 104 of file src/Mesh/PatchData.hpp.
enum culling_method |
Definition at line 407 of file src/Mesh/PatchData.hpp.
enum culling_method |
Those are the culling method available to the users. Developpers: The values used in that enum are used by a bitset, so they have to be 2-based (2,4,8,16,32, ...)
Definition at line 407 of file includeLinks/PatchData.hpp.
enum PatchType |
Tells MeshSet how to retrieve the mesh entities that will be stored in PatchData.
The PatchType is set by the QualityImprover etc... and mesquite propagates it to the MeshSet.
Enumerator | |
---|---|
UNDEFINED_PATCH_TYPE |
Default. |
VERTICES_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through edges to the center vertex. |
ELEMENTS_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through elements to the center vertex. |
GLOBAL_PATCH |
Fills PatchData with all elements and vertices contained in all the meshes of the MeshSet. |
UNDEFINED_PATCH_TYPE |
Default. |
VERTICES_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through edges to the center vertex. |
ELEMENTS_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through elements to the center vertex. |
GLOBAL_PATCH |
Fills PatchData with all elements and vertices contained in all the meshes of the MeshSet. |
Definition at line 391 of file includeLinks/PatchData.hpp.
enum PatchType |
Tells MeshSet how to retrieve the mesh entities that will be stored in PatchData.
The PatchType is set by the QualityImprover etc... and mesquite propagates it to the MeshSet.
Enumerator | |
---|---|
UNDEFINED_PATCH_TYPE |
Default. |
VERTICES_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through edges to the center vertex. |
ELEMENTS_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through elements to the center vertex. |
GLOBAL_PATCH |
Fills PatchData with all elements and vertices contained in all the meshes of the MeshSet. |
UNDEFINED_PATCH_TYPE |
Default. |
VERTICES_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through edges to the center vertex. |
ELEMENTS_ON_VERTEX_PATCH |
fills PatchData with the vertices connected through elements to the center vertex. |
GLOBAL_PATCH |
Fills PatchData with all elements and vertices contained in all the meshes of the MeshSet. |
Definition at line 391 of file src/Mesh/PatchData.hpp.
PatchData | ( | ) |
Definition at line 67 of file Mesh/PatchData.cpp.
~PatchData | ( | ) |
Definition at line 81 of file Mesh/PatchData.cpp.
Doesn't allow PatchData to be copied implicitly.
Mementos such as PatchDataVerticesMemento should be used when necessary.
PatchData | ( | ) |
~PatchData | ( | ) |
Doesn't allow PatchData to be copied implicitly.
Mementos such as PatchDataVerticesMemento should be used when necessary.
void allocate_storage | ( | size_t | vertex_count, |
size_t | element_count, | ||
size_t | vertex_use_count, | ||
MsqError & | err | ||
) |
Used by test code when creating a PatchData directly.
PatchData should be constructed by first calling this function, then initializing arrays and then calling initalize_data.
Definition at line 1471 of file Mesh/PatchData.cpp.
References PatchData::clear_tag_data(), PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::numCornerVertices, PatchDataMem< X >::resize(), PatchData::vertexArray, and PatchData::vertexHandlesArray.
void allocate_storage | ( | size_t | vertex_count, |
size_t | element_count, | ||
size_t | vertex_use_count, | ||
MsqError & | err | ||
) |
|
inline |
Removes data.
Definition at line 491 of file includeLinks/PatchData.hpp.
References PatchDataMem< X >::clear(), PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::haveComputedInfos, PatchData::meshSet, PatchData::numCornerVertices, PatchData::vertAdjacencyArray, PatchData::vertAdjacencyOffsets, PatchData::vertexArray, PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by MeshSet::get_next_patch().
void clear | ( | ) |
Removes data.
|
inline |
This function clears the patch information such as maximum volume, etc ...
Definition at line 116 of file includeLinks/PatchData.hpp.
References PatchData::haveComputedInfos.
|
inline |
This function clears the patch information such as maximum volume, etc ...
Definition at line 116 of file src/Mesh/PatchData.hpp.
References PatchData::haveComputedInfos.
void clear_tag_data | ( | ) |
Definition at line 1485 of file Mesh/PatchData.cpp.
References PatchData::targetMatrices.
Referenced by PatchData::allocate_storage(), PatchData::initialize_data(), and PatchData::reorder().
void clear_tag_data | ( | ) |
|
inline |
Creates a memento that holds the current state of the PatchData coordinates.
Definition at line 615 of file includeLinks/PatchData.hpp.
References PatchDataVerticesMemento::arraySize, PatchData::num_nodes(), PatchData::num_vertices(), PatchDataVerticesMemento::numVertices, PatchDataVerticesMemento::originator, PatchData::vertexArray, and PatchDataVerticesMemento::vertices.
Referenced by ConjugateGradient::initialize(), FeasibleNewton::initialize(), SteepestDescent::optimize_vertex_positions(), TerminationCriterion::reset_inner(), and TerminationCriterion::reset_patch().
PatchDataVerticesMemento* create_vertices_memento | ( | MsqError & | err, |
bool | include_higher_order = false |
||
) |
Creates a memento that holds the current state of the PatchData coordinates.
|
inline |
Returns whether a domain is associated with the MeshSet from which the Patch originates. If false, you cannot ask for a surface normal.
Definition at line 280 of file includeLinks/PatchData.hpp.
References PatchData::domainSet.
Referenced by GeneralizedConditionNumberQualityMetric::compute_condition_number(), MsqMeshEntity::compute_corner_normals(), and ShapeQualityMetric::condition_number_2d().
|
inline |
Returns whether a domain is associated with the MeshSet from which the Patch originates. If false, you cannot ask for a surface normal.
Definition at line 280 of file src/Mesh/PatchData.hpp.
References PatchData::domainSet.
MsqMeshEntity& element_by_index | ( | size_t | index | ) |
|
inline |
Definition at line 589 of file includeLinks/PatchData.hpp.
References PatchData::elementArray.
Referenced by NonSmoothSteepestDescent::compute_function(), MeanMidNodeMover::loop_over_mesh(), QualityAssessor::loop_over_mesh(), and CornerTagHandles::num_corners().
void generate_vertex_to_element_data | ( | ) |
Create the arrays that store which elements are attached to each node. If you know how many total vertex uses there are, pass it in. Otherwise the PatchData will calculate that number.
Definition at line 944 of file Mesh/PatchData.cpp.
References PatchDataMem< X >::begin(), PatchData::elemConnectivityArray, PatchData::elementArray, PatchDataMem< X >::empty(), PatchDataMem< X >::end(), i, MSQ_FUNCTION_TIMER, PatchData::num_nodes(), PatchDataMem< X >::resize(), PatchDataMem< X >::size(), PatchData::vertAdjacencyArray, and PatchData::vertAdjacencyOffsets.
Referenced by PatchData::get_vertex_element_adjacencies(), and PatchData::reorder().
void generate_vertex_to_element_data | ( | ) |
Create the arrays that store which elements are attached to each node. If you know how many total vertex uses there are, pass it in. Otherwise the PatchData will calculate that number.
void get_adjacent_entities_via_n_dim | ( | int | n, |
size_t | ent_ind, | ||
msq_std::vector< size_t > & | adj_ents, | ||
MsqError & | err | ||
) |
Get the indices of entities attached to entity (given by ent_ind). adj_ents is filled with the indices into the entity array of elements adjacent to the given element via an n-dimensional entity.
Referenced by ASMQualityMetric::evaluate_element().
void get_adjacent_entities_via_n_dim | ( | int | n, |
size_t | ent_ind, | ||
msq_std::vector< size_t > & | adj_ents, | ||
MsqError & | err | ||
) |
Get the indices of entities attached to entity (given by ent_ind). adj_ents is filled with the indices into the entity array of elements adjacent to the given element via an n-dimensional entity.
void get_adjacent_vertex_indices | ( | size_t | vertex_index, |
msq_std::vector< size_t > & | vert_indices, | ||
MsqError & | err | ||
) |
Get the indices of vertices that are attached to vertex (given by vertex_index) by an element edge.
void get_adjacent_vertex_indices | ( | size_t | vertex_index, |
msq_std::vector< size_t > & | vert_indices, | ||
MsqError & | err | ||
) |
Get the indices of vertices that are attached to vertex (given by vertex_index) by an element edge.
Referenced by LPtoPTemplate::compute_analytical_gradient(), EdgeLengthQualityMetric::evaluate_vertex(), EdgeLengthRangeQualityMetric::evaluate_vertex(), SmartLaplacianSmoother::optimize_vertex_positions(), and LaplacianSmoother::optimize_vertex_positions().
double get_average_Lambda_3d | ( | MsqError & | err | ) |
Returns average corner determinant over all corners in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
Definition at line 158 of file Mesh/PatchData.cpp.
References A, PatchData::AVERAGE_DET3D, TargetCalculator::compute_Lambda(), PatchData::computedInfos, PatchData::elementArray, PatchData::have_computed_info(), i, MSQ_ERRZERO, Mesquite::MSQ_MAX_NUM_VERT_PER_ENT, and PatchData::note_have_info().
Referenced by LVQDTargetCalculator::compute_target_matrices().
double get_average_Lambda_3d | ( | MsqError & | err | ) |
Returns average corner determinant over all corners in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
double get_barrier_delta | ( | MsqError & | err | ) |
Returns delta based on the minimum and maximum corner determinant over all elements in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
Definition at line 117 of file Mesh/PatchData.cpp.
References A, PatchData::computedInfos, Mesquite::det(), PatchData::elementArray, PatchData::have_computed_info(), i, MsqError::INVALID_MESH, j, max(), min(), PatchData::MINMAX_SIGNED_DET3D, Mesquite::MSQ_DBL_MAX, MSQ_ERRZERO, Mesquite::MSQ_MAX_NUM_VERT_PER_ENT, Mesquite::MSQ_MIN, MSQ_SETERR, PatchData::note_have_info(), and PatchData::num_elements().
Referenced by RI_DFT::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), ShapeQualityMetric::condition_number_2d(), ShapeQualityMetric::condition_number_3d(), RI_DFT::evaluate_element(), I_DFT::evaluate_element(), and DistanceFromTarget::get_barrier_function().
double get_barrier_delta | ( | MsqError & | err | ) |
Returns delta based on the minimum and maximum corner determinant over all elements in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
|
inline |
Definition at line 201 of file src/Mesh/PatchData.hpp.
References PatchData::elemConnectivityArray.
|
inline |
Definition at line 201 of file includeLinks/PatchData.hpp.
References PatchData::elemConnectivityArray.
Get the normal to the domain at the centroid (projected to the domain) of a given element. Normal is returned in Vector3D &surf_norm. If the normal cannot be determined, or if the underlying domain is not a surface, the normal will be set to (0,0,0). Check PatchData::domain_set() is not false first.
Definition at line 1184 of file Mesh/PatchData.cpp.
References PatchData::elementArray, PatchData::elementHandlesArray, MeshSet::get_domain_constraint(), MsqError::INVALID_STATE, PatchData::meshSet, MSQ_ERRRTN, MSQ_SETERR, and MeshDomain::normal_at().
Referenced by IdealWeightInverseMeanRatio::compute_element_analytical_gradient(), IdealWeightMeanRatio::compute_element_analytical_gradient(), IdealWeightInverseMeanRatio::compute_element_analytical_hessian(), IdealWeightMeanRatio::compute_element_analytical_hessian(), MsqMeshEntity::compute_signed_area(), IdealWeightInverseMeanRatio::evaluate_element(), IdealWeightMeanRatio::evaluate_element(), PatchData::get_domain_normal_at_element(), and UntangleBetaQualityMetric::untangle_function_2d().
Get the normal to the domain at the centroid (projected to the domain) of a given element. Normal is returned in Vector3D &surf_norm. If the normal cannot be determined, or if the underlying domain is not a surface, the normal will be set to (0,0,0). Check PatchData::domain_set() is not false first.
|
inline |
Alternative signature. Same functionality.
Definition at line 321 of file includeLinks/PatchData.hpp.
References PatchData::elementArray, and PatchData::get_domain_normal_at_element().
|
inline |
Alternative signature. Same functionality.
Definition at line 321 of file src/Mesh/PatchData.hpp.
References PatchData::elementArray, and PatchData::get_domain_normal_at_element().
void get_domain_normal_at_vertex | ( | size_t | vertex_index, |
bool | normalize, | ||
Vector3D & | surf_norm, | ||
MsqError & | err | ||
) |
Get the normal of the surface for a given vertex. Normal is returned in Vector3D &surf_norm. If the normal cannot be determined, or if the underlying domain is not a surface, the normal will be set to (0,0,0). Check PatchData::domain_set() is not false first.
Definition at line 1117 of file Mesh/PatchData.cpp.
References PatchData::domainHint, MeshSet::get_domain_constraint(), MsqError::INVALID_STATE, PatchData::meshSet, MSQ_ERRRTN, MSQ_SETERR, Mesquite::NO_DOMAIN_HINT, MeshDomain::normal_at(), Vector3D::normalize(), Mesquite::PLANAR_DOMAIN, PatchData::update_cached_normals(), PatchData::vertexArray, PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by GeneralizedConditionNumberQualityMetric::compute_condition_number(), RI_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), ShapeQualityMetric::condition_number_2d(), and RI_DFT::evaluate_element().
void get_domain_normal_at_vertex | ( | size_t | vertex_index, |
bool | normalize, | ||
Vector3D & | surf_norm, | ||
MsqError & | err | ||
) |
Get the normal of the surface for a given vertex. Normal is returned in Vector3D &surf_norm. If the normal cannot be determined, or if the underlying domain is not a surface, the normal will be set to (0,0,0). Check PatchData::domain_set() is not false first.
Get surface normal at a point where the surface is the domain of an element and the point is the location of one of the element corners.
Get surface normals at element corners. normals_out must be of sufficient size to hold the normals of all the corners.
Definition at line 1221 of file Mesh/PatchData.cpp.
References PatchData::domainHint, PatchData::elementArray, PatchData::elementHandlesArray, MeshSet::get_domain_constraint(), MsqMeshEntity::get_vertex_index_array(), i, MsqError::INVALID_STATE, PatchData::meshSet, MSQ_CHKERR, MSQ_ERRRTN, MSQ_SETERR, Mesquite::NO_DOMAIN_HINT, MeshDomain::normal_at(), Mesquite::PLANAR_DOMAIN, PatchData::update_cached_normals(), MsqMeshEntity::vertex_count(), PatchData::vertexArray, and PatchData::vertexNormals.
Referenced by MsqMeshEntity::compute_corner_normals().
Get surface normal at a point where the surface is the domain of an element and the point is the location of one of the element corners.
Get surface normals at element corners. normals_out must be of sufficient size to hold the normals of all the corners.
|
inline |
Returns a pointer to the start of the element array.
Returns the PatchData element array.
Definition at line 530 of file includeLinks/PatchData.hpp.
References PatchData::elementArray, MsqError::INVALID_STATE, and MSQ_SETERR.
Referenced by MsqHessian::accumulate_entries(), VertexMover::check_feasible(), LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), TargetCalculator::compute_default_target_matrices(), TargetCalculator::compute_guide_matrices(), TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), TargetCalculator::compute_target_matrices_and_check_det(), LInfTemplate::concrete_evaluate(), MaxTemplate::concrete_evaluate(), LPtoPTemplate::concrete_evaluate(), ASMQualityMetric::evaluate_element(), VertexConditionNumberQualityMetric::evaluate_vertex(), LocalSizeQualityMetric::evaluate_vertex(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), MsqHessian::initialize(), NonSmoothSteepestDescent::optimize_vertex_positions(), and CornerTagHandles::save_load_tags().
const MsqMeshEntity* get_element_array | ( | MsqError & | err | ) | const |
Returns a pointer to the start of the element array.
MsqMeshEntity* get_element_array | ( | MsqError & | err | ) |
|
inline |
Definition at line 536 of file includeLinks/PatchData.hpp.
References PatchData::elementArray, MsqError::INVALID_STATE, and MSQ_SETERR.
|
inline |
Definition at line 204 of file src/Mesh/PatchData.hpp.
References PatchData::elementHandlesArray.
|
inline |
Definition at line 204 of file includeLinks/PatchData.hpp.
References PatchData::elementHandlesArray.
Referenced by CornerTagHandles::save_load_tags().
size_t get_element_index | ( | MsqMeshEntity * | element | ) |
|
inline |
Definition at line 601 of file includeLinks/PatchData.hpp.
References PatchData::elementArray.
Referenced by 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(), MsqMeshEntity::compute_signed_area(), DistanceFromTarget::compute_T_matrices(), RI_DFT::evaluate_element(), ASMQualityMetric::evaluate_element(), UntangleBetaQualityMetric::evaluate_element(), AspectRatioGammaQualityMetric::evaluate_element(), and I_DFT::evaluate_element().
void get_element_vertex_coordinates | ( | size_t | elem_index, |
msq_std::vector< Vector3D > & | coords, | ||
MsqError & | err | ||
) |
Get the coordinates of vertices attached to the specified element.
void get_element_vertex_coordinates | ( | size_t | elem_index, |
msq_std::vector< Vector3D > & | coords, | ||
MsqError & | err | ||
) |
Get the coordinates of vertices attached to the specified element.
Referenced by AspectRatioGammaQualityMetric::evaluate_element().
void get_element_vertex_indices | ( | size_t | elem_index, |
msq_std::vector< size_t > & | vertex_indices, | ||
MsqError & | err | ||
) |
Get the indices of vertices of specified element. !inefficient!
void get_element_vertex_indices | ( | size_t | elem_index, |
msq_std::vector< size_t > & | vertex_indices, | ||
MsqError & | err | ||
) |
Get the indices of vertices of specified element. !inefficient!
double get_max_vertex_movement_squared | ( | PatchDataVerticesMemento * | memento, |
MsqError & | err | ||
) |
Calculates the distance each vertex has moved from its original position as defined by the PatchDataVerticesMememnto.
Finds the maximum movement (in the distance norm) of the vertices in a patch. The previous vertex positions are givena as a PatchDataVerticesMemento (memento). The distance squared which each vertex has moved is then calculated, and the largest of those distances is returned. This function only considers the movement of vertices that are currently 'free'.
memento | a memento of this patch's vertex position at some (prior) time in the optimization. |
Definition at line 679 of file Mesh/PatchData.cpp.
References Vector3D::length_squared(), MSQ_ERRZERO, MsqFreeVertexIndexIterator::next(), MsqFreeVertexIndexIterator::reset(), MsqFreeVertexIndexIterator::value(), PatchData::vertexArray, and PatchDataVerticesMemento::vertices.
Referenced by TerminationCriterion::accumulate_inner(), TerminationCriterion::accumulate_patch(), and TerminationCriterion::cull_vertices().
double get_max_vertex_movement_squared | ( | PatchDataVerticesMemento * | memento, |
MsqError & | err | ||
) |
Calculates the distance each vertex has moved from its original position as defined by the PatchDataVerticesMememnto.
|
inline |
Returns the originating meshSet.
Definition at line 423 of file includeLinks/PatchData.hpp.
References PatchData::meshSet.
Referenced by CornerTagHandles::get_current_mesh().
|
inline |
Returns the originating meshSet.
Definition at line 423 of file src/Mesh/PatchData.hpp.
References PatchData::meshSet.
void get_minmax_element_unsigned_area | ( | double & | min, |
double & | max, | ||
MsqError & | err | ||
) |
Returns the maximum volume or area out of all the elements in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
Definition at line 86 of file Mesh/PatchData.cpp.
References PatchData::computedInfos, PatchData::elementArray, PatchData::have_computed_info(), i, MsqError::INTERNAL_ERROR, max(), PatchData::MAX_UNSIGNED_AREA, min(), PatchData::MIN_UNSIGNED_AREA, Mesquite::MSQ_DBL_MAX, MSQ_ERRRTN, MSQ_SETERR, PatchData::note_have_info(), and PatchData::num_elements().
void get_minmax_element_unsigned_area | ( | double & | min, |
double & | max, | ||
MsqError & | err | ||
) |
Returns the maximum volume or area out of all the elements in the patch This information is stored in the patch and should not decrease performance when used properly.
See also PatchData::clear_computed_info() .
Fills a PatchData with the elements attached to a center vertex.
Note that all entities in the sub-patch are copies of the entities in 'this' patch. As such, moving a vertex in the sub-patch won't move the corresponding vertex in the source patch. Also, calling 'update_mesh()' on the sub-patch WILL modify the TSTT mesh, but the source patch won't see the changes.
Definition at line 1008 of file Mesh/PatchData.cpp.
References PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, MsqMeshEntity::get_element_type(), PatchData::get_vertex_element_adjacencies(), MsqMeshEntity::get_vertex_index(), PatchData::initialize_data(), MsqError::INVALID_ARG, MSQ_ERRRTN, MSQ_SETERR, MsqMeshEntity::node_count(), PatchData::num_vertices(), PatchDataMem< X >::resize(), PatchData::vertexArray, and PatchData::vertexHandlesArray.
Referenced by ObjectiveFunction::compute_numerical_gradient().
Fills a PatchData with the elements attached to a center vertex.
Note that all entities in the sub-patch are copies of the entities in 'this' patch. As such, moving a vertex in the sub-patch won't move the corresponding vertex in the source patch. Also, calling 'update_mesh()' on the sub-patch WILL modify the TSTT mesh, but the source patch won't see the changes.
Returns a pointer to the start of the vertex array.
Returns an array of all vertices in the PatchData.
Definition at line 513 of file includeLinks/PatchData.hpp.
References MsqError::INVALID_STATE, MSQ_SETERR, and PatchData::vertexArray.
Referenced by TerminationCriterion::accumulate_patch(), Mesquite::centroid_smooth_mesh(), LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), LocalSizeQualityMetric::compute_corner_area(), MsqMeshEntity::compute_corner_matrices(), LocalSizeQualityMetric::compute_corner_volume(), 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(), ObjectiveFunction::compute_numerical_gradient(), MsqMeshEntity::compute_signed_area(), MsqMeshEntity::compute_signed_volume(), MsqMeshEntity::compute_unsigned_area(), MsqMeshEntity::compute_unsigned_volume(), MsqMeshEntity::compute_weighted_jacobian(), LInfTemplate::concrete_evaluate(), MaxTemplate::concrete_evaluate(), LPtoPTemplate::concrete_evaluate(), ConditionNumberQualityMetric::evaluate_element(), RI_DFT::evaluate_element(), UntangleBetaQualityMetric::evaluate_element(), IdealWeightInverseMeanRatio::evaluate_element(), IdealWeightMeanRatio::evaluate_element(), I_DFT::evaluate_element(), VertexConditionNumberQualityMetric::evaluate_vertex(), EdgeLengthQualityMetric::evaluate_vertex(), EdgeLengthRangeQualityMetric::evaluate_vertex(), MsqMeshEntity::get_centroid(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), MeshTransform::loop_over_mesh(), MsqFreeVertexIndexIterator::MsqFreeVertexIndexIterator(), SmartLaplacianSmoother::optimize_vertex_positions(), Randomize::optimize_vertex_positions(), ConjugateGradient::optimize_vertex_positions(), SteepestDescent::optimize_vertex_positions(), FeasibleNewton::optimize_vertex_positions(), NonSmoothSteepestDescent::optimize_vertex_positions(), and Randomize::randomize_vertex().
Returns a pointer to the start of the vertex array.
Definition at line 519 of file includeLinks/PatchData.hpp.
References MsqError::INVALID_STATE, MSQ_SETERR, and PatchData::vertexArray.
size_t* get_vertex_element_adjacencies | ( | size_t | vertex_index, |
size_t & | array_len_out, | ||
MsqError & | err | ||
) |
Get indices of elements attached to specified vertex
size_t * get_vertex_element_adjacencies | ( | size_t | vertex_index, |
size_t & | array_len_out, | ||
MsqError & | err | ||
) |
Get indices of elements attached to specified vertex
Definition at line 778 of file Mesh/PatchData.cpp.
References PatchDataMem< X >::empty(), PatchData::generate_vertex_to_element_data(), PatchData::vertAdjacencyArray, and PatchData::vertAdjacencyOffsets.
Referenced by VertexConditionNumberQualityMetric::evaluate_vertex(), LocalSizeQualityMetric::evaluate_vertex(), PatchData::get_subpatch(), and MeanMidNodeMover::loop_over_mesh().
void get_vertex_element_indices | ( | size_t | vertex_index, |
msq_std::vector< size_t > & | elem_indices, | ||
MsqError & | err | ||
) |
Get the indices of the elements attached to the specified vertex.
void get_vertex_element_indices | ( | size_t | vertex_index, |
msq_std::vector< size_t > & | elem_indices, | ||
MsqError & | err | ||
) |
Get the indices of the elements attached to the specified vertex.
size_t get_vertex_index | ( | MsqVertex * | vertex | ) |
|
inline |
gets the index of a vertex in the PatchData vertex array, given a pointer to the vertex.
Definition at line 596 of file includeLinks/PatchData.hpp.
References PatchData::vertexArray.
Referenced by LPtoPTemplate::compute_analytical_gradient(), QualityMetric::compute_element_gradient_expanded(), QualityMetric::compute_element_hessian(), QualityMetric::compute_element_numerical_hessian(), VertexConditionNumberQualityMetric::evaluate_vertex(), EdgeLengthQualityMetric::evaluate_vertex(), LocalSizeQualityMetric::evaluate_vertex(), EdgeLengthRangeQualityMetric::evaluate_vertex(), and Randomize::randomize_vertex().
|
inline |
Definition at line 118 of file includeLinks/PatchData.hpp.
References PatchData::haveComputedInfos, and cimg_library::cimg::info().
Referenced by PatchData::get_average_Lambda_3d(), PatchData::get_barrier_delta(), PatchData::get_minmax_element_unsigned_area(), and Mesquite::operator<<().
|
inline |
Definition at line 118 of file src/Mesh/PatchData.hpp.
References PatchData::haveComputedInfos, and cimg_library::cimg::info().
void initialize_data | ( | size_t * | elem_offset_array, |
MsqError & | err | ||
) |
Call after filling vertex handle and connectivity arrays to finish initializing the PatchData.
Reorders vertex handles array such that all higher-order nodes are at end of array, updates element connectivity array appropriately, initalizes numCornerVertices, and per-element vertex and node counts.
NOTE: If the patch contains higher-order elements, this function will re-order the nodes in the vertex array. Do NOT assume vertex indices are the same after calling this function!
NOTE: This function expects the following data to be initalized: vertexHandlesArray elemConnectivityArray the topology type for all elements in elementArray The function assumes the following data has not been initialized and therefore does not need to be updated: vertexArray
elem_offset_array | Offset into connectivity array for each element |
void initialize_data | ( | size_t * | elem_offset_array, |
MsqError & | err | ||
) |
Call after filling vertex handle and connectivity arrays to finish initializing the PatchData.
Reorders vertex handles array such that all higher-order nodes are at end of array, updates element connectivity array appropriately, initalizes numCornerVertices, and per-element vertex and node counts.
NOTE: If the patch contains higher-order elements, this function will re-order the nodes in the vertex array. Do NOT assume vertex indices are the same after calling this function!
NOTE: This function expects the following data to be initalized: vertexHandlesArray elemConnectivityArray the topology type for all elements in elementArray The function assumes the following data has not been initialized and therefore does not need to be updated: vertexArray
elem_offset_array | Offset into connectivity array for each element |
Definition at line 1354 of file Mesh/PatchData.cpp.
References PatchDataMem< X >::clear(), PatchData::clear_tag_data(), PatchData::domainHint, PatchData::elemConnectivityArray, PatchData::elementArray, MsqMeshEntity::get_vertex_index_array(), i, MsqError::INVALID_STATE, j, MSQ_SETERR, MsqMeshEntity::node_count(), PatchData::num_nodes(), PatchData::num_vertices(), PatchData::numCornerVertices, Mesquite::PLANAR_DOMAIN, PatchDataMem< X >::resize(), PatchDataMem< X >::size(), swap(), PatchData::vertAdjacencyArray, PatchData::vertAdjacencyOffsets, MsqMeshEntity::vertex_count(), PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), and PatchData::get_subpatch().
void move_free_vertices_constrained | ( | Vector3D | dk[], |
size_t | nb_vtx, | ||
double | step_size, | ||
MsqError & | err | ||
) |
Moves free vertices and then snaps the free vertices to the domain.
void move_free_vertices_constrained | ( | Vector3D | dk[], |
size_t | nb_vtx, | ||
double | step_size, | ||
MsqError & | err | ||
) |
Moves free vertices and then snaps the free vertices to the domain.
Definition at line 580 of file Mesh/PatchData.cpp.
References MsqError::INVALID_ARG, MSQ_DBG, MSQ_DBGOUT, MSQ_ERRRTN, MSQ_SETERR, MsqFreeVertexIndexIterator::next(), PatchData::num_vertices(), MsqFreeVertexIndexIterator::reset(), PatchData::snap_vertex_to_domain(), MsqFreeVertexIndexIterator::value(), and PatchData::vertexArray.
Referenced by SteepestDescent::optimize_vertex_positions(), and FeasibleNewton::optimize_vertex_positions().
|
inlineprivate |
Definition at line 436 of file src/Mesh/PatchData.hpp.
References PatchData::haveComputedInfos, and cimg_library::cimg::info().
|
inlineprivate |
Definition at line 436 of file includeLinks/PatchData.hpp.
References PatchData::haveComputedInfos, and cimg_library::cimg::info().
Referenced by PatchData::get_average_Lambda_3d(), PatchData::get_barrier_delta(), and PatchData::get_minmax_element_unsigned_area().
size_t num_corners | ( | ) |
number of elements corners in the Patch.
size_t num_corners | ( | ) |
number of elements corners in the Patch.
Definition at line 1491 of file Mesh/PatchData.cpp.
References PatchData::elementArray, and i.
|
inline |
number of elements in the Patch.
Definition at line 179 of file src/Mesh/PatchData.hpp.
References PatchData::elementArray.
|
inline |
number of elements in the Patch.
Definition at line 179 of file includeLinks/PatchData.hpp.
References PatchData::elementArray.
Referenced by VertexMover::check_feasible(), LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), TargetCalculator::compute_default_target_matrices(), TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), TargetCalculator::compute_target_matrices_and_check_det(), LInfTemplate::concrete_evaluate(), MaxTemplate::concrete_evaluate(), LPtoPTemplate::concrete_evaluate(), PatchData::get_barrier_delta(), PatchData::get_minmax_element_unsigned_area(), MsqHessian::initialize(), QualityAssessor::loop_over_mesh(), Mesquite::operator<<(), NonSmoothSteepestDescent::optimize_vertex_positions(), PatchData::reorder(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().
unsigned num_free_nodes | ( | MsqError & | err | ) | const |
Definition at line 470 of file Mesh/PatchData.cpp.
References i, PatchData::num_nodes(), and PatchData::vertexArray.
unsigned num_free_nodes | ( | MsqError & | err | ) | const |
int num_free_vertices | ( | MsqError & | err | ) | const |
Returns the number of elements in the current patch who are free to move.
This is a costly function, since we have to check the flags of all vertices in the patch.
int num_free_vertices | ( | MsqError & | err | ) | const |
Returns the number of elements in the current patch who are free to move.
This is a costly function, since we have to check the flags of all vertices in the patch.
Definition at line 458 of file Mesh/PatchData.cpp.
References i, PatchData::num_vertices(), and PatchData::vertexArray.
Referenced by ConjugateGradient::optimize_vertex_positions(), SteepestDescent::optimize_vertex_positions(), FeasibleNewton::optimize_vertex_positions(), and NonSmoothSteepestDescent::optimize_vertex_positions().
|
inline |
Get number of nodes (vertex + higher-order nodes)
Definition at line 184 of file includeLinks/PatchData.hpp.
References PatchData::vertexArray.
Referenced by PatchData::create_vertices_memento(), PatchData::generate_vertex_to_element_data(), PatchData::initialize_data(), MeanMidNodeMover::loop_over_mesh(), PatchData::num_free_nodes(), Mesquite::operator<<(), PatchData::recreate_vertices_memento(), PatchData::set_to_vertices_memento(), MeshSet::update_mesh(), and MeshSet::write_vtk().
|
inline |
Get number of nodes (vertex + higher-order nodes)
Definition at line 184 of file src/Mesh/PatchData.hpp.
References PatchData::vertexArray.
|
inline |
number of vertices in the patch.
Definition at line 176 of file src/Mesh/PatchData.hpp.
References PatchData::numCornerVertices.
|
inline |
number of vertices in the patch.
Definition at line 176 of file includeLinks/PatchData.hpp.
References PatchData::numCornerVertices.
Referenced by TerminationCriterion::accumulate_inner(), TerminationCriterion::accumulate_patch(), CompositeOFMultiply::compute_analytical_gradient(), CompositeOFAdd::compute_analytical_gradient(), CompositeOFScalarMultiply::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_gradient(), LPtoPTemplate::compute_analytical_hessian(), ObjectiveFunction::compute_numerical_gradient(), TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), LInfTemplate::concrete_evaluate(), MaxTemplate::concrete_evaluate(), LPtoPTemplate::concrete_evaluate(), PatchData::create_vertices_memento(), ConjugateGradient::get_step(), PatchData::get_subpatch(), MsqHessian::initialize(), PatchData::initialize_data(), MeanMidNodeMover::loop_over_mesh(), MeshTransform::loop_over_mesh(), QualityAssessor::loop_over_mesh(), PatchData::move_free_vertices_constrained(), MsqFreeVertexIndexIterator::next(), PatchData::num_free_vertices(), Mesquite::operator<<(), Randomize::optimize_vertex_positions(), ConjugateGradient::optimize_vertex_positions(), SteepestDescent::optimize_vertex_positions(), FeasibleNewton::optimize_vertex_positions(), NonSmoothSteepestDescent::optimize_vertex_positions(), PatchData::recreate_vertices_memento(), PatchData::reorder(), TerminationCriterion::reset_inner(), PatchData::set_all_vertices_soft_fixed(), PatchData::set_all_vertices_soft_free(), PatchData::set_free_vertices_constrained(), PatchData::set_free_vertices_soft_fixed(), PatchData::set_to_vertices_memento(), and PatchData::update_cached_normals().
Doesn't allow a PatchData object to be assigned to another.
Mementos such as PatchDataVerticesMemento should be used when necessary.
Doesn't allow a PatchData object to be assigned to another.
Mementos such as PatchDataVerticesMemento should be used when necessary.
|
inline |
reinstantiates a memento to holds the current state of the PatchData coordinates.
Improves memory management.
Definition at line 640 of file includeLinks/PatchData.hpp.
References PatchDataVerticesMemento::arraySize, PatchData::num_nodes(), PatchData::num_vertices(), PatchDataVerticesMemento::numVertices, PatchDataVerticesMemento::originator, PatchData::vertexArray, and PatchDataVerticesMemento::vertices.
Referenced by TerminationCriterion::accumulate_patch(), ConjugateGradient::get_step(), FeasibleNewton::optimize_vertex_positions(), TerminationCriterion::reset_inner(), and TerminationCriterion::reset_patch().
void recreate_vertices_memento | ( | PatchDataVerticesMemento * | memento, |
MsqError & | err, | ||
bool | include_higher_order = false |
||
) |
reinstantiates a memento to holds the current state of the PatchData coordinates.
Improves memory management.
void reorder | ( | ) |
Reorders the mesh data.
Physically reorder the vertices and elements in the PatchData to improve the locality of reference. This method implements a Reverse Breadth First Search order starting with the vertex furthest from the origin. Other orderings can also be implemented.
Definition at line 196 of file Mesh/PatchData.cpp.
References PatchDataMem< X >::clear(), PatchData::clear_tag_data(), PatchData::domainHint, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::generate_vertex_to_element_data(), i, j, max(), PatchData::num_elements(), PatchData::num_vertices(), Mesquite::PLANAR_DOMAIN, q, PatchDataMem< X >::size(), PatchData::vertAdjacencyArray, PatchData::vertAdjacencyOffsets, PatchData::vertexArray, PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by FeasibleNewton::initialize_mesh_iteration().
void reorder | ( | ) |
Reorders the mesh data.
void set_all_vertices_soft_fixed | ( | MsqError & | err | ) |
Add a soft_fixed flag to all vertices in the patch.
Definition at line 704 of file Mesh/PatchData.cpp.
References i, PatchData::num_vertices(), and PatchData::vertexArray.
void set_all_vertices_soft_fixed | ( | MsqError & | err | ) |
Add a soft_fixed flag to all vertices in the patch.
void set_all_vertices_soft_free | ( | MsqError & | err | ) |
Remove the soft_fixed flag from all vertices in the patch.
Definition at line 722 of file Mesh/PatchData.cpp.
References i, PatchData::num_vertices(), and PatchData::vertexArray.
Referenced by TerminationCriterion::cull_vertices().
void set_all_vertices_soft_free | ( | MsqError & | err | ) |
Remove the soft_fixed flag from all vertices in the patch.
void set_free_vertices_constrained | ( | PatchDataVerticesMemento * | memento, |
Vector3D | dk[], | ||
size_t | nb_vtx, | ||
double | step_size, | ||
MsqError & | err | ||
) |
Moves free vertices from a memento position along a certain direction and then snaps the free vertices to the domain.
dk | an array of directions, ordered like the vertices in the PatchData. |
nb_vtx | number of vertices. |
step_size | a scalar that multiplies the vectors given in dk. |
void set_free_vertices_constrained | ( | PatchDataVerticesMemento * | memento, |
Vector3D | dk[], | ||
size_t | nb_vtx, | ||
double | step_size, | ||
MsqError & | err | ||
) |
Moves free vertices from a memento position along a certain direction and then snaps the free vertices to the domain.
dk | an array of directions, ordered like the vertices in the PatchData. |
nb_vtx | number of vertices. |
step_size | a scalar that multiplies the vectors given in dk. |
set_free_vertices_constrained is similar to
PatchData::move_free_vertices_constrained() except the original vertex positions are those stored in the PatchDataVerticesMemento instead of the actual vertex position stored in the PatchData Vertex array. The final location is stored in the PatchData; the PatchDataVerticesMemento is unchanged.
dk,: | must be a [nb_vtx] array of Vector3D that contains the direction in which to move each vertex. Fixed vertices moving direction should be zero, although fixed vertices will not be moved regardless of their corresponding dk value. |
nb_vtx | is the number of vertices to move. must corresponds to the number of vertices in the PatchData. |
step_size | will multiply the moving direction given in dk for each vertex. |
Definition at line 630 of file Mesh/PatchData.cpp.
References MsqError::INVALID_ARG, MSQ_DBG, MSQ_DBGOUT, MSQ_ERRRTN, MSQ_SETERR, MsqFreeVertexIndexIterator::next(), PatchData::num_vertices(), PatchDataVerticesMemento::numVertices, MsqFreeVertexIndexIterator::reset(), PatchData::snap_vertex_to_domain(), MsqFreeVertexIndexIterator::value(), PatchData::vertexArray, and PatchDataVerticesMemento::vertices.
Referenced by ConjugateGradient::get_step().
void set_free_vertices_soft_fixed | ( | MsqError & | err | ) |
Add a soft_fixed flag to all free vertices in the patch.
void set_free_vertices_soft_fixed | ( | MsqError & | err | ) |
Add a soft_fixed flag to all free vertices in the patch.
Definition at line 712 of file Mesh/PatchData.cpp.
References i, PatchData::num_vertices(), and PatchData::vertexArray.
Referenced by TerminationCriterion::cull_vertices().
void set_mesh_set | ( | MeshSet * | ms | ) |
Sets the originating meshSet.
This is normally done in MeshSet::get_next_patch(). This function is only for tests purposes.
Definition at line 1266 of file Mesh/PatchData.cpp.
References PatchData::domainSet, MeshSet::get_domain_constraint(), and PatchData::meshSet.
void set_mesh_set | ( | MeshSet * | ms | ) |
Sets the originating meshSet.
This is normally done in MeshSet::get_next_patch(). This function is only for tests purposes.
|
inline |
Restore the PatchData coordinates to the state contained in the memento.
This function restores a PatchData object coordinates to a previous state hold in a PatchDataVerticesMemento object (see create_vertices_memento() ).
The function checks whether the memento originates from this particular PatchData object. The function does not destroy the memento object: this is the caller responsibility.
Definition at line 669 of file includeLinks/PatchData.hpp.
References MsqError::INVALID_ARG, MsqError::INVALID_STATE, MSQ_SETERR, PatchData::num_nodes(), PatchData::num_vertices(), PatchDataVerticesMemento::numVertices, PatchDataVerticesMemento::originator, PatchData::vertexArray, and PatchDataVerticesMemento::vertices.
Referenced by ConjugateGradient::get_step(), SteepestDescent::optimize_vertex_positions(), and FeasibleNewton::optimize_vertex_positions().
void set_to_vertices_memento | ( | PatchDataVerticesMemento * | memento, |
MsqError & | err | ||
) |
Restore the PatchData coordinates to the state contained in the memento.
set the coordinates of a vertex in the raw array
Definition at line 547 of file includeLinks/PatchData.hpp.
References MsqError::INVALID_ARG, MSQ_SETERR, and PatchData::vertexArray.
Referenced by MeanMidNodeMover::loop_over_mesh().
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. The actual domain constraint is managed by the MeshSet's MeshDomain object.
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.
Adjust the position of the specified vertex so that it lies on its constraining domain. The actual domain constraint is managed by the MeshSet's MeshDomain object.
The actual domain constraint is managed by the TSTT mesh implementation
Definition at line 1095 of file Mesh/PatchData.cpp.
References MeshDomain::closest_point(), PatchData::domainHint, MeshSet::get_domain_constraint(), PatchData::meshSet, MSQ_ERRRTN, Mesquite::SMOOTH_DOMAIN, MeshDomain::snap_to(), PatchData::vertexArray, PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by MeanMidNodeMover::loop_over_mesh(), PatchData::move_free_vertices_constrained(), SmartLaplacianSmoother::optimize_vertex_positions(), LaplacianSmoother::optimize_vertex_positions(), Randomize::optimize_vertex_positions(), ConjugateGradient::optimize_vertex_positions(), and PatchData::set_free_vertices_constrained().
|
inline |
|
inline |
Definition at line 415 of file includeLinks/PatchData.hpp.
References PatchData::mType.
Referenced by MeshSet::update_mesh().
|
private |
Definition at line 1151 of file Mesh/PatchData.cpp.
References PatchData::domainHint, PatchData::elementHandlesArray, MeshSet::get_domain_constraint(), i, MsqError::INVALID_STATE, PatchData::meshSet, MSQ_SETERR, nvc::norm(), MeshDomain::normal_at(), PatchData::num_vertices(), Mesquite::PLANAR_DOMAIN, PatchData::vertex_by_index(), PatchData::vertexArray, PatchData::vertexHandlesArray, and PatchData::vertexNormals.
Referenced by PatchData::get_domain_normal_at_vertex(), and PatchData::get_domain_normals_at_corners().
|
private |
void update_mesh | ( | MsqError & | err | ) |
Updates the underlying mesh (the Mesquite::Mesh implementation) with new node coordinates and flag values.
This function copies to the TSTT mesh the changes made to the free vertices / elements of the PatchData object.
Definition at line 935 of file Mesh/PatchData.cpp.
References PatchData::meshSet, MSQ_CHKERR, and MeshSet::update_mesh().
Referenced by MeanMidNodeMover::loop_over_mesh(), VertexMover::loop_over_mesh(), and MeshTransform::loop_over_mesh().
void update_mesh | ( | MsqError & | err | ) |
Updates the underlying mesh (the Mesquite::Mesh implementation) with new node coordinates and flag values.
MsqVertex& vertex_by_index | ( | size_t | index | ) |
Returns the start of the vertex->element array.
For each vertex in the patch, this array holds the number of elements the vertex is attached to, followed by the indices of those elements. Returns the start of the vertex->element offset array (v2e_o). For vertex i, v2e_o[i] is the index into the vertex->element array (v2e) where vertex i's data begins. So, v2e[v2e_o[i]] gives you the number of elements vertex i is attached to, and v2e[v2e_o[i]+1] gives you the index of the first element attached to vertex i.
|
inline |
Returns the start of the vertex->element array.
For each vertex in the patch, this array holds the number of elements the vertex is attached to, followed by the indices of those elements. Returns the start of the vertex->element offset array (v2e_o). For vertex i, v2e_o[i] is the index into the vertex->element array (v2e) where vertex i's data begins. So, v2e[v2e_o[i]] gives you the number of elements vertex i is attached to, and v2e[v2e_o[i]+1] gives you the index of the first element attached to vertex i.
Definition at line 584 of file includeLinks/PatchData.hpp.
References PatchData::vertexArray.
Referenced by MsqMeshEntity::compute_corner_normals(), MeanMidNodeMover::loop_over_mesh(), QualityAssessor::loop_over_mesh(), and PatchData::update_cached_normals().
|
friend |
Definition at line 441 of file includeLinks/PatchData.hpp.
|
friend |
Display the coordinates and connectivity information.
|
friend |
Display the coordinates and connectivity information.
|
private |
Definition at line 459 of file includeLinks/PatchData.hpp.
Referenced by PatchData::get_average_Lambda_3d(), PatchData::get_barrier_delta(), PatchData::get_minmax_element_unsigned_area(), and Mesquite::operator<<().
|
private |
Definition at line 445 of file includeLinks/PatchData.hpp.
Referenced by PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::initialize_data(), PatchData::reorder(), PatchData::snap_vertex_to_domain(), and PatchData::update_cached_normals().
|
private |
Definition at line 444 of file includeLinks/PatchData.hpp.
Referenced by PatchData::domain_set(), MeshSet::get_next_patch(), Mesquite::operator<<(), and PatchData::set_mesh_set().
|
private |
Definition at line 452 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::generate_vertex_to_element_data(), PatchData::get_connectivity_array(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::get_subpatch(), and PatchData::initialize_data().
|
private |
Definition at line 450 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::element_by_index(), PatchData::generate_vertex_to_element_data(), PatchData::get_average_Lambda_3d(), PatchData::get_barrier_delta(), PatchData::get_domain_normal_at_element(), PatchData::get_domain_normals_at_corners(), PatchData::get_element_array(), PatchData::get_element_index(), PatchData::get_minmax_element_unsigned_area(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::get_subpatch(), PatchData::initialize_data(), PatchData::num_corners(), PatchData::num_elements(), Mesquite::operator<<(), PatchData::reorder(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().
|
private |
Definition at line 451 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::get_domain_normal_at_element(), PatchData::get_domain_normals_at_corners(), PatchData::get_element_handles_array(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::get_subpatch(), PatchData::reorder(), and PatchData::update_cached_normals().
|
private |
Definition at line 460 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear(), PatchData::clear_computed_info(), PatchData::have_computed_info(), PatchData::note_have_info(), and Mesquite::operator<<().
|
private |
Definition at line 443 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear(), PatchData::get_domain_normal_at_element(), PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), PatchData::get_mesh_set(), MeshSet::get_next_patch(), Mesquite::operator<<(), PatchData::set_mesh_set(), PatchData::snap_vertex_to_domain(), PatchData::update_cached_normals(), and PatchData::update_mesh().
|
private |
Definition at line 446 of file includeLinks/PatchData.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), Mesquite::operator<<(), and PatchData::type().
|
private |
Definition at line 456 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::initialize_data(), and PatchData::num_vertices().
CornerTag< TargetMatrix > targetMatrices |
Target matrix data.
Definition at line 427 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear_tag_data(), TargetCalculator::compute_default_target_matrices(), RI_DFT::compute_element_analytical_gradient(), I_DFT::compute_element_analytical_gradient(), RI_DFT::compute_element_analytical_hessian(), I_DFT::compute_element_analytical_hessian(), TargetCalculator::compute_reference_corner_matrices(), DistanceFromTarget::compute_T_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), TargetCalculator::compute_target_matrices_and_check_det(), RI_DFT::evaluate_element(), and I_DFT::evaluate_element().
|
private |
Definition at line 453 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear(), PatchData::generate_vertex_to_element_data(), PatchData::get_vertex_element_adjacencies(), PatchData::initialize_data(), Mesquite::operator<<(), and PatchData::reorder().
|
private |
Definition at line 454 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear(), PatchData::generate_vertex_to_element_data(), PatchData::get_vertex_element_adjacencies(), PatchData::initialize_data(), Mesquite::operator<<(), and PatchData::reorder().
|
private |
Definition at line 448 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::create_vertices_memento(), PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), PatchData::get_max_vertex_movement_squared(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::get_subpatch(), PatchData::get_vertex_array(), PatchData::get_vertex_index(), PatchData::move_free_vertices_constrained(), PatchData::num_free_nodes(), PatchData::num_free_vertices(), PatchData::num_nodes(), Mesquite::operator<<(), PatchData::recreate_vertices_memento(), PatchData::reorder(), PatchData::set_all_vertices_soft_fixed(), PatchData::set_all_vertices_soft_free(), PatchData::set_free_vertices_constrained(), PatchData::set_free_vertices_soft_fixed(), PatchData::set_to_vertices_memento(), PatchData::set_vertex_coordinates(), PatchData::snap_vertex_to_domain(), PatchData::update_cached_normals(), MeshSet::update_mesh(), PatchData::vertex_by_index(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().
|
private |
Definition at line 449 of file includeLinks/PatchData.hpp.
Referenced by PatchData::allocate_storage(), PatchData::clear(), PatchData::get_domain_normal_at_vertex(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchData::get_subpatch(), PatchData::initialize_data(), PatchData::reorder(), PatchData::snap_vertex_to_domain(), PatchData::update_cached_normals(), and MeshSet::update_mesh().
|
private |
Definition at line 455 of file includeLinks/PatchData.hpp.
Referenced by PatchData::clear(), PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), PatchData::initialize_data(), PatchData::reorder(), PatchData::snap_vertex_to_domain(), and PatchData::update_cached_normals().