37 #include "Vector3D.hpp"
38 #include "MsqDebug.hpp"
40 using namespace Mesquite;
46 if(qm1 == NULL || qm2 == NULL){
47 MSQ_SETERR(err)(
"AddQualityMetric constructor passed NULL pointer.",
56 MSQ_DBGOUT(1) <<
"AddQualityMetric is being used to compose a metric "
57 <<
"that should be minimized\n with a metric that should be "
67 MSQ_SETERR(err)(
"Cannot add a vertex-based QM with an element-based QM.",
85 double metric1, metric2;
90 value = metric1+metric2;
104 double metric1, metric2;
109 value = metric1+metric2;
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
MetricType get_metric_type()
int get_negate_flag()
Returns negateFlag.
Used to hold the error state and return it to the application.
Base class for concrete quality metrics.
bool evaluate_element(PatchData &pd, MsqMeshEntity *element, double &value, MsqError &err)
MsqMeshEntity is the Mesquite object that stores information about the elements in the mesh...
QualityMetric * qualMetric2
AddQualityMetric(QualityMetric *qm1, QualityMetric *qm2, MsqError &err)
invalid function argument passed
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
void set_negate_flag(int neg)
virtual bool evaluate_element(PatchData &, MsqMeshEntity *, double &, MsqError &err)
Evaluate the metric for an element.
virtual bool evaluate_vertex(PatchData &, MsqVertex *, double &, MsqError &err)
Evaluate the metric for a vertex.
object is in an invalid state
void set_metric_type(MetricType t)
This function should be used in the constructor of every concrete quality metric. ...
bool evaluate_vertex(PatchData &pd, MsqVertex *vertex, double &value, MsqError &err)
#define MSQ_DBGOUT(flag)
Check debug flag and return ostream associated with flag.
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
int get_feasible_constraint()
Returns the feasible flag for this metric.
void set_name(msq_std::string st)
Sets the name of this metric.
QualityMetric * qualMetric1