private static void TestFactorizationOf2DStructureStiffness() // 2D problem: 3 rigid body modes, 0 are constrained { string resourcesPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "\\Resources"; string valuesPath = resourcesPath + "\\Quad4_20x20_stiffness_values.txt"; string diagOffsetsPath = resourcesPath + "\\Quad4_20x20_stiffness_diagonal_offsets.txt"; var reader = new RawArraysReader(); SkylineMatrix unconstrainedK = reader.ReadSkylineMatrixFromSeparateFiles(valuesPath, diagOffsetsPath, true); double tolerance = 1E-2; CheckFactorization(unconstrainedK, 3, tolerance); CheckFactorization(unconstrainedK.Scale(1E-6), 3, 1E-8); //TODO: Normalization is required when comparing the pivot with the tolerance. }