topology does not build faces/edges befire distributing

This commit is contained in:
Lukas 2019-02-28 11:58:22 +01:00
parent 10ef58b54b
commit fc7381e587
3 changed files with 12 additions and 1 deletions

View File

@ -80,7 +80,14 @@ namespace netgen
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");

View File

@ -51,6 +51,9 @@ namespace netgen
MeshTopology :: ~MeshTopology () { ; }
bool MeshTopology :: NeedsUpdate() const
{ return (timestamp <= mesh->GetTimeStamp()); }
template <typename FUNC>
void LoopOverEdges (const Mesh & mesh, MeshTopology & top, PointIndex v,
FUNC func)

View File

@ -84,6 +84,7 @@ public:
{ return buildfaces; }
void Update(TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer);
bool NeedsUpdate() const;
int GetNEdges () const { return edge2vert.Size(); }