mirror of
https://github.com/NGSolve/netgen.git
synced 2025-04-07 13:57:28 +05:00
topology does not build faces/edges befire distributing
This commit is contained in:
parent
10ef58b54b
commit
fc7381e587
@ -80,7 +80,14 @@ namespace netgen
|
|||||||
MyMPI_Bcast(dim, comm);
|
MyMPI_Bcast(dim, comm);
|
||||||
|
|
||||||
|
|
||||||
const_cast<MeshTopology&>(GetTopology()).Update();
|
// If the topology is not already updated, we do not need to
|
||||||
|
// build edges/faces.
|
||||||
|
auto & top = const_cast<MeshTopology&>(GetTopology());
|
||||||
|
if(top.NeedsUpdate()) {
|
||||||
|
top.SetBuildEdges(false);
|
||||||
|
top.SetBuildFaces(false);
|
||||||
|
top.Update();
|
||||||
|
}
|
||||||
|
|
||||||
PrintMessage ( 3, "Sending nr of elements");
|
PrintMessage ( 3, "Sending nr of elements");
|
||||||
|
|
||||||
|
@ -51,6 +51,9 @@ namespace netgen
|
|||||||
|
|
||||||
MeshTopology :: ~MeshTopology () { ; }
|
MeshTopology :: ~MeshTopology () { ; }
|
||||||
|
|
||||||
|
bool MeshTopology :: NeedsUpdate() const
|
||||||
|
{ return (timestamp <= mesh->GetTimeStamp()); }
|
||||||
|
|
||||||
template <typename FUNC>
|
template <typename FUNC>
|
||||||
void LoopOverEdges (const Mesh & mesh, MeshTopology & top, PointIndex v,
|
void LoopOverEdges (const Mesh & mesh, MeshTopology & top, PointIndex v,
|
||||||
FUNC func)
|
FUNC func)
|
||||||
|
@ -84,6 +84,7 @@ public:
|
|||||||
{ return buildfaces; }
|
{ return buildfaces; }
|
||||||
|
|
||||||
void Update(TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer);
|
void Update(TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer);
|
||||||
|
bool NeedsUpdate() const;
|
||||||
|
|
||||||
|
|
||||||
int GetNEdges () const { return edge2vert.Size(); }
|
int GetNEdges () const { return edge2vert.Size(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user