mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
mpi distant-procs
This commit is contained in:
parent
8e8e390f2e
commit
906334f224
@ -229,6 +229,9 @@ namespace netgen
|
||||
bool build_searchtrees = false,
|
||||
int * const indices = NULL, int numind = 0) const;
|
||||
|
||||
|
||||
std::tuple<int,int*> GetDistantProcs (int nodetype, int locnum) const;
|
||||
|
||||
shared_ptr<Mesh> SelectMesh () const;
|
||||
};
|
||||
|
||||
|
@ -660,6 +660,31 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::tuple<int,int*> Ngx_Mesh :: GetDistantProcs (int nodetype, int locnum) const
|
||||
{
|
||||
|
||||
switch (nodetype)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
FlatArray<int> dn = mesh->GetParallelTopology().GetDistantPNums(locnum);
|
||||
return std::tuple<int,int*>(dn.Size(), &dn[0]);
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
FlatArray<int> dn = mesh->GetParallelTopology().GetDistantEdgeNums(locnum);
|
||||
return std::tuple<int,int*>(dn.Size(), &dn[0]);
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
FlatArray<int> dn = mesh->GetParallelTopology().GetDistantFaceNums(locnum);
|
||||
return std::tuple<int,int*>(dn.Size(), &dn[0]);
|
||||
}
|
||||
default:
|
||||
return std::tuple<int,int*>(0,nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,5 +34,5 @@ libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
|
||||
libmesh_la_LIBADD = $(top_builddir)/libsrc/linalg/libla.la \
|
||||
$(top_builddir)/libsrc/gprim/libgprim.la \
|
||||
$(top_builddir)/libsrc/general/libgen.la \
|
||||
-lz
|
||||
-lz $(MPI_LIBS)
|
||||
|
||||
|
@ -93,6 +93,10 @@ namespace netgen
|
||||
distedgenums = loc2distedge[locedgenum-1];
|
||||
}
|
||||
|
||||
FlatArray<int> GetDistantPNums (int locnum) const { return loc2distvert[locnum]; }
|
||||
FlatArray<int> GetDistantFaceNums (int locnum) const { return loc2distface[locnum]; }
|
||||
FlatArray<int> GetDistantEdgeNums (int locnum) const { return loc2distedge[locnum]; }
|
||||
|
||||
bool IsExchangeVert (int dest, int vnum) const
|
||||
{
|
||||
return loc2distvert[vnum-1].Contains (dest);
|
||||
|
Loading…
Reference in New Issue
Block a user