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

cleanup high order
parent 988bab49
No related branches found
No related tags found
No related merge requests found
......@@ -163,9 +163,9 @@ Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.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 ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h ../Parser/Parser.h
Trackball.o: Trackball.cpp Trackball.h
VertexArray.o: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \
......
......@@ -113,9 +113,9 @@ GUI_Projection.o: GUI_Projection.cpp ../Geo/GModelIO_Fourier.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.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 ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h ../Graphics/Draw.h ../Common/Options.h \
../Post/ColorTable.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/PartitionOptions.h ../Common/StringUtils.h \
......@@ -136,9 +136,9 @@ GUI_Classifier.o: GUI_Classifier.cpp GUI_Classifier.h ../Common/GmshUI.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.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 ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GUI.h Opengl_Window.h Colorbar_Window.h \
../Post/ColorTable.h Popup_Button.h SpherePosition_Widget.h \
../Mesh/Field.h ../Post/PView.h Shortcut_Window.h ../Numeric/Numeric.h \
......@@ -160,9 +160,9 @@ Callbacks.o: Callbacks.cpp ../Common/GmshUI.h ../Common/GmshMessage.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.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 ../Common/GmshMatrix.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 ../Common/GmshMatrix.h \
../Geo/GeoStringInterface.h ../Geo/findLinks.h ../Mesh/Generator.h \
../Mesh/HighOrder.h ../Graphics/Draw.h ../Graphics/SelectBuffer.h \
../Post/PView.h ../Post/PViewOptions.h ../Post/ColorTable.h \
......@@ -201,9 +201,10 @@ Opengl_Window.o: Opengl_Window.cpp ../Common/GmshUI.h \
../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h GUI.h \
Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
SpherePosition_Widget.h ../Mesh/Field.h ../Post/PView.h \
../Geo/MElement.h ../Geo/MVertex.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 ../Common/GmshMatrix.h
../Geo/MElement.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 \
../Common/GmshMatrix.h
Colorbar_Window.o: Colorbar_Window.cpp ../Common/GmshUI.h GUI.h \
Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
SpherePosition_Widget.h ../Mesh/Field.h ../Post/PView.h \
......
......@@ -6,6 +6,7 @@
#include <string.h>
#include <math.h>
#include "MVertex.h"
#include "GVertex.h"
#include "GEdge.h"
#include "GFace.h"
#include "GFaceCompound.h"
......@@ -228,3 +229,138 @@ void parametricCoordinates(const MVertex *ver, const GFace *gf, double &u, doubl
v = p.y();
}
}
static void getAllParameters(MVertex *v, GFace *gf, std::vector<SPoint2> &params)
{
params.clear();
if(v->onWhat()->dim() == 0){
GVertex *gv = (GVertex*)v->onWhat();
std::list<GEdge*> ed = gv->edges();
bool seam = false;
for(std::list<GEdge*>::iterator it = ed.begin(); it != ed.end(); it++){
if((*it)->isSeam(gf)) {
Range<double> range = (*it)->parBounds(0);
if (gv == (*it)->getBeginVertex()){
params.push_back((*it)->reparamOnFace(gf, range.low(),-1));
params.push_back((*it)->reparamOnFace(gf, range.low(), 1));
}
else if (gv == (*it)->getEndVertex()){
params.push_back((*it)->reparamOnFace(gf, range.high(),-1));
params.push_back((*it)->reparamOnFace(gf, range.high(), 1));
}
else{
Msg::Warning("Strange!");
}
seam = true;
}
}
if (!seam)
params.push_back(gv->reparamOnFace(gf, 1));
}
else if(v->onWhat()->dim() == 1){
GEdge *ge = (GEdge*)v->onWhat();
double UU;
v->getParameter(0, UU);
params.push_back(ge->reparamOnFace(gf, UU, 1));
if(ge->isSeam(gf))
params.push_back(ge->reparamOnFace(gf, UU, -1));
}
else{
double UU, VV;
if(v->onWhat() == gf && v->getParameter(0, UU) && v->getParameter(1, VV))
params.push_back(SPoint2(UU, VV));
}
}
bool reparamMeshVerticesOnFace(MVertex *v1, MVertex *v2, GFace *gf,
SPoint2 &param1, SPoint2 &param2)
{
std::vector<SPoint2> p1, p2;
getAllParameters(v1, gf, p1);
getAllParameters(v2, gf, p2);
if (p1.size() == 1 && p2.size() == 1){
param1 = p1[0];
param2 = p2[0];
return true;
}
else if (p1.size() == 1 && p2.size() == 2){
double d1 = (p1[0].x() - p2[0].x())*(p1[0].x() - p2[0].x())+
(p1[0].x() - p2[0].y())*(p1[0].y() - p2[0].y());
double d2 = (p1[0].x() - p2[1].x())*(p1[0].x() - p2[1].x())+
(p1[0].x() - p2[1].y())*(p1[0].y() - p2[1].y());
param1 = p1[0];
param2 = d2 < d1 ? p2[1] : p2[0];
return true;
}
else if (p2.size() == 1 && p1.size() == 2){
double d1 = (p2[0].x() - p1[0].x())*(p2[0].x() - p1[0].x())+
(p2[0].x() - p1[0].y())*(p2[0].y() - p1[0].y());
double d2 = (p2[0].x() - p1[1].x())*(p2[0].x() - p1[1].x())+
(p2[0].x() - p1[1].y())*(p2[0].y() - p1[1].y());
param1 = d2 < d1 ? p1[1] : p1[0];
param2 = p2[0];
return true;
}
return false;
}
bool reparamMeshVertexOnFace(MVertex *v, GFace *gf, SPoint2 &param)
{
if (gf->geomType() == GEntity::CompoundSurface){
GFaceCompound *gfc = (GFaceCompound*) gf;
param = gfc->getCoordinates(v);
return true;
}
if(v->onWhat()->geomType() == GEntity::DiscreteCurve ||
v->onWhat()->geomType() == GEntity::BoundaryLayerCurve){
param = gf->parFromPoint(SPoint3(v->x(), v->y(), v->z()));
return true;
}
if(v->onWhat()->dim() == 0){
GVertex *gv = (GVertex*)v->onWhat();
// abort if we could be on a seam
std::list<GEdge*> ed = gv->edges();
for(std::list<GEdge*>::iterator it = ed.begin(); it != ed.end(); it++)
if((*it)->isSeam(gf)) return false;
param = gv->reparamOnFace(gf, 1);
}
else if(v->onWhat()->dim() == 1){
GEdge *ge = (GEdge*)v->onWhat();
// abort if we are on a seam (todo: try dir=-1 and compare)
if(ge->isSeam(gf))
return false;
double UU;
v->getParameter(0, UU);
param = ge->reparamOnFace(gf, UU, 1);
}
else{
double UU, VV;
if(v->onWhat() == gf && v->getParameter(0, UU) && v->getParameter(1, VV))
param = SPoint2(UU, VV);
else
return false;
// param = gf->parFromPoint(SPoint3(v->x(), v->y(), v->z()));
}
return true;
}
bool reparamMeshVertexOnEdge(MVertex *v, GEdge *ge, double &param)
{
param = 1.e6;
Range<double> bounds = ge->parBounds(0);
if(ge->getBeginVertex() && ge->getBeginVertex()->mesh_vertices[0] == v)
param = bounds.low();
else if(ge->getEndVertex() && ge->getEndVertex()->mesh_vertices[0] == v)
param = bounds.high();
else
v->getParameter(0, param);
if(param < 1.e6) return true;
return false;
}
......@@ -8,9 +8,11 @@
#include <stdio.h>
#include <set>
#include "SPoint2.h"
#include "SPoint3.h"
class GEntity;
class GEdge;
class GFace;
class MVertex;
......@@ -164,5 +166,9 @@ class MFaceVertex : public MVertex{
};
void parametricCoordinates(const MVertex *ver, const GFace *gf, double &u, double &v);
bool reparamMeshVerticesOnFace(MVertex *v1, MVertex *v2, GFace *gf,
SPoint2 &param1, SPoint2 &param2);
bool reparamMeshVertexOnFace(MVertex *v, GFace *gf, SPoint2 &param);
bool reparamMeshVertexOnEdge(MVertex *v, GEdge *ge, double &param);
#endif
......@@ -105,8 +105,8 @@ GFaceCompound.o: GFaceCompound.cpp GFaceCompound.h GFace.h GEntity.h \
../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.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/Numeric.h \
../Numeric/NumericEmbedded.h ../Common/Octree.h \
../Common/OctreeInternals.h ../Numeric/gmshLinearSystemGmm.h \
......@@ -285,41 +285,41 @@ findLinks.o: findLinks.cpp ../Common/GmshMessage.h GModel.h GVertex.h \
GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/TreeUtils.h \
../Common/avl.h ../Common/ListUtils.h
MVertex.o: MVertex.cpp MVertex.h SPoint3.h GEdge.h GEntity.h Range.h \
SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h GFace.h \
MVertex.o: MVertex.cpp MVertex.h SPoint2.h SPoint3.h GVertex.h GEntity.h \
Range.h SBoundingBox3d.h GPoint.h GEdge.h SVector3.h GFace.h \
GEdgeLoop.h Pair.h GFaceCompound.h ../Common/GmshMessage.h \
../Common/StringUtils.h
GaussQuadratureTri.o: GaussQuadratureTri.cpp MElement.h \
../Common/GmshDefines.h MVertex.h SPoint3.h MEdge.h SVector3.h MFace.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \
SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GaussLegendreSimplex.h
GaussQuadratureQuad.o: GaussQuadratureQuad.cpp MElement.h \
../Common/GmshDefines.h MVertex.h SPoint3.h MEdge.h SVector3.h MFace.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \
SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GaussLegendreSimplex.h \
../Numeric/GaussLegendre1D.h
GaussQuadratureTet.o: GaussQuadratureTet.cpp MElement.h \
../Common/GmshDefines.h MVertex.h SPoint3.h MEdge.h SVector3.h MFace.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \
SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GaussLegendreSimplex.h
GaussQuadratureHex.o: GaussQuadratureHex.cpp MElement.h \
../Common/GmshDefines.h MVertex.h SPoint3.h MEdge.h SVector3.h MFace.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \
SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GaussLegendreSimplex.h \
../Numeric/GaussLegendre1D.h
GaussLegendreSimplex.o: GaussLegendreSimplex.cpp MElement.h \
../Common/GmshDefines.h MVertex.h SPoint3.h MEdge.h SVector3.h MFace.h \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \
SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h GaussLegendreSimplex.h \
../Numeric/GaussLegendre1D.h
MFace.o: MFace.cpp MFace.h MVertex.h SPoint3.h SVector3.h \
MFace.o: MFace.cpp MFace.h MVertex.h SPoint2.h SPoint3.h SVector3.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h \
../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h
MElement.o: MElement.cpp MElement.h ../Common/GmshDefines.h MVertex.h \
SPoint3.h MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \
SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \
../Numeric/FunctionSpace.h ../Common/GmshMatrix.h GEntity.h Range.h \
SBoundingBox3d.h GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h \
SPoint2.h Pair.h ../Common/StringUtils.h ../Numeric/Numeric.h \
SBoundingBox3d.h GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h Pair.h \
../Common/StringUtils.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Numeric/GaussLegendre1D.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \
../Mesh/qualityMeasures.h ../Mesh/meshGFaceDelaunayInsertion.h \
......
......@@ -79,12 +79,13 @@ Mesh.o: Mesh.cpp ../Common/GmshMessage.h ../Common/GmshUI.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.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 ../Common/GmshMatrix.h Draw.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \
../Common/OS.h gl2ps.h ../Common/VertexArray.h ../Common/SmoothData.h \
../Post/PView.h ../Post/PViewData.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 ../Common/GmshMatrix.h \
Draw.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/PartitionOptions.h ../Common/OS.h gl2ps.h \
../Common/VertexArray.h ../Common/SmoothData.h ../Post/PView.h \
../Post/PViewData.h
Geom.o: Geom.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
../Geo/SPoint3.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/PartitionOptions.h gl2ps.h ../Common/VertexArray.h \
......@@ -113,8 +114,8 @@ SelectBuffer.o: SelectBuffer.cpp ../Common/GmshMessage.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.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 ../Common/GmshMatrix.h Draw.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \
SelectBuffer.h ../Common/VertexArray.h
......
This diff is collapsed.
......@@ -7,12 +7,21 @@
#define _HIGH_ORDER_H_
#include "GModel.h"
#include "MFace.h"
// for each pair of vertices (an edge), we build a list of vertices
// that are the high order representation of the edge. The ordering of
// vertices in the list is supposed to be (by construction) consistent
// with the ordering of the pair.
typedef std::map<std::pair<MVertex*, MVertex*>, std::vector<MVertex*> > edgeContainer;
// for each face (a list of vertices) we build a list of vertices that
// are the high order representation of the face
// typedef std::map<std::vector<MVertex*>, std::vector<MVertex*>> faceContainer;
typedef std::map<MFace, std::vector<MVertex*>, Less_Face> faceContainer;
void SetOrder1(GModel *m);
void SetOrderN(GModel *m, int order, bool linear=true, bool incomplete=false);
void checkHighOrderTriangles(GModel *m);
bool reparamOnFace(MVertex *v, GFace *gf, SPoint2 &param);
void Refine(GModel *m, bool linear=true);
#endif
This diff is collapsed.
......@@ -164,13 +164,17 @@ void Subdivide(GRegion *gr)
if(p->getNumVertices() == 14){
// BASE
pyramids2.push_back
(new MPyramid(p->getVertex(0), p->getVertex(5), p->getVertex(13), p->getVertex(6), p->getVertex(7)));
(new MPyramid(p->getVertex(0), p->getVertex(5), p->getVertex(13),
p->getVertex(6), p->getVertex(7)));
pyramids2.push_back
(new MPyramid(p->getVertex(5), p->getVertex(1), p->getVertex(8), p->getVertex(13), p->getVertex(9)));
(new MPyramid(p->getVertex(5), p->getVertex(1), p->getVertex(8),
p->getVertex(13), p->getVertex(9)));
pyramids2.push_back
(new MPyramid(p->getVertex(13), p->getVertex(8), p->getVertex(2), p->getVertex(10), p->getVertex(11)));
(new MPyramid(p->getVertex(13), p->getVertex(8), p->getVertex(2),
p->getVertex(10), p->getVertex(11)));
pyramids2.push_back
(new MPyramid(p->getVertex(6), p->getVertex(13), p->getVertex(10), p->getVertex(3), p->getVertex(12)));
(new MPyramid(p->getVertex(6), p->getVertex(13), p->getVertex(10),
p->getVertex(3), p->getVertex(12)));
// Split remaining into tets
// Top
......@@ -203,30 +207,19 @@ void Subdivide(GRegion *gr)
void Refine(GModel *m, bool linear)
{
// Refine all edges in a mesh by inserting a point on the midpoint
// then recreate edge, face, and region definitions
//
// If linear is set to true, new vertices are created by linear
// interpolation between existing ones. If not, new vertices are
// created on the exact geometry, provided that the geometrical
// edges/faces are discretized with 1D/2D elements. (I.e., if there
// are only 3D elements in the mesh then any new vertices on the
// boundary will always be created by linear interpolation, whether
// linear is set or not.)
Msg::StatusBar(1, true, "Generating refined mesh ...");
double t1 = Cpu();
// first, set order to 2 to generate vertex positions
// Create 2nd order mesh (using "2nd order complete" elements) to
// generate vertex positions
SetOrderN(m, 2, linear, false);
// Now subdivide entities to create linear mesh
// Subdivide the second order elements to create the refined linear
// mesh
for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); ++it)
Subdivide(*it);
for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it)
Subdivide(*it);
for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it)
Subdivide(*it);
......
This diff is collapsed.
......@@ -9,6 +9,7 @@
#include <map>
#include <vector>
#include "SVector3.h"
class MVertex;
class MElement;
class GFace;
......@@ -29,5 +30,4 @@ public:
int getTag() const {return _tag;}
};
#endif
......@@ -389,7 +389,8 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true)
SBoundingBox3d bbox;
while(itv != all_vertices.end()){
MVertex *here = *itv;
SPoint2 param ; reparamOnFace (here,gf,param);;
SPoint2 param;
reparamMeshVertexOnFace(here, gf, param);
U_[count] = param.x();
V_[count] = param.y();
(*itv)->setIndex(count);
......
......@@ -54,8 +54,8 @@ Numeric.o: Numeric.cpp ../Common/GmshMessage.h Numeric.h \
NumericEmbedded.h
NumericEmbedded.o: NumericEmbedded.cpp NumericEmbedded.h \
../Common/GmshMessage.h
gmshAssembler.o: gmshAssembler.cpp ../Geo/MVertex.h ../Geo/SPoint3.h \
gmshAssembler.h gmshLinearSystem.h
gmshAssembler.o: gmshAssembler.cpp ../Geo/MVertex.h ../Geo/SPoint2.h \
../Geo/SPoint3.h gmshAssembler.h gmshLinearSystem.h
gmshTermOfFormulation.o: gmshTermOfFormulation.cpp \
gmshTermOfFormulation.h ../Common/GmshMatrix.h gmshFunction.h \
../Common/Gmsh.h ../Common/GmshMessage.h ../Geo/GModel.h \
......@@ -67,9 +67,10 @@ gmshTermOfFormulation.o: gmshTermOfFormulation.cpp \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.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 gmshLinearSystem.h gmshAssembler.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 gmshLinearSystem.h \
gmshAssembler.h
gmshLaplace.o: gmshLaplace.cpp gmshLaplace.h gmshTermOfFormulation.h \
../Common/GmshMatrix.h ../Common/Gmsh.h ../Common/GmshMessage.h \
../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
......@@ -80,9 +81,9 @@ gmshLaplace.o: gmshLaplace.cpp gmshLaplace.h gmshTermOfFormulation.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.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
../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
gmshElasticity.o: gmshElasticity.cpp gmshElasticity.h \
gmshTermOfFormulation.h ../Common/GmshMatrix.h ../Common/Gmsh.h \
../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \
......@@ -94,9 +95,9 @@ gmshElasticity.o: gmshElasticity.cpp gmshElasticity.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
../Geo/MVertex.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
../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
EigSolve.o: EigSolve.cpp
FunctionSpace.o: FunctionSpace.cpp FunctionSpace.h ../Common/GmshMatrix.h \
../Common/GmshDefines.h ../Common/GmshMessage.h
......
......@@ -170,8 +170,8 @@ Triangulate.o: Triangulate.cpp ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/discreteFace.h ../Geo/GModel.h \
../Geo/GFace.h ../Mesh/DivideAndConquer.h ../Common/GmshMessage.h \
../Geo/MVertex.h ../Geo/SPoint3.h Triangulate.h Plugin.h \
../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \
../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h Triangulate.h \
Plugin.h ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \
../Post/PViewDataList.h ../Post/PViewData.h ../Common/ListUtils.h \
../Common/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/PartitionOptions.h
......
......@@ -98,10 +98,11 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint3.h \
../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
../Geo/MVertex.h ../Geo/SVector3.h ../Common/GmshMessage.h \
../Numeric/FunctionSpace.h ../Common/GmshMatrix.h ../Numeric/Numeric.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 \
../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h
PViewDataGModelIO.o: PViewDataGModelIO.cpp ../Common/GmshMessage.h \
PViewDataGModel.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
......@@ -112,11 +113,11 @@ PViewDataGModelIO.o: PViewDataGModelIO.cpp ../Common/GmshMessage.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/MVertex.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 \
../Common/GmshMatrix.h ../Numeric/Numeric.h \
../Geo/SBoundingBox3d.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 ../Common/GmshMatrix.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Common/StringUtils.h
PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshMessage.h
......@@ -138,8 +139,8 @@ OctreePost.o: OctreePost.cpp ../Common/Octree.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Common/GmshMessage.h shapeFunctions.h \
../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.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 ../Common/GmshMatrix.h
ColorTable.o: ColorTable.cpp ../Common/GmshMessage.h ColorTable.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment