mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix deprecaed in clusters
This commit is contained in:
parent
712f6d4c87
commit
f082d89326
@ -85,29 +85,31 @@ namespace netgen
|
|||||||
(mesh.VolumeElements().Range(),
|
(mesh.VolumeElements().Range(),
|
||||||
[&] (auto myrange)
|
[&] (auto myrange)
|
||||||
{
|
{
|
||||||
NgArray<int> nnums, ednums, fanums;
|
NgArray<int> nnums; // , ednums, fanums;
|
||||||
for (int i_ : myrange)
|
for (int i_ : myrange)
|
||||||
{
|
{
|
||||||
int i = i_+1;
|
int i = i_+1;
|
||||||
const Element & el = mesh.VolumeElement(i);
|
const Element & el = mesh.VolumeElement(i);
|
||||||
ELEMENT_TYPE typ = el.GetType();
|
ELEMENT_TYPE typ = el.GetType();
|
||||||
|
|
||||||
top.GetElementEdges (i, ednums);
|
// top.GetElementEdges (i, ednums);
|
||||||
top.GetElementFaces (i, fanums);
|
auto ednums = top.GetEdges (ElementIndex(i_));
|
||||||
|
// top.GetElementFaces (i, fanums);
|
||||||
|
auto fanums = top.GetFaces (ElementIndex(i_));
|
||||||
|
|
||||||
int elnv = top.GetNVertices (typ);
|
int elnv = top.GetNVertices (typ);
|
||||||
int elned = ednums.Size();
|
int elned = ednums.Size();
|
||||||
int elnfa = fanums.Size();
|
int elnfa = fanums.Size();
|
||||||
|
|
||||||
nnums.SetSize(elnv+elned+elnfa+1);
|
nnums.SetSize(elnv+elned+elnfa+1);
|
||||||
for (int j = 1; j <= elnv; j++)
|
for (int j = 0; j < elnv; j++)
|
||||||
nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE;
|
nnums[j] = el[j]+1-PointIndex::BASE;
|
||||||
for (int j = 1; j <= elned; j++)
|
for (int j = 0; j < elned; j++)
|
||||||
nnums.Elem(elnv+j) = nv+ednums.Elem(j);
|
nnums[elnv+j] = nv+ednums[j]+1;
|
||||||
for (int j = 1; j <= elnfa; j++)
|
for (int j = 0; j < elnfa; j++)
|
||||||
nnums.Elem(elnv+elned+j) = nv+ned+fanums.Elem(j);
|
nnums[elnv+elned+j] = nv+ned+fanums[j]+1;
|
||||||
nnums.Elem(elnv+elned+elnfa+1) = nv+ned+nfa+i;
|
nnums[elnv+elned+elnfa] = nv+ned+nfa+i;
|
||||||
|
|
||||||
for (int j = 0; j < nnums.Size(); j++)
|
for (int j = 0; j < nnums.Size(); j++)
|
||||||
cluster_reps.Elem(nnums[j]) = nnums[j];
|
cluster_reps.Elem(nnums[j]) = nnums[j];
|
||||||
}
|
}
|
||||||
@ -142,25 +144,28 @@ namespace netgen
|
|||||||
(mesh.SurfaceElements().Range(),
|
(mesh.SurfaceElements().Range(),
|
||||||
[&] (auto myrange)
|
[&] (auto myrange)
|
||||||
{
|
{
|
||||||
NgArrayMem<int,9> nnums, ednums;
|
NgArrayMem<int,9> nnums; // , ednums;
|
||||||
for (int i_ : myrange)
|
for (int i_ : myrange)
|
||||||
{
|
{
|
||||||
int i = i_+1;
|
int i = i_+1;
|
||||||
const Element2d & el = mesh.SurfaceElement(i);
|
const Element2d & el = mesh.SurfaceElement(i);
|
||||||
ELEMENT_TYPE typ = el.GetType();
|
ELEMENT_TYPE typ = el.GetType();
|
||||||
|
|
||||||
top.GetSurfaceElementEdges (i, ednums);
|
// top.GetSurfaceElementEdges (i, ednums);
|
||||||
|
auto ednums = top.GetEdges (SurfaceElementIndex(i_));
|
||||||
|
// cout << "ednums = " << ednums << endl;
|
||||||
|
|
||||||
int fanum = top.GetSurfaceElementFace (i);
|
int fanum = top.GetSurfaceElementFace (i);
|
||||||
|
|
||||||
int elnv = top.GetNVertices (typ);
|
int elnv = top.GetNVertices (typ);
|
||||||
int elned = ednums.Size();
|
int elned = ednums.Size();
|
||||||
|
|
||||||
nnums.SetSize(elnv+elned+1);
|
nnums.SetSize(elnv+elned+1);
|
||||||
for (int j = 1; j <= elnv; j++)
|
for (int j = 0; j < elnv; j++)
|
||||||
nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE;
|
nnums[j] = el[j]+1-PointIndex::BASE;
|
||||||
for (int j = 1; j <= elned; j++)
|
for (int j = 0; j < elned; j++)
|
||||||
nnums.Elem(elnv+j) = nv+ednums.Elem(j);
|
nnums[elnv+j] = nv+ednums[j]+1;
|
||||||
nnums.Elem(elnv+elned+1) = fanum;
|
nnums[elnv+elned] = fanum;
|
||||||
|
|
||||||
for (int j = 0; j < nnums.Size(); j++)
|
for (int j = 0; j < nnums.Size(); j++)
|
||||||
cluster_reps.Elem(nnums[j]) = nnums[j];
|
cluster_reps.Elem(nnums[j]) = nnums[j];
|
||||||
@ -270,23 +275,24 @@ namespace netgen
|
|||||||
|
|
||||||
if (clustertab)
|
if (clustertab)
|
||||||
{
|
{
|
||||||
top.GetElementEdges (i, ednums);
|
// top.GetElementEdges (i, ednums);
|
||||||
top.GetElementFaces (i, fanums);
|
// top.GetElementFaces (i, fanums);
|
||||||
|
auto ednums = top.GetEdges (ElementIndex(i-1));
|
||||||
|
auto fanums = top.GetFaces (ElementIndex(i-1));
|
||||||
|
|
||||||
int elnv = top.GetNVertices (typ);
|
int elnv = top.GetNVertices (typ);
|
||||||
int elned = ednums.Size();
|
int elned = ednums.Size();
|
||||||
int elnfa = fanums.Size();
|
int elnfa = fanums.Size();
|
||||||
|
|
||||||
nnums.SetSize(elnv+elned+elnfa+1);
|
nnums.SetSize(elnv+elned+elnfa+1);
|
||||||
for (int j = 1; j <= elnv; j++)
|
for (int j = 0; j < elnv; j++)
|
||||||
nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE;
|
nnums[j] = el[j]+1-PointIndex::BASE;
|
||||||
for (int j = 1; j <= elned; j++)
|
for (int j = 0; j < elned; j++)
|
||||||
nnums.Elem(elnv+j) = nv+ednums.Elem(j);
|
nnums[elnv+j] = nv+ednums[j]+1;
|
||||||
for (int j = 1; j <= elnfa; j++)
|
for (int j = 0; j < elnfa; j++)
|
||||||
nnums.Elem(elnv+elned+j) = nv+ned+fanums.Elem(j);
|
nnums[elnv+elned+j] = nv+ned+fanums[j]+1;
|
||||||
nnums.Elem(elnv+elned+elnfa+1) = nv+ned+nfa+i;
|
nnums[elnv+elned+elnfa] = nv+ned+nfa+i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int j = 0; j < nnums.Size(); j++)
|
for (int j = 0; j < nnums.Size(); j++)
|
||||||
for (int k = 0; k < j; k++)
|
for (int k = 0; k < j; k++)
|
||||||
|
Loading…
Reference in New Issue
Block a user