Face¶
- class plot3d.face.Face(nvertex: int = 4)[source]¶
Defines a Face of a block for example IMIN,JMIN,JMIN to IMAX,JMIN,JMIN
- __eq__(f)[source]¶
Check to see if two faces are the same by looking at the I,J,K Checks to see if any of vertices x,y,z match
- Parameters:
f (Face) – another face
- Returns:
True if faces match, False if no match is found
- Return type:
Boolean
- __ne__(f)[source]¶
Checks if two faces are not equal
- Parameters:
f (Face) – another face
- Returns:
True if faces match, False if no match is found
- Return type:
Boolean
- add_vertex(x: float, y: float, z: float, i: int, j: int, k: int)[source]¶
Add vertex to define a face
- Parameters:
x (float) – x-coordinate
y (float) – y-coordinate
z (float) – z-coordinate
i (int) – i-th index of the coordinates (x,y,z)
j (int) – j-th index of the coordinates (x,y,z)
k (int) – k-th index of the coordinates (x,y,z)
- property diagonal_length: float¶
Returns the diagonal length of the face
- Returns:
diagonal length computed using IMIN, IMAX, JMIN, JMAX, KMIN, KMAX
- Return type:
float
- get_corners() Tuple [source]¶
Get the corners defined by (IMIN,JMIN,KMIN), (IMAX,JMAX,KMAX),
- Returns:
containing
(x,y,z) (float,float,float): at IMIN,JMIN,KMIN
(x,y,z) (float,float,float): at IMAX,JMAX,KMAX
- Return type:
Tuple
- Reference:
GlennHT source code https://gitlab.grc.nasa.gov/lte-turbo/GlennHT/-/blob/master/src/M_ccMBMesh.F function computeLRT
- property get_val¶
Get the value where key (I,J,K) is equal to val
- Parameters:
i_val (int) – value of I
j_val (int) – value of J
k_val (int) – value of K
- Returns:
x value [float]: y value [float]: z value
- Return type:
[float]
- index_equals(f2)[source]¶
Check to see of the face indices are equal
- Parameters:
f2 ([type]) – [description]
- property isEdge¶
check if the face is actually an edge. This is an edge if two indicies IMIN == IMAX or JMIN=JMAX or KMIN=KMAX
- Returns:
True if face is really an edge
- Return type:
[bool]
- property isPoint¶
check if the face is actually an edge. This is an edge if two indicies IMIN == IMAX or JMIN=JMAX or KMIN=KMAX
- Returns:
True if face is really a point
- Return type:
[type]
- is_connected(f, tol: float = 1e-08)[source]¶
Determines if face is connected by looking at the face centroid
- Parameters:
f (Face) – another face object
- match_indices(f)[source]¶
- Check to see if two faces are the same. Checks to see if any of vertices x,y,z match
Normally this is used by Face1==Face2
- Parameters:
f (Face) – another face
- Returns:
list of indicies where there’s a match.
- Return type:
List[(int,int)]
- normal(block)[source]¶
Computes the normal vector of the face not really used but if anyone wants it.