mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-19 00:30:48 +05:00
Corrections for Abaqus surface writing.
This also includes more indentation changes.
This commit is contained in:
parent
4405db8e41
commit
3d7ab32868
@ -141,7 +141,7 @@ void WriteAbaqusSurfaceElements(const Mesh & mesh,
|
|||||||
outfile << el.PNum(2) << ", ";
|
outfile << el.PNum(2) << ", ";
|
||||||
outfile << el.PNum(3) << "\n";
|
outfile << el.PNum(3) << "\n";
|
||||||
}
|
}
|
||||||
else if (non == 10)
|
else if (non == 6)
|
||||||
{
|
{
|
||||||
outfile << el.PNum(1) << ", ";
|
outfile << el.PNum(1) << ", ";
|
||||||
outfile << el.PNum(2) << ", ";
|
outfile << el.PNum(2) << ", ";
|
||||||
|
@ -117,7 +117,11 @@ void STLGeometry :: MakeAtlas(Mesh & mesh, const MeshingParameters& mparam, cons
|
|||||||
size_t markedtrigcnt = 0;
|
size_t markedtrigcnt = 0;
|
||||||
while (markedtrigcnt < GetNT())
|
while (markedtrigcnt < GetNT())
|
||||||
{
|
{
|
||||||
if (multithread.terminate) { PopStatus(); return; }
|
if (multithread.terminate)
|
||||||
|
{
|
||||||
|
PopStatus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// NgProfiler::StartTimer (timerb);
|
// NgProfiler::StartTimer (timerb);
|
||||||
if (workedarea / atlasarea*100. >= nextshow)
|
if (workedarea / atlasarea*100. >= nextshow)
|
||||||
@ -133,12 +137,14 @@ void STLGeometry :: MakeAtlas(Mesh & mesh, const MeshingParameters& mparam, cons
|
|||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (STLTrigId j = lastunmarked; j <= GetNT(); j++)
|
for (STLTrigId j = lastunmarked; j <= GetNT(); j++)
|
||||||
|
{
|
||||||
if (!GetMarker(j))
|
if (!GetMarker(j))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
lastunmarked = j;
|
lastunmarked = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
chartpoints.SetSize(0);
|
chartpoints.SetSize(0);
|
||||||
innerchartpoints.SetSize(0);
|
innerchartpoints.SetSize(0);
|
||||||
@ -321,7 +327,9 @@ void STLGeometry :: MakeAtlas(Mesh & mesh, const MeshingParameters& mparam, cons
|
|||||||
|
|
||||||
innerchartpts.SetSize(innerchartpoints.Size());
|
innerchartpts.SetSize(innerchartpoints.Size());
|
||||||
for (size_t i = 0; i < innerchartpoints.Size(); i++)
|
for (size_t i = 0; i < innerchartpoints.Size(); i++)
|
||||||
|
{
|
||||||
innerchartpts[i] = GetPoint(innerchartpoints[i]);
|
innerchartpts[i] = GetPoint(innerchartpoints[i]);
|
||||||
|
}
|
||||||
|
|
||||||
// NgProfiler::StopTimer (timer2);
|
// NgProfiler::StopTimer (timer2);
|
||||||
// NgProfiler::StartTimer (timer3);
|
// NgProfiler::StartTimer (timer3);
|
||||||
@ -653,11 +661,11 @@ ChartId STLGeometry :: GetChartNr(STLTrigId i) const
|
|||||||
return chartmark[i];
|
return chartmark[i];
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
int STLGeometry :: GetMarker(int i) const
|
int STLGeometry :: GetMarker(int i) const
|
||||||
{
|
{
|
||||||
return chartmark.Get(i);
|
return chartmark.Get(i);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
void STLGeometry :: SetMarker(STLTrigId nr, ChartId m)
|
void STLGeometry :: SetMarker(STLTrigId nr, ChartId m)
|
||||||
{
|
{
|
||||||
chartmark[nr] = m;
|
chartmark[nr] = m;
|
||||||
@ -673,13 +681,13 @@ int STLGeometry :: AtlasMade() const
|
|||||||
//return 1 if not exists
|
//return 1 if not exists
|
||||||
int AddIfNotExists(NgArray<int>& list, int x)
|
int AddIfNotExists(NgArray<int>& list, int x)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i <= list.Size(); i++)
|
for (i = 1; i <= list.Size(); i++)
|
||||||
{
|
{
|
||||||
if (list.Get(i) == x) {return 0;}
|
if (list.Get(i) == x) {return 0;}
|
||||||
}
|
}
|
||||||
list.Append(x);
|
list.Append(x);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -636,9 +636,12 @@ void STLTopology :: FindNeighbourTrigs()
|
|||||||
int ne = GetNTE();
|
int ne = GetNTE();
|
||||||
|
|
||||||
for (int i = 1; i <= nt; i++)
|
for (int i = 1; i <= nt; i++)
|
||||||
|
{
|
||||||
GetTriangle(i).flags.toperror = 0;
|
GetTriangle(i).flags.toperror = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; i <= nt; i++)
|
for (int i = 1; i <= nt; i++)
|
||||||
|
{
|
||||||
for (int j = 1; j <= 3; j++)
|
for (int j = 1; j <= 3; j++)
|
||||||
{
|
{
|
||||||
const STLTopEdge & edge = GetTopEdge (GetTriangle(i).EdgeNum(j));
|
const STLTopEdge & edge = GetTopEdge (GetTriangle(i).EdgeNum(j));
|
||||||
@ -648,6 +651,7 @@ void STLTopology :: FindNeighbourTrigs()
|
|||||||
GetTriangle(i).flags.toperror = 1;
|
GetTriangle(i).flags.toperror = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; i <= ne; i++)
|
for (int i = 1; i <= ne; i++)
|
||||||
{
|
{
|
||||||
@ -669,12 +673,16 @@ void STLTopology :: FindNeighbourTrigs()
|
|||||||
{
|
{
|
||||||
const STLTriangle & nbt = GetTriangle (t.NBTrigNum(j));
|
const STLTriangle & nbt = GetTriangle (t.NBTrigNum(j));
|
||||||
if (!t.IsNeighbourFrom (nbt))
|
if (!t.IsNeighbourFrom (nbt))
|
||||||
|
{
|
||||||
orientation_ok = 0;
|
orientation_ok = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
orientation_ok = 0;
|
orientation_ok = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -835,7 +843,13 @@ void STLTopology :: FindNeighbourTrigs()
|
|||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
for (int ii = 1; ii <= NONeighbourTrigs(i); ii++)
|
for (int ii = 1; ii <= NONeighbourTrigs(i); ii++)
|
||||||
{if (NeighbourTrig(i,ii) == tr) {found = 1;break;};}
|
{
|
||||||
|
if (NeighbourTrig(i,ii) == tr)
|
||||||
|
{
|
||||||
|
found = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (! found) {AddNeighbourTrig(i,tr);}
|
if (! found) {AddNeighbourTrig(i,tr);}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user