Dear Professor
Thank you for your prompt and informative response.
I will use ParaView more often from now on.
but i am still a little bit confused.
for example on the same mesh, P1 and P2 refer to the points on the left and right side of the box with region=2.
cout << “Region P1 =” << Th(0.0055,-0.0025,0.0005).region <<endl;
cout << “Region P2 =” << Th(0.0095,-0.0025,0.0005).region <<endl;
will result in:
Region P1= 1
Region P2= 2
I thought both of them should be equal to 2
cout << “co P1 =” << co(0.0055,-0.0025,0.0005) <<endl;
cout << “co P2 =” << co(0.0095,-0.0025,0.0005) <<endl;
cout << “pco P1 =” << pco(0.0055,-0.0025,0.0005) <<endl;
cout << “pco P2 =” << pco(0.0095,-0.0025,0.0005) <<endl;
will result in
co P1 =0
co P2 =0
pco P1 =0
pco P2 =1
I can’t understand why pco and co are different although they look to be same when they are visualized with ParaView.
Even when I took a close look at ParaView by plotting the points:
It seems that pco returns different values on the different sides of the box.
The same result was obtained by GMSH.
{
ofstream ff(“graph.pos”);
ff << “View “pots” {” << endl;
for (int i = 0; i < Th.nv; i++)
ff << “SP(” << Th(i).x << “,” << Th(i).y << “,” << Th(i).z << “){” << pco(Th(i).x,Th(i).y,Th(i).z) << “};” << endl;
ff << “};” << endl;
}
gives:
The right side of the box has red dots. equivalent to pco=1
and the left side has pco=0
how can i set pco=1 on all the points belonging to region 2?
seph.rar (218.7 KB)