private static void TestFactorizationOfBeam3DStiffness() { double tolerance = double.Epsilon; // Unconstrained beam. 3D problem: 6 rigid body modes, 0 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Beam3DElementMatrix.UnconstrainedStiffness), 6, tolerance); // Pinned beam. 3D problem: 6 rigid body modes, 3 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Beam3DElementMatrix.PinnedStiffness), 3, tolerance); // Clamped beam. 3D problem: 6 rigid body modes, 6 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Beam3DElementMatrix.ClampedStiffness), 0, tolerance); }
private static void TestFactorizationOfQuad4Stiffness() { double tolerance = 1E-7; // Unconstrained beam. 2D problem: 3 rigid body modes, 0 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Quad4ElementMatrix.UnconstrainedStiffness), 3, tolerance); // Pinned beam. 2D problem: 3 rigid body modes, 2 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Quad4ElementMatrix.PinnedStiffness), 1, tolerance); // Clamped beam. 2D problem: 3 rigid body modes, 3 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Quad4ElementMatrix.ClampedStiffness), 0, tolerance); }
private static void TestFactorizationOfHexa8Stiffness() { double toleranceMSolve = 1E-2; double toleranceAbaqus = 1E-4; // Unconstrained beam. 3D problem: 6 rigid body modes, 0 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Hexa8ElementMatrix.UnconstrainedStiffness), 6, toleranceMSolve); // Pinned beam. 3D problem: 6 rigid body modes, 3 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Hexa8ElementMatrix.PinnedStiffness), 3, toleranceMSolve); // Clamped beam. 3D problem: 6 rigid body modes, 6 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Hexa8ElementMatrix.ClampedStiffness), 0, toleranceMSolve); // Unconstrained beam. 3D problem: 6 rigid body modes, 0 are constrained CheckFactorization(SkylineMatrix.CreateFromArray(Hexa8ElementMatrixAbaqus.UnconstrainedStiffness), 6, toleranceAbaqus); }
private static void TestConversionFullToSkyline() { var matrices = new List <double[, ]> { DiagonalIndefinite.BuildeIndefiniteMatrix(20), GlobalMatrixAssembly.GlobalMatrix, SparsePosDef10by10.Matrix, SparseSymm5by5.Matrix, SymmPosDef10by10.Matrix, SymmSingular10by10.Matrix }; foreach (double[,] matrix in matrices) { var full = Matrix.CreateFromArray(matrix); var skylineFromArray = SkylineMatrix.CreateFromArray(matrix); var skylineFromFull = SkylineMatrix.CreateFromMatrix(full); comparer.AssertEqual(full, skylineFromArray); comparer.AssertEqual(full, skylineFromFull); } }