fix some deprecated

This commit is contained in:
Joachim Schoeberl 2022-04-29 13:05:38 +02:00
parent db0339a143
commit aa00749f97
2 changed files with 17 additions and 12 deletions

View File

@ -136,7 +136,7 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
}
istream * infile;
NgArray<char> buf; // for distributing geometry!
Array<char> buf; // for distributing geometry!
int strs;
if( id == 0) {
@ -167,7 +167,7 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
strs = geom_part_string.size();
// buf = new char[strs];
buf.SetSize(strs);
memcpy(&buf[0], geom_part_string.c_str(), strs*sizeof(char));
memcpy(buf.Data(), geom_part_string.c_str(), strs*sizeof(char));
delete infile;
}
@ -243,15 +243,18 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
mesh->SendRecvMesh();
}
/*
if(ntasks>1) {
#ifdef PARALLEL
/** Scatter the geometry-string (no dummy-implementation in mpi_interface) **/
// Scatter the geometry-string (no dummy-implementation in mpi_interface)
int strs = buf.Size();
MyMPI_Bcast(strs, comm);
if(strs>0)
MyMPI_Bcast(buf, comm);
#endif
#endif
}
*/
comm.Bcast(buf);
shared_ptr<NetgenGeometry> geo;
if(buf.Size()) { // if we had geom-info in the file, take it

View File

@ -94,13 +94,14 @@ namespace netgen
if(velement!=0)
{
auto & topology = mesh.GetTopology();
NgArray<int> faces;
topology.GetElementFaces(velement,faces);
// NgArray<int> faces;
// topology.GetElementFaces(velement,faces);
auto faces = Array<int> (topology.GetFaces(ElementIndex(velement-1)));
//(*testout) << "faces " << faces << endl;
for(int i=0; i<faces.Size(); i++)
faces[i] = topology.GetFace2SurfaceElement(faces[i]);
faces[i] = topology.GetFace2SurfaceElement(faces[i]+1);
//(*testout) << "surfel " << faces << endl;
@ -6373,12 +6374,13 @@ namespace netgen
auto el = volelements[ei];
map<PointIndex, Array<PointIndex>> mapped_points;
int nmapped = 0;
NgArray<int> eledges;
topology.GetElementEdges(ei+1, eledges);
for(auto edgei : eledges)
// NgArray<int> eledges;
// topology.GetElementEdges(ei+1, eledges);
// for(auto edgei : eledges)
for(auto edgei : topology.GetEdges(ElementIndex(ei)))
{
int p1, p2;
topology.GetEdgeVertices(edgei, p1, p2);
topology.GetEdgeVertices(edgei+1, p1, p2);
auto c1 = inserted_points.count({p1, p2});
auto c2 = inserted_points.count({p2, p1});
if(c1 == 0 && c2 == 0)