Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@7of9

MATLAB > tetmesh > tet: mesh, X: element > X:座標情報, tet: 四角形の座標インデックス?

More than 3 years have passed since last update.
動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)

関連

MATLAB > load tetmesh > tetとX > nodeとelement

tet:meshとX:element

>> load tetmesh
>> size(tet),size(X)

ans =

        4969           4


ans =

        1456           3

以下と関係あるだろうか。
https://jp.mathworks.com/help/pde/ug/femesh-properties.html

Nodes is a D-by-Nn matrix, where D is the number of geometry dimensions (2 or 3), and Nn is the number of nodes in the mesh. Each column of Nodes contains the x, y, and in 3-D, z coordinates for that mesh node.

Mesh elements, returned as an M-by-Ne matrix, where Ne is the number of elements in the mesh, and M is:
...
Each column in Elements contains the indices of the nodes for that mesh element.

>> X(1:5,:)

ans =

  -22.5000         0   20.0000
  -22.5000         0         0
         0   22.5000         0
   22.5000         0         0
   22.5000         0   20.0000

Xは座標なのだろう。

>> tet(1:10,:)

ans =

        1092        1093         858         891
        1092         856        1094        1095
        1092        1095         896         856
        1092        1096        1097         891
        1092        1094        1098        1095
        1092         896        1096         891
        1099        1100        1101        1102
         579        1103        1099        1104
        1105        1099        1102        1100
        1099        1100         670         576

tetは四角形の情報と推測する。各四角形に対して、Xで定義された座標のインデックスがtetに入っているのだろう。

load tetmesh
trep = TriRep(tet, X);
[tri xf] = freeBoundary(trep);
trisurf(tri, xf(:,1),xf(:,2),xf(:,3), 'FaceColor', 'cyan', 'FaceAlpha', 0.8);

のコードは、TriRep()を使い三角形に分割する。

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
7of9
セブンオブナインです。Unimatrix 01の第三付属物 9の7という識別番号です。Star trek Voyagerの好きなキャラクターです。まとめ記事は後日タイトルから内容がわからなくなるため、title検索で見つかるよう個々の記事にしてます。いわゆるBorg集合体の有名なセリフから「お前たち(の知識)を吸収する。抵抗は無意味だ」。Thanks in advance.

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?