mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
clean up
This commit is contained in:
parent
4b26f39974
commit
9f79451fe1
@ -664,14 +664,8 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
|
|
||||||
{
|
{
|
||||||
cout << "IN ClassifyTrig!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
|
||||||
cout << "el.index = " << el.index << endl;
|
|
||||||
cout << "edges = " << edges << endl;
|
|
||||||
cout << "edgepoint_dom = " << edgepoint_dom << endl;
|
|
||||||
cout << "face_edges = " << face_edges << endl;
|
|
||||||
cout << "surf_edges = " << surf_edges << endl;
|
|
||||||
cout << "facepoint = " << facepoint << endl;
|
|
||||||
int pnums[3];
|
int pnums[3];
|
||||||
int p[3];
|
int p[3];
|
||||||
|
|
||||||
@ -692,9 +686,9 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
{
|
{
|
||||||
p[m] = (j+m)%3 +1; // local vertex number
|
p[m] = (j+m)%3 +1; // local vertex number
|
||||||
pnums[m] = el.PNum(p[m]); // global vertex number
|
pnums[m] = el.PNum(p[m]); // global vertex number
|
||||||
cout << pnums[m] << " \t ";
|
// *testout << pnums[m] << " \t ";
|
||||||
}
|
}
|
||||||
cout << endl ;
|
// *testout << endl ;
|
||||||
|
|
||||||
if(dim == 3)
|
if(dim == 3)
|
||||||
{
|
{
|
||||||
@ -768,11 +762,9 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
int ep2=p[eledges[k][1]-1];
|
int ep2=p[eledges[k][1]-1];
|
||||||
|
|
||||||
INDEX_2 i2 = INDEX_2::Sort(el.PNum(ep1),el.PNum(ep2));
|
INDEX_2 i2 = INDEX_2::Sort(el.PNum(ep1),el.PNum(ep2));
|
||||||
cout << "ep1 = " << ep1 << ", ep2 = " << ep2 << endl;
|
|
||||||
|
|
||||||
if(edges.Used(i2))
|
if(edges.Used(i2))
|
||||||
{
|
{
|
||||||
|
|
||||||
if(edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep1-1])) ||
|
if(edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep1-1])) ||
|
||||||
edgepoint_dom.Used(INDEX_2(-1,pnums[ep1-1])) ||
|
edgepoint_dom.Used(INDEX_2(-1,pnums[ep1-1])) ||
|
||||||
edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep2-1])) ||
|
edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep2-1])) ||
|
||||||
@ -793,17 +785,18 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
if(edgepoint.Test(pnums[k]) && (edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[k])) || edgepoint_dom.Used(INDEX_2(-1,pnums[k])))) //edgepoint, but not member of sing_edge on trig -> cp
|
if(edgepoint.Test(pnums[k]) && (edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[k])) || edgepoint_dom.Used(INDEX_2(-1,pnums[k])))) //edgepoint, but not member of sing_edge on trig -> cp
|
||||||
{
|
{
|
||||||
INDEX_2 i2a=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+1)%3]));
|
INDEX_2 i2a=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+1)%3]));
|
||||||
INDEX_2 i2b=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+2)%3]));
|
INDEX_2 i2b=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+2)%3]));
|
||||||
|
|
||||||
if(!edges.Used(i2a) && !edges.Used(i2b))
|
if(!edges.Used(i2a) && !edges.Used(i2b))
|
||||||
point_sing[p[k]-1] = 3;
|
point_sing[p[k]-1] = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int k=0;k<3;k++)
|
for(int k=0;k<3;k++)
|
||||||
if(cornerpoint.Test(el.PNum(p[k])))
|
if(cornerpoint.Test(el.PNum(p[k])))
|
||||||
point_sing[p[k]-1] = 3;
|
point_sing[p[k]-1] = 3;
|
||||||
|
|
||||||
cout << "point_sing = " << point_sing[0] << point_sing[1] << point_sing[2] << endl;
|
*testout << "point_sing = " << point_sing[0] << point_sing[1] << point_sing[2] << endl;
|
||||||
cout << "edge_sing = " << edge_sing[0] << edge_sing[1] << edge_sing[2] << endl;
|
|
||||||
if(edge_sing[0] + edge_sing[1] + edge_sing[2] == 0)
|
if(edge_sing[0] + edge_sing[1] + edge_sing[2] == 0)
|
||||||
{
|
{
|
||||||
int ps = point_sing[0] + point_sing[1] + point_sing[2];
|
int ps = point_sing[0] + point_sing[1] + point_sing[2];
|
||||||
@ -866,7 +859,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
if(type!=HP_NONE) break;
|
if(type!=HP_NONE) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "type = " << type << endl;
|
*testout << "type = " << type << endl;
|
||||||
|
|
||||||
for(int k=0;k<3;k++) el[k] = pnums[k];
|
for(int k=0;k<3;k++) el[k] = pnums[k];
|
||||||
/*if(type != HP_NONE)
|
/*if(type != HP_NONE)
|
||||||
@ -877,7 +870,6 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
cout << " type " << type << endl;
|
cout << " type " << type << endl;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
cout << "End ClassifyTrig!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
return(type);
|
return(type);
|
||||||
}
|
}
|
||||||
#ifdef HPREF_OLD
|
#ifdef HPREF_OLD
|
||||||
|
@ -615,7 +615,6 @@ namespace netgen
|
|||||||
void DoRefinement (Mesh & mesh, NgArray<HPRefElement> & elements,
|
void DoRefinement (Mesh & mesh, NgArray<HPRefElement> & elements,
|
||||||
Refinement * ref, double fac1)
|
Refinement * ref, double fac1)
|
||||||
{
|
{
|
||||||
cout << "IN DOREFINEMENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
elements.SetAllocSize (5 * elements.Size());
|
elements.SetAllocSize (5 * elements.Size());
|
||||||
INDEX_2_HASHTABLE<int> newpts(elements.Size()+1);
|
INDEX_2_HASHTABLE<int> newpts(elements.Size()+1);
|
||||||
INDEX_3_HASHTABLE<int> newfacepts(elements.Size()+1);
|
INDEX_3_HASHTABLE<int> newfacepts(elements.Size()+1);
|
||||||
@ -1304,7 +1303,6 @@ namespace netgen
|
|||||||
|
|
||||||
void HPRefinement (Mesh & mesh, Refinement * ref, int levels, double fac1, bool setorders, bool reflevels)
|
void HPRefinement (Mesh & mesh, Refinement * ref, int levels, double fac1, bool setorders, bool reflevels)
|
||||||
{
|
{
|
||||||
cout << "IN HPRefinement!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
PrintMessage (1, "HP Refinement called, levels = ", levels);
|
PrintMessage (1, "HP Refinement called, levels = ", levels);
|
||||||
|
|
||||||
|
|
||||||
@ -1563,7 +1561,6 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int & levels, int & act_ref)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int & levels, int & act_ref)
|
||||||
{
|
{
|
||||||
cout << "IN CheckSingularities!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
bool sing = 0;
|
bool sing = 0;
|
||||||
if (mesh.GetDimension() == 3)
|
if (mesh.GetDimension() == 3)
|
||||||
{
|
{
|
||||||
@ -1654,8 +1651,8 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
}
|
}
|
||||||
|
|
||||||
edgepoint.Or (cornerpoint);
|
edgepoint.Or (cornerpoint);
|
||||||
cout << "cornerpoint = " << endl << cornerpoint << endl;
|
(*testout) << "cornerpoint = " << endl << cornerpoint << endl;
|
||||||
cout << "edgepoint = " << endl << edgepoint << endl;
|
(*testout) << "edgepoint = " << endl << edgepoint << endl;
|
||||||
|
|
||||||
facepoint = 0;
|
facepoint = 0;
|
||||||
for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++)
|
for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++)
|
||||||
@ -1730,9 +1727,9 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
edges.Set(i2,1);
|
edges.Set(i2,1);
|
||||||
edgepoint.Set(i2.I1());
|
edgepoint.Set(i2.I1());
|
||||||
edgepoint.Set(i2.I2());
|
edgepoint.Set(i2.I2());
|
||||||
cout << " singleft " << endl;
|
*testout << " singleft " << endl;
|
||||||
cout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl;
|
*testout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl;
|
||||||
cout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl;
|
*testout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl;
|
||||||
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I1()), 1);
|
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I1()), 1);
|
||||||
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I2()), 1);
|
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I2()), 1);
|
||||||
sing = 1;
|
sing = 1;
|
||||||
@ -1747,9 +1744,9 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
edgepoint.Set(i2.I1());
|
edgepoint.Set(i2.I1());
|
||||||
edgepoint.Set(i2.I2());
|
edgepoint.Set(i2.I2());
|
||||||
|
|
||||||
cout << " singright " << endl;
|
*testout << " singright " << endl;
|
||||||
cout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl;
|
*testout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl;
|
||||||
cout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl;
|
*testout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl;
|
||||||
|
|
||||||
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I1()), 1);
|
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I1()), 1);
|
||||||
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I2()), 1);
|
edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I2()), 1);
|
||||||
@ -1797,8 +1794,8 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
|
|
||||||
edgepoint.Or (cornerpoint);
|
edgepoint.Or (cornerpoint);
|
||||||
|
|
||||||
cout << "2d sing edges: " << endl << edges << endl;
|
(*testout) << "2d sing edges: " << endl << edges << endl;
|
||||||
cout << "2d cornerpoints: " << endl << cornerpoint << endl
|
(*testout) << "2d cornerpoints: " << endl << cornerpoint << endl
|
||||||
<< "2d edgepoints: " << endl << edgepoint << endl;
|
<< "2d edgepoints: " << endl << edgepoint << endl;
|
||||||
|
|
||||||
facepoint = 0;
|
facepoint = 0;
|
||||||
@ -1807,8 +1804,6 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
if (!sing)
|
if (!sing)
|
||||||
cout << "PrepareElements no more to do for actual refinement " << act_ref << endl;
|
cout << "PrepareElements no more to do for actual refinement " << act_ref << endl;
|
||||||
|
|
||||||
cout << "End CheckSingularities!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
|
|
||||||
return(sing);
|
return(sing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1816,7 +1811,6 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
|
|
||||||
bool ClassifyHPElements (Mesh & mesh, NgArray<HPRefElement> & elements, int & act_ref, int & levels)
|
bool ClassifyHPElements (Mesh & mesh, NgArray<HPRefElement> & elements, int & act_ref, int & levels)
|
||||||
{
|
{
|
||||||
cout << "IN ClassifyHPElements!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
INDEX_2_HASHTABLE<int> edges(mesh.GetNSeg()+1);
|
INDEX_2_HASHTABLE<int> edges(mesh.GetNSeg()+1);
|
||||||
NgBitArray edgepoint(mesh.GetNP());
|
NgBitArray edgepoint(mesh.GetNP());
|
||||||
INDEX_2_HASHTABLE<int> edgepoint_dom(mesh.GetNSeg()+1);
|
INDEX_2_HASHTABLE<int> edgepoint_dom(mesh.GetNSeg()+1);
|
||||||
@ -1962,7 +1956,6 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
if (misses[i])
|
if (misses[i])
|
||||||
cout << " in update classification missing case " << i << " occurred " << misses[i] << " times" << endl;
|
cout << " in update classification missing case " << i << " occurred " << misses[i] << " times" << endl;
|
||||||
|
|
||||||
cout << "end ClassifyHPElements!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
|
|
||||||
return(sing);
|
return(sing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user