NormalModeAnalyzer¶
- class pylimer_tools_cpp.NormalModeAnalyzer(self: pylimer_tools_cpp.NormalModeAnalyzer, spring_from: list[int], spring_to: list[int])¶
Bases:
pybind11_object
Compute the normal modes and predict the loss/storage moduli.
Please cite Gusev and Bernhard [GB24] if you use this method in your work.
Initialize the NormalModeAnalyzer with the bonds (edges).
Constructs the connectivity matrix from the given edges.
- Parameters:
spring_from – Vector of starting node indices for springs/bonds
spring_to – Vector of ending node indices for springs/bonds
Methods Summary
evaluate_loss_modulus
(self, omega)Evaluate the loss modulus \(G''(\omega)\).
evaluate_storage_modulus
(self, omega)Evaluate the storage modulus \(G'(\omega)\).
evaluate_stress_autocorrelation
(self, t)Evaluate stress autocorrelation \(C(t)\).
find_all_eigenvalues
(self[, ...])Find all eigenvalues using a dense solver.
find_sparse_eigenvalues
(self, nr_of_eigenvalues)Find the k smallest eigenvalues using a sparse solver.
get_eigenvalues
(self)Get the eigenvalues.
get_eigenvectors
(self)Get eigenvectors.
get_matrix
(self)Get the assembled connectivity matrix.
get_matrix_size
(self)Get the size of the matrix (the maximum number of eigenvalues that could be queried).
Get the number of soluble clusters (eigenvalues = 0).
set_eigenvalues
(self, eigenvalues)Set the eigenvalues, e.g. if you use an external solver.
set_eigenvectors
(self, eigenvectors)Set eigenvectors, e.g. if you use an external solver.
Methods Documentation
- evaluate_loss_modulus(self: pylimer_tools_cpp.NormalModeAnalyzer, omega: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Evaluate the loss modulus \(G''(\omega)\). Yet misses the conversion factor.
- Parameters:
omega – Angular frequencies
- Returns:
Loss modulus values
- evaluate_storage_modulus(self: pylimer_tools_cpp.NormalModeAnalyzer, omega: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Evaluate the storage modulus \(G'(\omega)\). Yet misses the conversion factor.
- Parameters:
omega – Angular frequencies
- Returns:
Storage modulus values
- evaluate_stress_autocorrelation(self: pylimer_tools_cpp.NormalModeAnalyzer, t: numpy.ndarray[numpy.float64[m, 1]]) numpy.ndarray[numpy.float64[m, 1]] ¶
Evaluate stress autocorrelation \(C(t)\).
- Parameters:
t – The time at which to evaluate the stress autocorrelation
- Returns:
Stress autocorrelation values
- find_all_eigenvalues(self: pylimer_tools_cpp.NormalModeAnalyzer, compute_eigenvectors: bool = False) None ¶
Find all eigenvalues using a dense solver.
- Parameters:
compute_eigenvectors – Whether to also compute eigenvectors (default: False)
- Returns:
True if computation was successful
- find_sparse_eigenvalues(self: pylimer_tools_cpp.NormalModeAnalyzer, nr_of_eigenvalues: int, compute_eigenvectors: bool = False) None ¶
Find the k smallest eigenvalues using a sparse solver.
- Parameters:
nr_of_eigenvalues – Number of smallest eigenvalues to find
compute_eigenvectors – Whether to also compute eigenvectors (default: False)
- Returns:
True if computation was successful
- get_eigenvalues(self: pylimer_tools_cpp.NormalModeAnalyzer) numpy.ndarray[numpy.float64[m, 1]] ¶
Get the eigenvalues.
- Returns:
Vector of eigenvalues
- get_eigenvectors(self: pylimer_tools_cpp.NormalModeAnalyzer) numpy.ndarray[numpy.float64[m, n]] ¶
Get eigenvectors.
- Returns:
Matrix of eigenvectors
- get_matrix(self: pylimer_tools_cpp.NormalModeAnalyzer) scipy.sparse.csc_matrix[numpy.float64] ¶
Get the assembled connectivity matrix.
- Returns:
The connectivity matrix
- get_matrix_size(self: pylimer_tools_cpp.NormalModeAnalyzer) int ¶
Get the size of the matrix (the maximum number of eigenvalues that could be queried).
- Returns:
Size of the connectivity matrix
- get_nr_of_soluble_clusters(self: pylimer_tools_cpp.NormalModeAnalyzer) int ¶
Get the number of soluble clusters (eigenvalues = 0).
- Returns:
Number of soluble clusters
- set_eigenvalues(self: pylimer_tools_cpp.NormalModeAnalyzer, eigenvalues: numpy.ndarray[numpy.float64[m, 1]]) None ¶
Set the eigenvalues, e.g. if you use an external solver.
- Parameters:
eigenvalues – Vector of eigenvalues to set
- set_eigenvectors(self: pylimer_tools_cpp.NormalModeAnalyzer, eigenvectors: numpy.ndarray[numpy.float64[m, n]]) None ¶
Set eigenvectors, e.g. if you use an external solver.
- Parameters:
eigenvectors – Matrix of eigenvectors to set