mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
curved elements: parallel and 2d
This commit is contained in:
parent
8a450b506b
commit
5733e491fe
@ -450,18 +450,20 @@ namespace netgen
|
||||
Array<int> master_edgeorder;
|
||||
Array<int> master_edgecoeffsindex;
|
||||
Array<Vec<3> > master_edgecoeffs;
|
||||
Array<int> master_faceorder;
|
||||
Array<int> master_facecoeffsindex;
|
||||
Array<Vec<3> > master_facecoeffs;
|
||||
|
||||
MyMPI_Bcast (master_edgeorder, 0);
|
||||
MyMPI_Bcast (master_edgecoeffsindex, 0);
|
||||
MyMPI_Bcast (master_edgecoeffs, 0);
|
||||
|
||||
Array<int> master_faceorder;
|
||||
Array<int> master_facecoeffsindex;
|
||||
Array<Vec<3> > master_facecoeffs;
|
||||
|
||||
MyMPI_Bcast (master_faceorder, 0);
|
||||
MyMPI_Bcast (master_facecoeffsindex, 0);
|
||||
MyMPI_Bcast (master_facecoeffs, 0);
|
||||
|
||||
if (mesh.GetDimension() == 3)
|
||||
{
|
||||
MyMPI_Bcast (master_faceorder, 0);
|
||||
MyMPI_Bcast (master_facecoeffsindex, 0);
|
||||
MyMPI_Bcast (master_facecoeffs, 0);
|
||||
}
|
||||
|
||||
|
||||
const MeshTopology & top = mesh.GetTopology();
|
||||
@ -487,33 +489,36 @@ namespace netgen
|
||||
edgecoeffs[edgecoeffsindex[i]+j] = master_edgecoeffs[master_edgecoeffsindex[glob-1]+j];
|
||||
}
|
||||
|
||||
faceorder.SetSize (top.GetNFaces());
|
||||
facecoeffsindex.SetSize (top.GetNFaces()+1);
|
||||
facecoeffsindex[0] = 0;
|
||||
for (int i = 0; i < top.GetNFaces(); i++)
|
||||
if (mesh.GetDimension() == 3)
|
||||
{
|
||||
int glob = partop.GetDistantFaceNum (0, i+1);
|
||||
faceorder[i] = master_faceorder[glob-1];
|
||||
int ncoefs = master_facecoeffsindex[glob]-master_facecoeffsindex[glob-1];
|
||||
facecoeffsindex[i+1] = facecoeffsindex[i] + ncoefs;
|
||||
faceorder.SetSize (top.GetNFaces());
|
||||
facecoeffsindex.SetSize (top.GetNFaces()+1);
|
||||
facecoeffsindex[0] = 0;
|
||||
for (int i = 0; i < top.GetNFaces(); i++)
|
||||
{
|
||||
int glob = partop.GetDistantFaceNum (0, i+1);
|
||||
faceorder[i] = master_faceorder[glob-1];
|
||||
int ncoefs = master_facecoeffsindex[glob]-master_facecoeffsindex[glob-1];
|
||||
facecoeffsindex[i+1] = facecoeffsindex[i] + ncoefs;
|
||||
}
|
||||
facecoeffs.SetSize (facecoeffsindex[top.GetNFaces()]);
|
||||
|
||||
for (int i = 0; i < top.GetNFaces(); i++)
|
||||
{
|
||||
int glob = partop.GetDistantFaceNum (0, i+1);
|
||||
int ncoefs = master_facecoeffsindex[glob]-master_facecoeffsindex[glob-1];
|
||||
for (int j = 0; j < ncoefs; j++)
|
||||
facecoeffs[facecoeffsindex[i]+j] = master_facecoeffs[master_facecoeffsindex[glob-1]+j];
|
||||
}
|
||||
}
|
||||
facecoeffs.SetSize (facecoeffsindex[top.GetNFaces()]);
|
||||
|
||||
for (int i = 0; i < top.GetNFaces(); i++)
|
||||
else
|
||||
{
|
||||
int glob = partop.GetDistantFaceNum (0, i+1);
|
||||
int ncoefs = master_facecoeffsindex[glob]-master_facecoeffsindex[glob-1];
|
||||
for (int j = 0; j < ncoefs; j++)
|
||||
facecoeffs[facecoeffsindex[i]+j] = master_facecoeffs[master_facecoeffsindex[glob-1]+j];
|
||||
faceorder.SetSize (top.GetNFaces());
|
||||
faceorder = 1;
|
||||
facecoeffsindex.SetSize (top.GetNFaces()+1);
|
||||
facecoeffsindex = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
faceorder.SetSize (top.GetNFaces());
|
||||
faceorder = 1;
|
||||
facecoeffsindex.SetSize (top.GetNFaces()+1);
|
||||
facecoeffsindex = 0;
|
||||
*/
|
||||
|
||||
ishighorder = 1;
|
||||
return;
|
||||
}
|
||||
@ -1040,9 +1045,12 @@ namespace netgen
|
||||
MyMPI_Bcast (edgecoeffsindex, 0);
|
||||
MyMPI_Bcast (edgecoeffs, 0);
|
||||
|
||||
MyMPI_Bcast (faceorder, 0);
|
||||
MyMPI_Bcast (facecoeffsindex, 0);
|
||||
MyMPI_Bcast (facecoeffs, 0);
|
||||
if (mesh.GetDimension() == 3)
|
||||
{
|
||||
MyMPI_Bcast (faceorder, 0);
|
||||
MyMPI_Bcast (facecoeffsindex, 0);
|
||||
MyMPI_Bcast (facecoeffs, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user