_cape3
: Compiled CAPE extension¶
The cape._cape3
module contains methods that were written in C to
increase speed and efficiency. The most commonly utilized methods enable Cape,
pyCart, etc. to write surface triangulations faster. Because these are simple
tasks that may need to be repeated many times, creating a compiled version can
save considerable time. However, Python versions of these methods are also
included in the main modules.
Extensions for cape module
- _cape3.WriteCompID()¶
Write component ID numbers to
Components.pyCart.tri
- Call:
>>> _cape.WriteCompID(C)
- Inputs:
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- C:
- Versions:
2014-01-02
@ddalle
: First version
- _cape3.WriteSurf()¶
Write AFLR3 surface file to
Components.pyCart.surf
- Call:
>>> cape_WriteSurf(P, blds, bldel, T, CT, BCT, Q, CQ, BCQ)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- CT:
numpy.ndarray
(int
) (nTri) Vector of component IDs for each triangle
- BCT:
numpy.ndarray
(int
) (nTri) Vector of AFLR3 boundary condition flags for each triangle
- Q:
numpy.ndarray
(int
) (nQuad, 4) Matrix of of nodal indices for each quadrangle
- CQ:
numpy.ndarray
(int
) (nQuad) Vector of component IDs for each quadrangle
- BCQ:
numpy.ndarray
(int
) (nQuad) Vector of AFLR3 boundary condition flags for each quadrangle
- P:
- Versions:
2016-04-13
@ddalle
: First version
- _cape3.WriteTri()¶
Write a Cart3D triangulation to
Components.pyCart.tri
file- Call:
>>> _cape.WriteTri(P, T)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- P:
- Versions:
2014-01-02
@ddalle
: First version
- _cape3.WriteTriQ()¶
Write
.triq
file toComponents.pyCart.tri
- Call:
>>> _cape.WriteTriQ(P, T, C, Q)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- Q:
numpy.ndarray
(float
) (nNode, nq) Matrix of states at each node
- P:
- Versions:
2015-09-24
@ddalle
: First version
- _cape3.WriteTriSTL()¶
Write
.stl
file toComponents.pyCart.stl
- Call:
>>> _cape.WriteTriSTL(P, T, N)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- N:
numpy.ndarray
(int
) (nTri, 3) Vector of triangle normals
- P:
- Versions:
2015-11-23
@ddalle
: First version
- _cape3.WriteTri_b4()¶
Write a single-precision big-endian Fortran-style triangulation file
The file written is
Components.pyCart.tri
. It is the reverse of whatever the native byte order is. Fortran record markers are included.- Call:
>>> _cape.WriteTri_b4(P, T, C)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- P:
- Versions:
2016-10-10
@ddalle
: First version
- _cape3.WriteTri_b8()¶
Write a double-precision big-endian Fortran-style triangulation file
The file written is
Components.pyCart.tri
. It is the reverse of whatever the native byte order is. Fortran record markers are included.- Call:
>>> _cape.WriteTri_b8(P, T, C)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- P:
- Versions:
2016-10-10
@ddalle
: First version
- _cape3.WriteTri_lb4()¶
Write a single-precision little-endian Fortran-style triangulation file
The file written is
Components.pyCart.tri
. It is the reverse of whatever the native byte order is. Fortran record markers are included.- Call:
>>> _cape.WriteTri_lb4(P, T, C)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- P:
- Versions:
2016-10-10
@ddalle
: First version
- _cape3.WriteTri_lb8()¶
Write a double-precision little-endian Fortran-style triangulation file
The file written is
Components.pyCart.tri
. It is the reverse of whatever the native byte order is. Fortran record markers are included.- Call:
>>> _cape.WriteTri_lb8(P, T, C)
- Inputs:
- P:
numpy.ndarray
(float
) (nNode, 3) Matrix of nodal coordinates
- C:
numpy.ndarray
(int
) (nTri) Vector of component IDs
- T:
numpy.ndarray
(int
) (nTri, 3) Matrix of of nodal indices for each triangle
- P:
- Versions:
2016-10-10
@ddalle
: First version