Skip to content
Snippets Groups Projects
Commit aa98966c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

rewrote adaptive post in terms of local adapt() operator

parent 2f1012b0
No related branches found
No related tags found
No related merge requests found
...@@ -182,8 +182,8 @@ meshGFace${OBJEXT}: meshGFace.cpp meshGFace.h meshGFaceBDS.h \ ...@@ -182,8 +182,8 @@ meshGFace${OBJEXT}: meshGFace.cpp meshGFace.h meshGFaceBDS.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \ ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h BDS.h ../Post/PView.h qualityMeasures.h \ ../Numeric/NumericEmbedded.h BDS.h qualityMeasures.h Field.h \
Field.h ../Common/OS.h HighOrder.h ../Post/PView.h ../Common/OS.h HighOrder.h
meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \ meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
...@@ -227,8 +227,8 @@ meshGFaceBDS${OBJEXT}: meshGFaceBDS.cpp meshGFace.h meshGFaceOptimize.h \ ...@@ -227,8 +227,8 @@ meshGFaceBDS${OBJEXT}: meshGFaceBDS.cpp meshGFace.h meshGFaceOptimize.h \
../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h ../Geo/GModel.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h ../Geo/GModel.h \
../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \ ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h ../Post/PView.h \ ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h \
qualityMeasures.h Field.h ../Common/OS.h qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h
meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \ meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \
BackgroundMesh.h meshGFaceDelaunayInsertion.h ../Geo/MElement.h \ BackgroundMesh.h meshGFaceDelaunayInsertion.h ../Geo/MElement.h \
../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \
...@@ -256,18 +256,18 @@ meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \ ...@@ -256,18 +256,18 @@ meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \
../Geo/Pair.h BackgroundMesh.h Generator.h ../Geo/Pair.h BackgroundMesh.h Generator.h
meshGFaceQuadrilateralize${OBJEXT}: meshGFaceQuadrilateralize.cpp \ meshGFaceQuadrilateralize${OBJEXT}: meshGFaceQuadrilateralize.cpp \
meshGFaceQuadrilateralize.h ../Common/GmshMessage.h \ meshGFaceQuadrilateralize.h ../Common/GmshMessage.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Geo/GFace.h \
meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h \
../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \
../Numeric/GmshMatrix.h meshGFaceOptimize.h meshGFaceBDS.h BDS.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
../Geo/Pair.h ../Post/PView.h ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h meshGFaceOptimize.h \
meshGFaceBDS.h BDS.h
meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \ meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \
meshGRegionDelaunayInsertion.h ../Geo/MElement.h \ meshGRegionDelaunayInsertion.h ../Geo/MElement.h \
../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \
...@@ -288,8 +288,8 @@ meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \ ...@@ -288,8 +288,8 @@ meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \
../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
../Common/ListUtils.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \ ../Common/ListUtils.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
../Common/SmoothData.h ../Geo/GRegion.h BDS.h ../Post/PView.h \ ../Common/SmoothData.h ../Geo/GRegion.h BDS.h ../Common/Context.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h
meshGRegionDelaunayInsertion${OBJEXT}: meshGRegionDelaunayInsertion.cpp \ meshGRegionDelaunayInsertion${OBJEXT}: meshGRegionDelaunayInsertion.cpp \
../Common/OS.h BackgroundMesh.h meshGRegion.h meshGRegionLocalMeshMod.h \ ../Common/OS.h BackgroundMesh.h meshGRegion.h meshGRegionLocalMeshMod.h \
meshGRegionDelaunayInsertion.h ../Geo/MElement.h \ meshGRegionDelaunayInsertion.h ../Geo/MElement.h \
...@@ -374,17 +374,12 @@ BackgroundMesh${OBJEXT}: BackgroundMesh.cpp ../Common/GmshMessage.h \ ...@@ -374,17 +374,12 @@ BackgroundMesh${OBJEXT}: BackgroundMesh.cpp ../Common/GmshMessage.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h Field.h ../Post/PView.h ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h
qualityMeasures${OBJEXT}: qualityMeasures.cpp qualityMeasures.h BDS.h \ qualityMeasures${OBJEXT}: qualityMeasures.cpp qualityMeasures.h BDS.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Common/GmshMessage.h ../Geo/MVertex.h ../Geo/SPoint2.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SPoint3.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Numeric.h \
../Geo/SVector3.h ../Geo/Pair.h ../Post/PView.h ../Common/GmshMessage.h \ ../Numeric/NumericEmbedded.h
../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MElement.h \
../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h
BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \ BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
...@@ -400,12 +395,12 @@ BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ...@@ -400,12 +395,12 @@ BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \
../Numeric/GmshMatrix.h BoundaryLayers.h ../Geo/ExtrudeParams.h \ ../Numeric/GmshMatrix.h BoundaryLayers.h ../Geo/ExtrudeParams.h \
../Common/SmoothData.h meshGEdge.h meshGFace.h ../Common/SmoothData.h meshGEdge.h meshGFace.h
BDS${OBJEXT}: BDS.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h \ BDS${OBJEXT}: BDS.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Common/GmshMessage.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \
../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \
../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
../Geo/SVector3.h ../Geo/Pair.h ../Post/PView.h ../Common/GmshMessage.h \ ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \ meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
......
...@@ -216,13 +216,7 @@ ExtractEdges${OBJEXT}: ExtractEdges.cpp ExtractEdges.h Plugin.h \ ...@@ -216,13 +216,7 @@ ExtractEdges${OBJEXT}: ExtractEdges.cpp ExtractEdges.h Plugin.h \
../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Mesh/BDS.h \ ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Mesh/BDS.h
../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/GEntity.h \
../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h \
../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h
MakeSimplex${OBJEXT}: MakeSimplex.cpp MakeSimplex.h Plugin.h ../Common/Options.h \ MakeSimplex${OBJEXT}: MakeSimplex.cpp MakeSimplex.h Plugin.h ../Common/Options.h \
../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
......
This diff is collapsed.
...@@ -260,39 +260,46 @@ class adaptiveHexahedron { ...@@ -260,39 +260,46 @@ class adaptiveHexahedron {
static void recurError(adaptiveHexahedron *h, double AVG, double tol); static void recurError(adaptiveHexahedron *h, double AVG, double tol);
}; };
class PCoords {
public:
double c[3];
PCoords(double x, double y, double z)
{
c[0] = x; c[1] = y; c[2] = z;
}
};
class PValues{
public:
double v[3];
PValues(double vx)
{
v[0] = vx;
}
PValues(double vx, double vy, double vz)
{
v[0] = vx; v[1] = vy; v[2] = vz;
}
};
template <class T> template <class T>
class adaptiveElements { class adaptiveElements {
private: private:
int _level; Double_Matrix *_coeffsVal, *_eexpsVal, *_interpolVal;
double _tol, _minVal, _maxVal; Double_Matrix *_coeffsGeom, *_eexpsGeom, *_interpolGeom;
List_T *_listEle;
int *_numEle;
Double_Matrix *_coeffs, *_eexps;
Double_Matrix *_coeffsGeom, *_eexpsGeom;
Double_Matrix *_posX, *_posY, *_posZ;
Double_Matrix *_val, *_valX, *_valY, *_valZ;
Double_Matrix *_interpolate, *_geometry;
void _changeResolution(int level, GMSH_Post_Plugin *plug, int *done);
int _zoomElement(int ielem, int level, GMSH_Post_Plugin *plug);
public: public:
adaptiveElements(List_T *listEle, int *numEle, adaptiveElements(Double_Matrix *coeffsVal, Double_Matrix *eexpsVal,
Double_Matrix *coeffs, Double_Matrix *eexps,
Double_Matrix *coeffsGeom=0, Double_Matrix *eexpsGeom=0) Double_Matrix *coeffsGeom=0, Double_Matrix *eexpsGeom=0)
: _level(-1), _tol(-1.), _minVal(0.), _maxVal(0.), : _coeffsVal(coeffsVal), _eexpsVal(eexpsVal), _interpolVal(0),
_listEle(listEle), _numEle(numEle), _coeffs(coeffs), _eexps(eexps), _coeffsGeom(coeffsGeom), _eexpsGeom(eexpsGeom), _interpolGeom(0) {}
_coeffsGeom(coeffsGeom), _eexpsGeom(eexpsGeom), _posX(0), _posY(0), _posZ(0),
_val(0), _valX(0), _valY(0), _valZ(0), _interpolate(0), _geometry(0){}
~adaptiveElements(); ~adaptiveElements();
// store data's step-th timestep data into _val and _pos arrays void init(int level);
// (This makes adaptive views even more memory hungry than what they void adapt(double tol, int numComp,
// already are due to their discontinous nature. We should evaluate std::vector<PCoords> &coords, std::vector<PValues> &values,
// the performance hit incurred if we loop directly in data in double &minVal, double &maxVal, GMSH_Post_Plugin *plug=0,
// _zoomElement instead) bool onlyComputeMinMax=false);
void initData(PViewData *data, int step); void addInView(double tol, int step, PViewData *in, PViewDataList *out,
// compute the adaptive representation and store it in _listEle GMSH_Post_Plugin *plug=0);
void changeResolution(int level, double tol, GMSH_Post_Plugin *plug=0);
// The number of nodes is supposed to be fixed in an adaptive view
inline int getNumNodes () const { return _coeffsGeom ? _coeffsGeom->size1() : T::numNodes; }
}; };
class adaptiveData { class adaptiveData {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment