Skip to content
Snippets Groups Projects
Commit f6f2f374 authored by Amaury Johnen's avatar Amaury Johnen
Browse files

cleanup

parent 4a8921d7
No related branches found
No related tags found
No related merge requests found
...@@ -113,8 +113,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) ...@@ -113,8 +113,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
bool drawPView = static_cast<int>(CurvedMeshOptions_Number[4].def); bool drawPView = static_cast<int>(CurvedMeshOptions_Number[4].def);
bool recompute = static_cast<bool>(CurvedMeshOptions_Number[5].def); bool recompute = static_cast<bool>(CurvedMeshOptions_Number[5].def);
int askedDim = static_cast<int>(CurvedMeshOptions_Number[6].def); int askedDim = static_cast<int>(CurvedMeshOptions_Number[6].def);
_numElementToScan = static_cast<int>(CurvedMeshOptions_Number[7].def);
_numElementToScan = static_cast<int>(CurvedMeshOptions_Number[7].def);
_viewOrder = 10; _viewOrder = 10;
_elementToScan = NULL; _elementToScan = NULL;
_hoElement = NULL; _hoElement = NULL;
...@@ -177,21 +177,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v) ...@@ -177,21 +177,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
if (printStatS) _printStatIGE(); if (printStatS) _printStatIGE();
if (printStatI) _printStatICN(); if (printStatI) _printStatICN();
if (_hoElement) { _createPViewElementToScan();
std::map<int, std::vector<double>> dataPVelement;
dataPVelement[_hoElement->getNum()] = _jacElementToScan;
std::stringstream name;
name << "Jacobian elem " << _numElementToScan;
PView *view = new PView(name.str().c_str(), "ElementNodeData",
_m, dataPVelement, 0, 1);
const nodalBasis *fs = BasisFactory::getNodalBasis(_hoElement->getTypeForMSH());
const polynomialBasis *pfs = dynamic_cast<const polynomialBasis*>(fs);
PViewData *viewData = view->getData();
viewData->deleteInterpolationMatrices(_hoElement->getType());
viewData->setInterpolationMatrices(_hoElement->getType(),
pfs->coefficients, pfs->monomials,
pfs->coefficients, pfs->monomials);
}
// Create PView // Create PView
if (drawPView) if (drawPView)
...@@ -373,7 +359,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim) ...@@ -373,7 +359,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim)
if (min < 0 && max < 0) ++cntInverted; if (min < 0 && max < 0) ++cntInverted;
progress.next(); progress.next();
_computeJacobianToScan(el, normals); _computeJacobianToScan(el, entity, normals);
} }
delete normals; delete normals;
} }
...@@ -629,4 +615,24 @@ void GMSH_AnalyseCurvedMeshPlugin::_addElementInEntity(MElement *element, ...@@ -629,4 +615,24 @@ void GMSH_AnalyseCurvedMeshPlugin::_addElementInEntity(MElement *element,
} }
} }
void GMSH_AnalyseCurvedMeshPlugin::_createPViewElementToScan()
{
if (!_hoElement) return;
// Jacobian determinant
std::map<int, std::vector<double>> dataPView;
dataPView[_hoElement->getNum()] = _jacElementToScan;
std::stringstream name;
name << "Jacobian elem " << _numElementToScan;
PView *view = new PView(name.str().c_str(), "ElementNodeData",
_m, dataPView, 0, 1);
const nodalBasis *fs = BasisFactory::getNodalBasis(_hoElement->getTypeForMSH());
const polynomialBasis *pfs = dynamic_cast<const polynomialBasis*>(fs);
PViewData *viewData = view->getData();
viewData->deleteInterpolationMatrices(_hoElement->getType());
viewData->setInterpolationMatrices(_hoElement->getType(),
pfs->coefficients, pfs->monomials,
pfs->coefficients, pfs->monomials);
}
#endif #endif
...@@ -91,6 +91,7 @@ private : ...@@ -91,6 +91,7 @@ private :
void _computeJacobianToScan(MElement*, GEntity*, void _computeJacobianToScan(MElement*, GEntity*,
const fullMatrix<double> *normals); const fullMatrix<double> *normals);
void _addElementInEntity(MElement*, GEntity*); void _addElementInEntity(MElement*, GEntity*);
void _createPViewElementToScan();
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment