mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Merge branch 'mpi_topo' into 'master'
Mpi topo See merge request jschoeberl/netgen!141
This commit is contained in:
commit
f57ad036b5
@ -884,6 +884,9 @@ namespace netgen
|
||||
throw NgException ("mesh file not found");
|
||||
}
|
||||
|
||||
int rank = GetCommunicator().Rank();
|
||||
int ntasks = GetCommunicator().Size();
|
||||
|
||||
char str[100];
|
||||
int i, n;
|
||||
|
||||
|
@ -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