mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +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);
|
||||
|
||||
|
||||
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");
|
||||
|
||||
|
@ -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)
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
{ return buildfaces; }
|
||||
|
||||
void Update(TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer);
|
||||
bool NeedsUpdate() const;
|
||||
|
||||
|
||||
int GetNEdges () const { return edge2vert.Size(); }
|
||||
|
Loading…
Reference in New Issue
Block a user