void Element::invertMatrix( const ColumnMajorMatrix & A, ColumnMajorMatrix & Ainv ) { Real Axx = A(0,0); Real Axy = A(0,1); Real Axz = A(0,2); Real Ayx = A(1,0); Real Ayy = A(1,1); Real Ayz = A(1,2); Real Azx = A(2,0); Real Azy = A(2,1); Real Azz = A(2,2); mooseAssert( detMatrix( A ) > 0, "Matrix is not positive definite!" ); Real detInv = 1 / detMatrix( A ); Ainv(0,0) = +(Ayy*Azz-Azy*Ayz) * detInv; Ainv(0,1) = -(Axy*Azz-Azy*Axz) * detInv; Ainv(0,2) = +(Axy*Ayz-Ayy*Axz) * detInv; Ainv(1,0) = -(Ayx*Azz-Azx*Ayz) * detInv; Ainv(1,1) = +(Axx*Azz-Azx*Axz) * detInv; Ainv(1,2) = -(Axx*Ayz-Ayx*Axz) * detInv; Ainv(2,0) = +(Ayx*Azy-Azx*Ayy) * detInv; Ainv(2,1) = -(Axx*Azy-Azx*Axy) * detInv; Ainv(2,2) = +(Axx*Ayy-Ayx*Axy) * detInv; }
Real NonlinearRZ::volumeRatioOld(unsigned int qp) const { ColumnMajorMatrix Fnm1T; fillMatrix( qp, _grad_disp_r_old, _grad_disp_z_old, _disp_r_old, Fnm1T); Fnm1T.addDiag( 1 ); return detMatrix(Fnm1T); }
Real Nonlinear3D::volumeRatioOld(unsigned int qp) const { ColumnMajorMatrix Fnm1T(_grad_disp_x_old[qp], _grad_disp_y_old[qp], _grad_disp_z_old[qp]); Fnm1T(0, 0) += 1; Fnm1T(1, 1) += 1; Fnm1T(2, 2) += 1; return detMatrix(Fnm1T); }
Real NonlinearPlaneStrain::volumeRatioOld(unsigned int qp) const { Real strain_zz_old; if (_have_strain_zz) strain_zz_old = _strain_zz_old[qp]; else if (_have_scalar_strain_zz && _scalar_strain_zz.size()>0) strain_zz_old = _scalar_strain_zz_old[qp]; else strain_zz_old = 0.0; ColumnMajorMatrix Fnm1T; fillMatrix( qp, _grad_disp_x_old, _grad_disp_y_old, strain_zz_old, Fnm1T); Fnm1T.addDiag( 1 ); return detMatrix(Fnm1T); }