Chaste
Release::2018.1
|
Go to the source code of this file.
Functions | |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 2, 2 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 3, 3 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 3, 2 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 3, 1 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 2, 1 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 3, 0 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 2, 0 > &rM) |
template<class T > | |
T | Determinant (const boost::numeric::ublas::c_matrix< T, 1, 0 > &rM) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 2, 2 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 3, 3 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 3, 2 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 3, 1 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 2, 1 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 3, 0 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 2, 0 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
T | SubDeterminant (const boost::numeric::ublas::c_matrix< T, 1, 0 > &rM, const unsigned missrow, const unsigned misscol) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 1, 1 > | Inverse (const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 2, 2 > | Inverse (const boost::numeric::ublas::c_matrix< T, 2, 2 > &rM) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 3, 3 > | Inverse (const boost::numeric::ublas::c_matrix< T, 3, 3 > &rM) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 2, 3 > | Inverse (const boost::numeric::ublas::c_matrix< T, 3, 2 > &rM) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 1, 2 > | Inverse (const boost::numeric::ublas::c_matrix< T, 2, 1 > &rM) |
template<class T > | |
boost::numeric::ublas::c_matrix < T, 1, 3 > | Inverse (const boost::numeric::ublas::c_matrix< T, 3, 1 > &rM) |
template<class T > | |
T | Trace (const c_matrix< T, 1, 1 > &rM) |
template<class T > | |
T | Trace (const c_matrix< T, 2, 2 > &rM) |
template<class T > | |
T | Trace (const c_matrix< T, 3, 3 > &rM) |
template<class T > | |
T | Trace (const c_matrix< T, 4, 4 > &rM) |
template<class T > | |
T | SecondInvariant (const c_matrix< T, 3, 3 > &rM) |
template<class T > | |
T | SecondInvariant (const c_matrix< T, 2, 2 > &rM) |
c_vector< double, 3 > | CalculateEigenvectorForSmallestNonzeroEigenvalue (c_matrix< double, 3, 3 > &rA) |
double | CalculateMaxEigenpair (c_matrix< double, 3, 3 > &rA, c_vector< double, 3 > &rEigenvector) |
template<class T > | |
c_vector< T, 1 > | VectorProduct (const c_vector< T, 1 > &rA, const c_vector< T, 1 > &rB) |
template<class T > | |
c_vector< T, 2 > | VectorProduct (const c_vector< T, 2 > &rA, const c_vector< T, 2 > &rB) |
template<class T > | |
c_vector< T, 3 > | VectorProduct (const c_vector< T, 3 > &rA, const c_vector< T, 3 > &rB) |
c_vector< double, 1 > | Create_c_vector (double x) |
c_vector< double, 2 > | Create_c_vector (double x, double y) |
c_vector< double, 3 > | Create_c_vector (double x, double y, double z) |
A collection of useful functions extending the functionality of the Boost Ublas library.
Definition in file UblasCustomFunctions.hpp.
c_vector<double,3> CalculateEigenvectorForSmallestNonzeroEigenvalue | ( | c_matrix< double, 3, 3 > & | rA | ) |
Find the eigenvector corresponding real eigenvalue which is smallest in magnitude. Caveat: if there are zero eigenvalues they are ignored. It's the smallest magnitude non-zero real eigenvalue which is used.
rA | 3x3 matrix is question. This should be symmetric and positive definite. |
Definition at line 62 of file UblasCustomFunctions.cpp.
References CalculateMaxEigenpair(), EXCEPTION, and UNUSED_OPT.
Referenced by PapillaryFibreCalculator::CalculateFibreOrientations().
double CalculateMaxEigenpair | ( | c_matrix< double, 3, 3 > & | rA, |
c_vector< double, 3 > & | rEigenvector | ||
) |
Helper function to get maximum eigenpair from a 3x3 matrix by the power method
rA | 3x3 matrix is question. |
rEigenvector | a guess eigenvector which will be refined |
Definition at line 109 of file UblasCustomFunctions.cpp.
Referenced by CalculateEigenvectorForSmallestNonzeroEigenvalue().
Convenience function for quickly creating test vectors (1D).
x | entry in vector |
Definition at line 38 of file UblasCustomFunctions.cpp.
Referenced by HeartConfig::GetConductivityHeterogeneities().
Convenience function for quickly creating test vectors (2D).
x | entry in vector |
y | entry in vector |
Definition at line 45 of file UblasCustomFunctions.cpp.
Convenience function for quickly creating test vectors (3D).
x | entry in vector |
y | entry in vector |
z | entry in vector |
Definition at line 53 of file UblasCustomFunctions.cpp.
|
inline |
1x1 Determinant.
rM | The matrix of which to find the determinant. |
Definition at line 59 of file UblasCustomFunctions.hpp.
Referenced by AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::AddActiveStressAndStressDerivative(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElementForPressureOnDeformedBc(), IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateJacobian(), AbstractMaterialLaw< DIM >::ComputeCauchyStress(), CompressibleExponentialLaw< DIM >::ComputeStressAndStressDerivative(), AbstractIsotropicCompressibleMaterialLaw< DIM >::ComputeStressAndStressDerivative(), Determinant(), Inverse(), and SecondInvariant().
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 2, 2 > & | rM | ) |
2x2 Determinant.
rM | The matrix of which to find the determinant. |
Definition at line 73 of file UblasCustomFunctions.hpp.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 3, 3 > & | rM | ) |
3x3 Determinant.
rM | The matrix of which to find the determinant. |
Definition at line 87 of file UblasCustomFunctions.hpp.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 3, 2 > & | rM | ) |
3x2 (Generalized determinant).
rM | The matrix of which to find the generalized determinant. |
Definition at line 106 of file UblasCustomFunctions.hpp.
References Determinant().
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 3, 1 > & | rM | ) |
3x1 (Generalized determinant).
rM | The matrix of which to find the generalized determinant. |
Definition at line 121 of file UblasCustomFunctions.hpp.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 2, 1 > & | rM | ) |
2x1 (Generalized determinant).
rM | The matrix of which to find the generalized determinant. |
Definition at line 135 of file UblasCustomFunctions.hpp.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 3, 0 > & | rM | ) |
rM | The matrix of which to find the generalized determinant. |
Definition at line 148 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 2, 0 > & | rM | ) |
rM | The matrix of which to find the generalized determinant. |
Definition at line 160 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
T Determinant | ( | const boost::numeric::ublas::c_matrix< T, 1, 0 > & | rM | ) |
rM | The matrix of which to find the generalized determinant. |
Definition at line 172 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
boost::numeric::ublas::c_matrix<T, 1, 1> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 1, 1 > & | rM | ) |
1x1 Inverse. Get the inverse of a ublas matrix.
rM | The matrix of which to find the inverse. |
Definition at line 367 of file UblasCustomFunctions.hpp.
References Determinant().
Referenced by AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::AddActiveStressAndStressDerivative(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElementForPressureOnDeformedBc(), IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateInverseJacobian(), AbstractMaterialLaw< DIM >::Compute1stPiolaKirchoffStress(), AbstractMaterialLaw< DIM >::Compute2ndPiolaKirchoffStress(), AbstractMaterialLaw< DIM >::ComputeCauchyStress(), and CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::rCalculateModifiedConductivityTensor().
boost::numeric::ublas::c_matrix<T, 2, 2> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 2, 2 > & | rM | ) |
2x2 Inverse. Get the inverse of a ublas matrix.
rM | The matrix of which to find the inverse. |
Definition at line 386 of file UblasCustomFunctions.hpp.
References Determinant().
boost::numeric::ublas::c_matrix<T, 3, 3> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 3, 3 > & | rM | ) |
3x3 Inverse. Get the inverse of a ublas matrix.
rM | The matrix of which to find the inverse. |
Definition at line 409 of file UblasCustomFunctions.hpp.
References Determinant().
boost::numeric::ublas::c_matrix<T, 2, 3> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 3, 2 > & | rM | ) |
2x3 pseudo-inverse of a matrix. The pseudo-inverse is given by pinv(T) = (T'T)^(-1)*T'.
rM | The matrix of which to find the inverse. |
Definition at line 440 of file UblasCustomFunctions.hpp.
boost::numeric::ublas::c_matrix<T, 1, 2> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 2, 1 > & | rM | ) |
2x1 pseudo-inverse of a matrix. The pseudo-inverse is given by pinv(T) = (T'T)^(-1)*T'.
rM | The matrix of which to find the inverse. |
Definition at line 480 of file UblasCustomFunctions.hpp.
References Determinant().
boost::numeric::ublas::c_matrix<T, 1, 3> Inverse | ( | const boost::numeric::ublas::c_matrix< T, 3, 1 > & | rM | ) |
3x1 pseudo-inverse of a matrix. The pseudo-inverse is given by pinv(T) = (T'T)^(-1)*T'.
rM | The matrix of which to find the inverse. |
Definition at line 501 of file UblasCustomFunctions.hpp.
References Determinant().
T SecondInvariant | ( | const c_matrix< T, 3, 3 > & | rM | ) |
rM | The matrix |
Definition at line 576 of file UblasCustomFunctions.hpp.
Referenced by AbstractIsotropicIncompressibleMaterialLaw< DIM >::ComputeStressAndStressDerivative(), and AbstractIsotropicCompressibleMaterialLaw< DIM >::ComputeStressAndStressDerivative().
T SecondInvariant | ( | const c_matrix< T, 2, 2 > & | rM | ) |
rM | The matrix |
Definition at line 590 of file UblasCustomFunctions.hpp.
References Determinant().
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 1, 1 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
1x1 SubDeterminant.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 189 of file UblasCustomFunctions.hpp.
Referenced by AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection().
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 2, 2 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
2x2 SubDeterminant.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 207 of file UblasCustomFunctions.hpp.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 3, 3 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 3x3.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 228 of file UblasCustomFunctions.hpp.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 3, 2 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 3x2.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 253 of file UblasCustomFunctions.hpp.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 3, 1 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 3x1.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 276 of file UblasCustomFunctions.hpp.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 2, 1 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 2x1.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 299 of file UblasCustomFunctions.hpp.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 3, 0 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 3x0 - Not implemented, but needed by some compilers for recursive template calls.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 323 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 2, 0 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 2x0 - Not implemented, but needed by some compilers for recursive template calls.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 337 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
T SubDeterminant | ( | const boost::numeric::ublas::c_matrix< T, 1, 0 > & | rM, |
const unsigned | missrow, | ||
const unsigned | misscol | ||
) |
SubDeterminant 1x0 - Not implemented, but needed by some compilers for recursive template calls. Determinant of a submatrix after removing a particular row and column.
rM | The matrix of which to find the subdeterminant. |
missrow | The index to the row to remove |
misscol | The index to the column to remove |
Definition at line 351 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
|
inline |
1x1 matrix trace (sum of diagonal elements).
rM | The matrix of which to find the trace. |
Definition at line 524 of file UblasCustomFunctions.hpp.
Referenced by AbstractIsotropicIncompressibleMaterialLaw< DIM >::ComputeStressAndStressDerivative(), and AbstractIsotropicCompressibleMaterialLaw< DIM >::ComputeStressAndStressDerivative().
|
inline |
2x2 matrix trace (sum of diagonal elements).
rM | The matrix of which to find the trace. |
Definition at line 536 of file UblasCustomFunctions.hpp.
|
inline |
3x3 matrix trace (sum of diagonal elements).
rM | The matrix of which to find the trace. |
Definition at line 548 of file UblasCustomFunctions.hpp.
|
inline |
4x4 matrix trace (sum of diagonal elements).
rM | The matrix of which to find the trace. |
Definition at line 560 of file UblasCustomFunctions.hpp.
c_vector<T, 1> VectorProduct | ( | const c_vector< T, 1 > & | rA, |
const c_vector< T, 1 > & | rB | ||
) |
This is a fake cross-product aka vector-product. Fake because it's only implemented for 3-vectors. This version is to satisfy template compilation.
rA | first vector |
rB | second vector |
Definition at line 626 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::CalculateUnitNormalToFaceWithArea(), and StreeterFibreGenerator< SPACE_DIM >::Visit().
c_vector<T, 2> VectorProduct | ( | const c_vector< T, 2 > & | rA, |
const c_vector< T, 2 > & | rB | ||
) |
This is a fake cross-product aka vector-product. Fake because it's only implemented for 3-vectors. This version is to satisfy template compilation.
rA | first vector |
rB | second vector |
Definition at line 639 of file UblasCustomFunctions.hpp.
References NEVER_REACHED.
c_vector<T, 3> VectorProduct | ( | const c_vector< T, 3 > & | rA, |
const c_vector< T, 3 > & | rB | ||
) |
This is a cross-product aka vector-product, only implemented for 3-vectors.
rA | first vector |
rB | second vector |
Definition at line 652 of file UblasCustomFunctions.hpp.