N2PCoefficientsFinder User Manual#
Overview#
N2PCoefficientsFinder is a NaxToPy module which detects and defines linear dependencies between rows inside a given matrix.
This is achieved by using an improved and stabilised version of the classical reduction method (Gauss’ Method).
Note
Please be aware that the input matrix has to be produced by the user.
Example usage#
1. Importing the module#
from NaxToPy.Modules.numericaltools.N2PCoefficientsFinder import N2PCoefficientsFinder
2. Create and calculate N2PCoefficientsFinder object#
coefs_analysis = N2PCoefficientsFinder() # Object initialisation
coefs_analysis.RelTol = 1.5e-03 # (Optional) Relative numerical tolerance to be used
coefs_analysis.SecondFilterMode = 'AUTO' # (Optional) It sets the second numerical filter to 'AUTO' mode
coefs_analysis.ErrorThreshold = 0.02 # (Optional) Relative numerical error [%] for final auto-check
coefs_analysis.Matrix = input_matrix # (Compulsory)
coefs_analysis.calculate() # Dependencies are calculated
Setup#
Mandatory Prerequisites#
Python Environment: Ensure you have a compatible Python environment with the following libraries:
NaxToPy modules
NaxToPy Framework: The module integrates with the NaxToPy library, which must be installed and configured in your environment.
Module Inputs#
A N2PCoefficientsFinder object has several attributes that must be added as properties:
Matrix(Numpy ndarray): Numpy 2D array [No default -> Critical error C707 if not defined].RelTol(float): relative numerical tolerance that helps to stabilise the Gauss’s method, which is naturally unstable (Default: 1.0e-03).SecondFilterMode(str): “AUTO” or “ACTIVE” (Default: “AUTO”)ErrorThreshold(float): Numerical error threshold [%] to be applied during final dependencies auto-check (Default: 0.01, which means 1% of allowable error).Property
Category
Data Type
Applicable Value
.Matrix
Mandatory
Numpy.ndarraySee Note #1 and #2
.RelTol
Optional
float\( \in [1.0 \times 10^{-10}, 1.0 \times 10^{-3}] \)
.SecondFilterMode
Optional
str“AUTO” or “ACTIVE”
.ErrorThreshold
Optional
float\(\geq0.01\)
Note #1: input matrix must have, at least, two rows. If this requirement is not met, critical error C708 will be triggered and the code is stopped.
Note #2: input matrix cannot be null. If this requirement is not met, critical error C709 will be triggered and the code is stopped.
Warning
It is not recommended to modify the value of RelTol as this parameter governs the stability of the module.
Warning
It is not recommended to introduce matrixes with more than 5000 rows.
Output Description#
Dimensions (
tuple): returns the matrix dimensions (number rows, number dofs).DependentRows (
list): returns a list containing the dependent rows.IndependentRows (
list): returns a list containing the independent rows.Rank (
int): returns the detected rank of the matrix.DependenciesMatrix (
Numpy.ndarray): returns the matrix of dependencies.NumberCorrectedRows (
int): returns the number of corrected rows inside DependenciesMatrix.
Note
The value of NumberCorrectedRows depends on both the natural dependencies of the Matrix and the selected value for ErrorThreshold. If ErrorThreshold is too low, the number of corrected rows can increase. In any case, all the output provided (Dimensions, DepependentRows, IndependentRows, Rank and DependenciesMatrix) always refers to final results, after properly applying the filter associated to ErrorThreshold.
Common Errors#
E706: raised when the user does not introduce the appropriate data type to a property.E707: raised when the user does not introduce the appropiate data size to a property.
Common Critical Errors#
C706: raised when the user tries to introduce an input matrix not being a Numpy.ndarray.C707: raised when Matrix is None and calculate() method is called.C708: raised when Matrix has just one row and calculate() method is called.C709: raised when Matrix is null and calculate() method is called.C710: raised when one or more values of Matrix are Nan and calculate() method is called.
This guide serves as a comprehensive reference for using the N2PCoefficientsFinder Module in structural analysis tasks. For further information, refer to the source code comments and examples provided.
All rights reserved. This document is licensed under the terms of the LICENSE of the NaxToPy package.