Matrix API
This module provides functions and classes for constructing various structural analysis matrices.
Functions
def A_matrix(Domain, matrix=None)-
Returns a Kinematic_matrix object
def AssemblyTensor(Model)-
def Aub_matrix(model, alpha)-
Return the interaction upperbound matrix
def B_matrix(model, matrix=None, rng=None)-
Returns a Static_matrix object
def Bh_matrix(model)-
Returns a Static_matrix object
def F_matrix(Domain)-
Returns a Flexibility_matrix object
def Fs_matrix(model, Roption=True)-
Returns a Flexibility_matrix object
def K_matrix(Model)-
Returns a Stiffness_matrix object
def K_tensor(Model, U=None)-
Returns a Stiffness_matrix object
def Ks_matrix(model)-
Returns a Flexibility_matrix object
def Kt_matrix(Model, State)-
Returns a Stiffness_matrix object
def Localize(U_vector, P_vector, model=None)-
def P0_vector(model)-
def P_vector(model, vector=None)-
def Pw_vector(model)-
def Q0_vector(model)-
Returns a vector of initial element forces
def Q_vector(model, vector=None)-
Returns a iForce_vector object
def Qp_vector(model)-
Returns a vector of element plastic capacities
def Qpl_vector(model)-
Returns a vector of element plastic capacities
def U_vector(model, vector=None)-
Returns a Displacement_vector object
def V0_vector(model)-
Returns a Deformation_vector object
def V_vector(model, vector=None)-
Returns a Deformation_vector object
def del_zeros(mat)-
def elem_dofs(Elem)-
def nB_matrix(model, rng=None)-
Returns a Static_matrix object
def transfer_vars(item1, item2)-
Classes
class Deformation_vector (arry, model, row_data, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray
Class variables
var tag-
Instance variables
var c-
Removes rows corresponding to element hinges/releases
var i-
Removes rows corresponding to redundant forces
var x-
Removes rows of corresponding to primary forces
class Diag_matrix (arry, rc_data, model)-
Block diagonal matrix of element flexibility/stiffness matrices for structural model
this class represents the block diagonal matrix of element flexibility or stiffness matrices for a structural model.
Parameters
model
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var tag-
Instance variables
var c-
Removes columns corresponding to element hinges/releases
Inherited members
class Displacement_vector (Kinematic_matrix, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- column_vector
- Structural_Vector
- numpy.ndarray
Class variables
var tag-
Instance variables
var f-
Removes rows corresponding to fixed dofs
class Flexibility_matrix (model, Roption=True)-
Parameters
model
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var tag-
Instance variables
var c-
Removes rows corresponding to element hinges/releases
Inherited members
class Kinematic_matrix (model, matrix=None, rng=None)-
Class for the kinematic matrix of a structural model with 2d/3d truss and 2d frame elements the function forms the kinematic matrix A for all degrees of freedom and all element deformations of the structural model specified in data structure MODEL the function is currently limited to 2d/3d truss and 2d frame elements
Returns
Kinematic matrix
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var ranges-
Instance variables
var c-
Removes rows corresponding to element hinges/releases
var c0-
var d-
Removes columns corresponding to free dofs
var e-
var f-
Removes columns corresponding to fixed dofs
var i-
Removes rows corresponding to redundant forces
var o-
Methods
def combine(self, component)-
Inherited members
class Mass_matrix (mat)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var tag-
Instance variables
var f-
var m-
Inherited members
class Static_matrix (model, matrix=None, rng=None)-
B_MATRIX static matrix of structural model with 2d/3d truss and 2d frame elements the function forms the static matrix B for all degrees of freedom and all basic forces of the structural model specified in data structure MODEL; the function is currently limited to 2d/3d truss and 2d frame elements
Parameters
model:emme.Model objectPartitions
=========================================================================================
B.f : nf x ntq
B.c : nf x nq
B.fc : nf x nq
B.i : ni x nq
B.x : nx x nq
where:
- ni: number of primary (non-redundant) forces.
- nq: number of total, continuous forces.
- nx: number of redundant forces.
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var ranges-
Instance variables
var bari-
var barx-
var barxi-
var c-
var c0-
var d-
Removes rows corresponding to free dofs
var f-
var fc-
var i-
Removes rows of B_matrix corresponding to primary (non-redundant) forces
var o-
Remove columns corresponding to element force releases, then delete zeros
var x-
Removes rows of B_matrix corresponding to primary (non-redundant) forces
Inherited members
class Stiffness_matrix (arry, model, Roption=None)-
… Parameters ============ model
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var tag-
Instance variables
var f-
Inherited members
class Structural_Matrix (mat)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- numpy.ndarray
Subclasses
- Diag_matrix
- Flexibility_matrix
- Kinematic_matrix
- Mass_matrix
- Static_matrix
- Stiffness_matrix
- nKinematic_matrix
- nStatic_matrix
Class variables
var c_cidx-
var c_ridx-
var column_data-
var row_data-
var tag-
Instance variables
var c-
var df-
var disp-
var inv-
var ker-
Return a basis for the kernel (nullspace) of a matrix.
var lns-
Return a basis for the left nullspace of a matrix.
var nls-
return a basis for the nullspace of matrix.
var rank-
Return the rank of a matrix
Methods
def add_cols(self, component)-
def add_rows(self, component)-
def del_zeros(self)-
Delete rows and columns of a matrix with all zeros
def get(self, row_name, col_name)-
def lu(self)-
def remove(self, component)-
Remove items by looking up column_data/row_data
def round(self, num)-
a.round(decimals=0, out=None)
Return
awith each element rounded to the given number of decimals.Refer to
numpy.aroundfor full documentation.See Also
numpy.around- equivalent function
def rows(self, component)-
class Structural_Vector (mat)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- numpy.ndarray
Subclasses
Class variables
var column_data-
var row_data-
var subs-
var tag-
Instance variables
var df-
var disp-
var symb-
Methods
def get(self, key)-
def rows(self, component)-
def set_item(self, key, value)-
class column_vector (Matrix, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray
Subclasses
class iForce_vector (arry, model, row_data, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray
Class variables
var tag-
Instance variables
var c-
Remove rows corresponding to element hinges/releases
var i-
Removes rows corresponding to redundant forces
var x-
Remove rows of corresponding to primary forces
class nDisplacement_vector (arry, model, row_data, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray
Class variables
var tag-
Instance variables
var f-
Removes rows corresponding to fixed dofs
class nForce_vector (arry, model, row_data, Vector=None)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray
Class variables
var tag-
Instance variables
var d-
Removes rows corresponding to free dofs
var f-
class nKinematic_matrix (arry, model, rcdata)-
Class for the kinematic matrix of a structural model with 2d/3d truss and 2d frame elements the function forms the kinematic matrix A for all degrees of freedom and all element deformations of the structural model specified in data structure MODEL the function is currently limited to 2d/3d truss and 2d frame elements
Returns
Kinematic matrix
Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var ranges-
Instance variables
var c-
Removes rows corresponding to element hinges/releases
var c0-
var d-
Removes columns corresponding to free dofs
var e-
var f-
Removes columns corresponding to fixed dofs
var i-
Removes rows corresponding to redundant forces
var o-
Methods
def combine(self, component)-
Inherited members
class nStatic_matrix (arry, model, rcdata)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Matrix
- numpy.ndarray
Class variables
var ranges-
Instance variables
var bari-
var barx-
var barxi-
var c-
Removes columns corresponding to element hinges/releases
var c0-
var d-
Removes rows corresponding to free dofs
var f-
var fc-
var i-
Removes rows of B_matrix corresponding to redundant forces
var o-
Remove columns corresponding to element force releases, then delete zeros
var x-
Removes rows of B_matrix corresponding to primary (non-redundant) forces
Inherited members
class row_vector (Matrix)-
ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array,zerosorempty(refer to the See Also section below). The parameters given here refer to a low-level method (ndarray(…)) for instantiating an array.For more information, refer to the
numpymodule and examine the methods and attributes of an array.Parameters
(for the new method; see Notes below)
shape:tupleofints- Shape of created array.
dtype:data-type, optional- Any object that can be interpreted as a numpy data type.
buffer:object exposing buffer interface, optional- Used to fill the array with data.
offset:int, optional- Offset of array data in buffer.
strides:tupleofints, optional- Strides of data in memory.
order:{'C', 'F'}, optional- Row-major (C-style) or column-major (Fortran-style) order.
Attributes
T:ndarray- Transpose of the array.
data:buffer- The array’s elements, in memory.
dtype:dtype object- Describes the format of the elements in the array.
flags:dict- Dictionary containing information related to memory use, e.g., ‘C_CONTIGUOUS,’ ‘OWNDATA,’ ‘WRITEABLE,’ etc.
flat:numpy.flatiter object- Flattened version of the array as an iterator. The iterator allows assignments, e.g.,
x.flat = 3(Seendarray.flatfor assignment examples; TODO). imag:ndarray- Imaginary part of the array.
real:ndarray- Real part of the array.
size:int- Number of elements in the array.
itemsize:int- The memory use of each array element in bytes.
nbytes:int- The total number of bytes required to store the array data, i.e.,
itemsize * size. ndim:int- The array’s number of dimensions.
shape:tupleofints- Shape of the array.
strides:tupleofints- The step-size required to move from one element to the next in memory. For example, a contiguous
(3, 4)array of typeint16in C-order has strides(8, 2). This implies that to move from element to element in memory requires jumps of 2 bytes. To move from row-to-row, one needs to jump 8 bytes at a time (2 * 4). ctypes:ctypes object- Class containing properties of the array needed for interaction with ctypes.
base:ndarray- If the array is a view into another array, that array is its
base(unless that array is also a view). Thebasearray is where the array data is actually stored.
See Also
array- Construct an array.
zeros- Create an array, each element of which is zero.
empty- Create an array, but leave its allocated memory unchanged (i.e., it contains “garbage”).
dtype- Create a data-type.
Notes
There are two modes of creating an array using
__new__:- If
bufferis None, then onlyshape,dtype, andorderare used. - If
bufferis an object exposing the buffer interface, then all keywords are interpreted.
No
__init__method is needed because the array is fully initialized after the__new__method.Examples
These examples illustrate the low-level
ndarrayconstructor. Refer to theSee Alsosection above for easier ways of constructing an ndarray.First mode,
bufferis None:>>> np.ndarray(shape=(2,2), dtype=float, order='F') array([[0.0e+000, 0.0e+000], # random [ nan, 2.5e-323]])Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]), ... offset=np.int_().itemsize, ... dtype=int) # offset = 1*itemsize, i.e. skip first element array([2, 3])Ancestors
- Structural_Vector
- numpy.ndarray