Skip to content
Snippets Groups Projects
Commit a6b97bfa authored by Thomas Toulorge's avatar Thomas Toulorge
Browse files

Changed detail in mesh optimizer (enumeration of strategies moved from...

Changed detail in mesh optimizer (enumeration of strategies moved from MeshOptParameters to MeshOptPatchDef)
parent eb498899
No related branches found
No related tags found
No related merge requests found
......@@ -718,12 +718,12 @@ HOPatchDefParameters::HOPatchDefParameters(const OptHomParameters &p)
{
jacMin = p.BARRIER_MIN;
jacMax = (p.BARRIER_MAX > 0.) ? p.BARRIER_MAX : 1.e300;
strategy = (p.strategy == 1) ? MeshOptParameters::STRAT_ONEBYONE :
MeshOptParameters::STRAT_CONNECTED;
strategy = (p.strategy == 1) ? MeshOptPatchDef::STRAT_ONEBYONE :
MeshOptPatchDef::STRAT_CONNECTED;
minLayers = (p.dim == 3) ? 1 : 0;
maxLayers = p.nbLayers;
distanceFactor = p.distanceFactor;
if (strategy == MeshOptParameters::STRAT_CONNECTED)
if (strategy == MeshOptPatchDef::STRAT_CONNECTED)
weakMerge = (p.strategy == 2);
else {
maxAdaptPatch = p.maxAdaptBlob;
......
......@@ -41,6 +41,7 @@ class ObjContrib;
class MeshOptPatchDef {
public:
enum { STRAT_CONNECTED, STRAT_ONEBYONE };
int strategy; // Strategy: connected patches or adaptive one-by-one
int minLayers, maxLayers; // Min. and max. nb. of layers around a bad element in patch
union {
......@@ -73,7 +74,6 @@ struct MeshOptPass { // Parameters controllin
struct MeshOptParameters { // Parameters controlling the strategy
enum { STRAT_CONNECTED, STRAT_ONEBYONE };
int dim ; // Which dimension to optimize
bool onlyVisible ; // Apply optimization to visible entities ONLY
bool fixBndNodes; // If points can move on boundaries
......
......@@ -461,9 +461,9 @@ void meshOptimizer(GModel *gm, MeshOptParameters &par)
}
}
if (par.patchDef->strategy == MeshOptParameters::STRAT_CONNECTED)
if (par.patchDef->strategy == MeshOptPatchDef::STRAT_CONNECTED)
optimizeConnectedPatches(vertex2elements, element2entity, badElts, par);
else if (par.patchDef->strategy == MeshOptParameters::STRAT_ONEBYONE)
else if (par.patchDef->strategy == MeshOptPatchDef::STRAT_ONEBYONE)
optimizeOneByOne(vertex2elements, element2entity, badElts, par);
else
Msg::Error("Unknown strategy %d for mesh optimization", par.patchDef->strategy);
......
......@@ -43,12 +43,12 @@ QualPatchDefParameters::QualPatchDefParameters(const MeshQualOptParameters &p)
_excludeBL = p.excludeBL;
_idealJacMin = p.minTargetIdealJac;
_invCondNumMin = p.minTargetInvCondNum;
strategy = (p.strategy == 1) ? MeshOptParameters::STRAT_ONEBYONE :
MeshOptParameters::STRAT_CONNECTED;
strategy = (p.strategy == 1) ? MeshOptPatchDef::STRAT_ONEBYONE :
MeshOptPatchDef::STRAT_CONNECTED;
minLayers = (p.dim == 3) ? 1 : 0;
maxLayers = p.nbLayers;
_distanceFactor = p.distanceFactor;
if (strategy == MeshOptParameters::STRAT_CONNECTED)
if (strategy == MeshOptPatchDef::STRAT_CONNECTED)
weakMerge = (p.strategy == 2);
else {
maxAdaptPatch = p.maxAdaptBlob;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment