mesh 情報へのアクセス
Post date: 2017/11/23 5:21:46
freefemdoc.pdf 5.1.5 Mesh Connectivity より
freefemdoc.pdf 5.1.5 Mesh Connectivity より
Triangle (Th[i] returns i-th triangle of Th)
mesh Th=...;
fespace Vh(Th,P1);
Vh u;
for (int i=0; i < Th.nt; i ++) {
for (int j=0; j < 3; j ++) {
Th[i][j] // vertex number
Th[i][j].x, Th[i][j].y // position
The[i][j].label // label
u[][Vh(i,j)] // data
}
}
Vertex (Th(i) returns i-th vertex of Th)
mesh Th=...;
fespace Vh(Th,P1); // IMPORTANT : only for P1-elements
Vh u;
for (int i=0; i < Th.nv; i ++) {
Th(i).x, Th(i).y // position
Th(i).label // label
u[][i] // data (only for P1-elements)
}
Ref. A.5 Meshes