Base class that provides the interface for computing the target corner matrices used in the context based smoothing. More...
#include <TargetCalculator.hpp>
Public Types | |
enum | Lambda_type { REGULAR, AVERAGE, REGULAR, AVERAGE } |
enum | guide_type { Ad, AK, A0, Ar, As, Ab, Ac, Ap, Ae, Af, Ax, Ad, AK, A0, Ar, As, Ab, Ac, Ap, Ae, Af, Ax } |
enum | Lambda_type { REGULAR, AVERAGE, REGULAR, AVERAGE } |
enum | guide_type { Ad, AK, A0, Ar, As, Ab, Ac, Ap, Ae, Af, Ax, Ad, AK, A0, Ar, As, Ab, Ac, Ap, Ae, Af, Ax } |
Public Types inherited from PatchDataUser | |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
Public Member Functions | |
TargetCalculator () | |
virtual | ~TargetCalculator () |
virtual destructor ensures use of polymorphism during destruction More... | |
void | compute_guide_matrices (enum guide_type type, PatchData &ref_pd, size_t elem_ind, Matrix3D A[], int num, MsqError &err) |
Computes the guide corner matrices A for a given element index in the reference patch. More... | |
Matrix3D | compute_V_3D (const Matrix3D &A, MsqError &err) |
Matrix3D | compute_Q_3D (const Matrix3D &A, MsqError &err) |
Matrix3D | compute_Delta_3D (const Matrix3D &A, MsqError &err) |
void | compute_default_target_matrices (PatchData &pd, MsqError &err) |
Compute the default "isotropic" target matrices that are often used in the computation of reference-based target matrices. More... | |
void | compute_reference_corner_matrices (PatchData &pd, MsqError &err) |
Compute the corner matrices for the reference mesh refMesh. More... | |
void | compute_target_matrices_and_check_det (PatchData &pd, MsqError &err) |
This function wraps compute_target_matrices and checks that the determinant of each target is positive. More... | |
void | reset_reference_meshset (MsqError &err) |
Reset the reference mesh so it starts from the first vertex again. More... | |
virtual void | compute_target_matrices (PatchData &pd, MsqError &err)=0 |
This function provides the corner matrices for all elements on the Patch. More... | |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
This is the "run" function of PatchDataUser. It can do anything really. More... | |
virtual msq_std::string | get_name () |
Returns the algorithm name. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
TargetCalculator () | |
virtual | ~TargetCalculator () |
virtual destructor ensures use of polymorphism during destruction More... | |
void | compute_guide_matrices (enum guide_type type, PatchData &ref_pd, size_t elem_ind, Matrix3D A[], int num, MsqError &err) |
Computes the guide corner matrices A for a given element index in the reference patch. More... | |
Matrix3D | compute_V_3D (const Matrix3D &A, MsqError &err) |
Matrix3D | compute_Q_3D (const Matrix3D &A, MsqError &err) |
Matrix3D | compute_Delta_3D (const Matrix3D &A, MsqError &err) |
void | compute_default_target_matrices (PatchData &pd, MsqError &err) |
Compute the default "isotropic" target matrices that are often used in the computation of reference-based target matrices. More... | |
void | compute_reference_corner_matrices (PatchData &pd, MsqError &err) |
Compute the corner matrices for the reference mesh refMesh. More... | |
void | compute_target_matrices_and_check_det (PatchData &pd, MsqError &err) |
This function wraps compute_target_matrices and checks that the determinant of each target is positive. More... | |
void | reset_reference_meshset (MsqError &err) |
Reset the reference mesh so it starts from the first vertex again. More... | |
virtual void | compute_target_matrices (PatchData &pd, MsqError &err)=0 |
This function provides the corner matrices for all elements on the Patch. More... | |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
This is the "run" function of PatchDataUser. It can do anything really. More... | |
virtual msq_std::string | get_name () |
Returns the algorithm name. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
Public Member Functions inherited from PatchDataUser | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
Static Public Member Functions | |
static void | initialize_default_target_matrices (Matrix3D &tri_M3D, Matrix3D &quad_M3D, Matrix3D &tet_M3D, Matrix3D &hex_M3D) |
static double | compute_Lambda (const Matrix3D &A, MsqError &err) |
Note that this function is static, i.e. it can be used independently of an object. More... | |
static void | initialize_default_target_matrices (Matrix3D &tri_M3D, Matrix3D &quad_M3D, Matrix3D &tet_M3D, Matrix3D &hex_M3D) |
static double | compute_Lambda (const Matrix3D &A, MsqError &err) |
Protected Attributes | |
MeshSet * | refMesh |
Additional Inherited Members | |
Protected Member Functions inherited from PatchDataUser | |
PatchDataUser () | |
PatchDataUser () | |
Base class that provides the interface for computing the target corner matrices used in the context based smoothing.
To implement a concrete TargetCalculator, one inherits from this class and then overrides the compute_target_matrices function itself to provide corner matrices for all elements in the patch.
Note that an implementation is provided in TargetCalculator::compute_default_target_matrices for default target matrices often used in the computation of more complex, reference-based target matrices.
The target calculator is set on the QualityImprover. At runtime, it associates with each mesh corner (i.e. a corner of an element. Most of the time, one vertex corresponds to many corners.) with a TargetMatrix through an MsqTag mechanism available in the MsqMeshEntity class.
Definition at line 74 of file includeLinks/TargetCalculator.hpp.
enum guide_type |
Enumerator | |
---|---|
Ad |
Default Guide. |
AK |
Conductivity Guide. |
A0 |
Initial Mesh Guide. |
Ar |
Reference Mesh Guide. |
As |
Locally-smoothed IM Guide. |
Ab |
Bounding-box Guide. |
Ac |
Geometric Curvature Guide. |
Ap |
Parametric Guide. |
Ae |
Error Indicator Guide. |
Af |
Flux-based Guide. |
Ax |
Solution Feature-based Guide. |
Ad |
Default Guide. |
AK |
Conductivity Guide. |
A0 |
Initial Mesh Guide. |
Ar |
Reference Mesh Guide. |
As |
Locally-smoothed IM Guide. |
Ab |
Bounding-box Guide. |
Ac |
Geometric Curvature Guide. |
Ap |
Parametric Guide. |
Ae |
Error Indicator Guide. |
Af |
Flux-based Guide. |
Ax |
Solution Feature-based Guide. |
Definition at line 96 of file includeLinks/TargetCalculator.hpp.
enum guide_type |
Enumerator | |
---|---|
Ad |
Default Guide. |
AK |
Conductivity Guide. |
A0 |
Initial Mesh Guide. |
Ar |
Reference Mesh Guide. |
As |
Locally-smoothed IM Guide. |
Ab |
Bounding-box Guide. |
Ac |
Geometric Curvature Guide. |
Ap |
Parametric Guide. |
Ae |
Error Indicator Guide. |
Af |
Flux-based Guide. |
Ax |
Solution Feature-based Guide. |
Ad |
Default Guide. |
AK |
Conductivity Guide. |
A0 |
Initial Mesh Guide. |
Ar |
Reference Mesh Guide. |
As |
Locally-smoothed IM Guide. |
Ab |
Bounding-box Guide. |
Ac |
Geometric Curvature Guide. |
Ap |
Parametric Guide. |
Ae |
Error Indicator Guide. |
Af |
Flux-based Guide. |
Ax |
Solution Feature-based Guide. |
Definition at line 96 of file src/TargetCalculator/TargetCalculator.hpp.
enum Lambda_type |
Definition at line 90 of file src/TargetCalculator/TargetCalculator.hpp.
enum Lambda_type |
Definition at line 90 of file includeLinks/TargetCalculator.hpp.
|
inline |
Definition at line 78 of file includeLinks/TargetCalculator.hpp.
References PatchDataUser::get_all_parameters(), and PatchDataParameters::set_global_patch_type().
|
inlinevirtual |
virtual destructor ensures use of polymorphism during destruction
Definition at line 82 of file includeLinks/TargetCalculator.hpp.
|
inline |
Definition at line 78 of file src/TargetCalculator/TargetCalculator.hpp.
References PatchDataUser::get_all_parameters(), and PatchDataParameters::set_global_patch_type().
|
inlinevirtual |
virtual destructor ensures use of polymorphism during destruction
Definition at line 82 of file src/TargetCalculator/TargetCalculator.hpp.
Compute the default "isotropic" target matrices that are often used in the computation of reference-based target matrices.
The resulting corner matrices are stored in tags on the elements of the PatchData.
Definition at line 81 of file TargetCalculator/TargetCalculator.cpp.
References PatchData::get_element_array(), MsqMeshEntity::get_element_type(), Mesquite::HEXAHEDRON, i, TargetCalculator::initialize_default_target_matrices(), MSQ_ERRRTN, MSQ_FUNCTION_TIMER, MSQ_SETERR, MsqError::NOT_IMPLEMENTED, PatchData::num_elements(), Mesquite::QUADRILATERAL, PatchData::targetMatrices, Mesquite::TETRAHEDRON, and Mesquite::TRIANGLE.
Compute the default "isotropic" target matrices that are often used in the computation of reference-based target matrices.
The resulting corner matrices are stored in tags on the elements of the PatchData.
Definition at line 227 of file includeLinks/TargetCalculator.hpp.
References Mesquite::cbrt(), Matrix3D::column_length(), MsqError::INVALID_STATE, and MSQ_SETERR.
Referenced by LVQDTargetCalculator::compute_target_matrices().
void compute_guide_matrices | ( | enum guide_type | type, |
PatchData & | ref_pd, | ||
size_t | elem_ind, | ||
Matrix3D | A[], | ||
int | num, | ||
MsqError & | err | ||
) |
Computes the guide corner matrices A for a given element index in the reference patch.
void compute_guide_matrices | ( | enum guide_type | type, |
PatchData & | ref_pd, | ||
size_t | elem_ind, | ||
Matrix3D | A[], | ||
int | num, | ||
MsqError & | err | ||
) |
Computes the guide corner matrices A for a given element index in the reference patch.
Definition at line 168 of file TargetCalculator/TargetCalculator.cpp.
References TargetCalculator::A0, TargetCalculator::Ad, TargetCalculator::Ar, MsqMeshEntity::compute_corner_matrices(), PatchData::get_element_array(), MsqMeshEntity::get_element_type(), Mesquite::HEXAHEDRON, i, TargetCalculator::initialize_default_target_matrices(), MSQ_ERRRTN, MSQ_SETERR, MsqError::NOT_IMPLEMENTED, Mesquite::QUADRILATERAL, Mesquite::TETRAHEDRON, Mesquite::TRIANGLE, and MsqMeshEntity::vertex_count().
Referenced by WTargetCalculator::compute_target_matrices(), and LVQDTargetCalculator::compute_target_matrices().
Note that this function is static, i.e. it can be used independently of an object.
Definition at line 183 of file includeLinks/TargetCalculator.hpp.
References Mesquite::cbrt(), and Mesquite::det().
Referenced by LVQDTargetCalculator::compute_target_matrices(), and PatchData::get_average_Lambda_3d().
Definition at line 191 of file includeLinks/TargetCalculator.hpp.
References Mesquite::cbrt(), Matrix3D::column_length(), Mesquite::det(), MsqError::INVALID_STATE, Vector3D::length(), and MSQ_SETERR.
Referenced by LVQDTargetCalculator::compute_target_matrices().
Compute the corner matrices for the reference mesh refMesh.
The refMesh data member is set by the constructors of a concrete TargetCalculator that requires a reference mesh.
Definition at line 137 of file TargetCalculator/TargetCalculator.cpp.
References A, MsqMeshEntity::compute_corner_matrices(), PatchDataUser::get_all_parameters(), PatchData::get_element_array(), MeshSet::get_next_patch(), i, MsqError::INVALID_STATE, MSQ_ERRRTN, MSQ_FUNCTION_TIMER, Mesquite::MSQ_MAX_NUM_VERT_PER_ENT, MSQ_SETERR, PatchData::num_elements(), PatchData::num_vertices(), TargetCalculator::refMesh, and PatchData::targetMatrices.
Compute the corner matrices for the reference mesh refMesh.
The refMesh data member is set by the constructors of a concrete TargetCalculator that requires a reference mesh.
This function provides the corner matrices for all elements on the Patch.
Useful functionality includes: MsqMeshEntity::set_tag, MsqTag::target_matrix, MsqTag::scalar .
Implemented in LVQDTargetCalculator, LVQDTargetCalculator, WTargetCalculator, and WTargetCalculator.
Referenced by TargetCalculator::compute_target_matrices_and_check_det().
This function provides the corner matrices for all elements on the Patch.
Useful functionality includes: MsqMeshEntity::set_tag, MsqTag::target_matrix, MsqTag::scalar .
Implemented in LVQDTargetCalculator, LVQDTargetCalculator, WTargetCalculator, and WTargetCalculator.
This function wraps compute_target_matrices and checks that the determinant of each target is positive.
Definition at line 55 of file TargetCalculator/TargetCalculator.cpp.
References TargetCalculator::compute_target_matrices(), Mesquite::det(), PatchData::get_element_array(), i, MsqError::INVALID_STATE, j, MSQ_ERRRTN, MSQ_FUNCTION_TIMER, MSQ_SETERR, PatchData::num_elements(), PatchData::targetMatrices, and MsqMeshEntity::vertex_count().
Referenced by TargetCalculator::loop_over_mesh().
This function wraps compute_target_matrices and checks that the determinant of each target is positive.
Definition at line 216 of file TargetCalculator/TargetCalculator.cpp.
References Matrix3D::column_length(), MsqError::INVALID_STATE, Vector3D::length(), MSQ_SETERR, and Matrix3D::set_column().
Referenced by LVQDTargetCalculator::compute_target_matrices().
|
virtual |
Return the algorithm type (to avoid RTTI use).
Implements PatchDataUser.
|
virtual |
Return the algorithm type (to avoid RTTI use).
Implements PatchDataUser.
Definition at line 250 of file TargetCalculator/TargetCalculator.cpp.
References PatchDataUser::TARGET_CALCULATOR.
|
virtual |
Returns the algorithm name.
Implements PatchDataUser.
|
virtual |
Returns the algorithm name.
Implements PatchDataUser.
Definition at line 247 of file TargetCalculator/TargetCalculator.cpp.
|
inlinestatic |
Definition at line 153 of file includeLinks/TargetCalculator.hpp.
References Mesquite::MSQ_3RT_2_OVER_6RT_3, Mesquite::MSQ_SQRT_THREE, Mesquite::MSQ_SQRT_TWO, and Mesquite::pow().
Referenced by TargetCalculator::compute_default_target_matrices(), and TargetCalculator::compute_guide_matrices().
|
static |
This is the "run" function of PatchDataUser. It can do anything really.
Implements PatchDataUser.
Definition at line 253 of file TargetCalculator/TargetCalculator.cpp.
References TargetCalculator::compute_target_matrices_and_check_det(), PatchDataUser::get_global_patch(), PatchDataUser::get_patch_type(), PatchData::GLOBAL_PATCH, MsqError::INVALID_STATE, MSQ_CHKERR, and MSQ_SETERR.
This is the "run" function of PatchDataUser. It can do anything really.
Implements PatchDataUser.
void reset_reference_meshset | ( | MsqError & | err | ) |
Reset the reference mesh so it starts from the first vertex again.
Definition at line 47 of file TargetCalculator/TargetCalculator.cpp.
References MSQ_CHKERR, TargetCalculator::refMesh, and MeshSet::reset().
void reset_reference_meshset | ( | MsqError & | err | ) |
Reset the reference mesh so it starts from the first vertex again.
|
protected |
Definition at line 149 of file includeLinks/TargetCalculator.hpp.
Referenced by TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), DeformingDomainGuides841::DeformingDomainGuides841(), DeformingDomainGuides843::DeformingDomainGuides843(), DeformingDomainGuides844::DeformingDomainGuides844(), TargetCalculator::reset_reference_meshset(), RezoneGuides832::RezoneGuides832(), ShapeGuides812::ShapeGuides812(), ShapeSizeGuides821::ShapeSizeGuides821(), ShapeSizeGuides822::ShapeSizeGuides822(), ShapeSizeGuides823::ShapeSizeGuides823(), and ShapeSizeGuides824::ShapeSizeGuides824().