Home License -- for personal use only. Not for government, academic, research, commercial, or other organizational use. 23-Sep-2024 12:43:34 laplacian_matrix_test(): MATLAB/Octave version 9.11.0.2358333 (R2021b) Update 7 Test laplacian_matrix(). laplacian_matrix_test01(): A full-storage matrix is returned by: L1DD: Dirichlet/Dirichlet BC; L1DN: Dirichlet/Neumann BC; L1ND: Neumann/Dirichlet BC; L1NN: Neumann/Neumann BC; L1PP: Periodic BC; Using spacing H = 1 L1DD: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 2 L1DN: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 1 L1ND: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 2 L1NN: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 1 L1PP: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 -1 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : -1 0 0 -1 2 Using spacing H = 0.166667 L1DD: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 72 L1DN: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 36 L1ND: Col: 1 2 3 4 5 Row 1 : 36 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 72 L1NN: Col: 1 2 3 4 5 Row 1 : 36 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 36 L1PP: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 -36 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : -36 0 0 -36 72 laplacian_matrix_test02(): The Laplacian L is applied to data U by: L1DD_APPLY for Dirichlet/Dirichlet BC; L1DN_APPLY for Dirichlet/Neumann BC; L1ND_APPLY for Neumann/Dirichlet BC; L1NN_APPLY for Neumann/Neumann BC; L1PP_APPLY for Periodic BC; Using spacing H = 0.1 Vector U: 1: 0.09 2: 0.16 3: 0.21 4: 0.24 5: 0.25 6: 0.24 7: 0.21 8: 0.16 9: 0.09 L1DD(U): 1: 2 2: 2 3: 2 4: 2 5: 2 6: 2 7: 2 8: 2 9: 2 L1DN(U): 1: 2 2: 2 3: 2 4: 2 5: 2 6: 2 7: 2 8: 2 9: -7 L1ND(U): 1: -7 2: 2 3: 2 4: 2 5: 2 6: 2 7: 2 8: 2 9: 2 L1NN(U): 1: -7 2: 2 3: 2 4: 2 5: 2 6: 2 7: 2 8: 2 9: -7 L1PP(U): 1: -7 2: 2 3: 2 4: 2 5: 2 6: 2 7: 2 8: 2 9: -7 laplacian_matrix_test03(): Compute eigen information for the Laplacian: L1DD_EIGEN for Dirichlet/Dirichlet BC; L1DN_EIGEN for Dirichlet/Neumann BC; L1ND_EIGEN for Neumann/Dirichlet BC; L1NN_EIGEN for Neumann/Neumann BC; L1PP_EIGEN for Periodic BC; Using spacing H = 1 L1DD Eigenvalues: 1: 0.267949 2: 1 3: 2 4: 3 5: 3.73205 L1DD Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.288675 0.5 0.57735 0.5 0.288675 2 : 0.5 0.5 7.0705e-17 -0.5 -0.5 3 : 0.57735 7.0705e-17 -0.57735 -1.4141e-16 0.57735 4 : 0.5 -0.5 -1.4141e-16 0.5 -0.5 5 : 0.288675 -0.5 0.57735 -0.5 0.288675 L1DD eigenerror = 1.08775e-15 L1DN Eigenvalues: 1: 0.0810141 2: 0.690279 3: 1.71537 4: 2.83083 5: 3.68251 L1DN Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.169891 0.455734 0.596885 0.548529 0.326019 2 : 0.326019 0.596885 0.169891 -0.455734 -0.548529 3 : 0.455734 0.326019 -0.548529 -0.169891 0.596885 4 : 0.548529 -0.169891 -0.326019 0.596885 -0.455734 5 : 0.596885 -0.548529 0.455734 -0.326019 0.169891 L1DN eigenerror = 1.47635e-15 L1ND Eigenvalues: 1: 0.0810141 2: 0.690279 3: 1.71537 4: 2.83083 5: 3.68251 L1ND Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.596885 0.548529 0.455734 0.326019 0.169891 2 : 0.548529 0.169891 -0.326019 -0.596885 -0.455734 3 : 0.455734 -0.326019 -0.548529 0.169891 0.596885 4 : 0.326019 -0.596885 0.169891 0.455734 -0.548529 5 : 0.169891 -0.455734 0.596885 -0.548529 0.326019 L1ND eigenerror = 1.4371e-15 L1NN Eigenvalues: 1: 0 2: 0.381966 3: 1.38197 4: 2.61803 5: 3.61803 L1NN Eigenvectors: Col: 1 2 3 4 5 Row 1 : 2.23607 0.601501 0.511667 0.371748 0.19544 2 : 2.23607 0.371748 -0.19544 -0.601501 -0.511667 3 : 2.23607 3.87267e-17 -0.632456 -1.1618e-16 0.632456 4 : 2.23607 -0.371748 -0.19544 0.601501 -0.511667 5 : 2.23607 -0.601501 0.511667 -0.371748 0.19544 L1NN eigenerror = 8.53396e-16 L1PP Eigenvalues: 1: 0 2: 1.38197 3: 1.38197 4: 3.61803 5: 3.61803 L1PP Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.447214 0.371748 0.511667 0.601501 0.19544 2 : 0.447214 0.601501 -0.19544 -0.371748 -0.511667 3 : 0.447214 7.74535e-17 -0.632456 -1.54907e-16 0.632456 4 : 0.447214 -0.601501 -0.19544 0.371748 -0.511667 5 : 0.447214 -0.371748 0.511667 -0.601501 0.19544 L1PP eigenerror = 8.06193e-16 Using spacing H = 0.166667 L1DD Eigenvalues: 1: 9.64617 2: 36 3: 72 4: 108 5: 134.354 L1DD Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.288675 0.5 0.57735 0.5 0.288675 2 : 0.5 0.5 7.0705e-17 -0.5 -0.5 3 : 0.57735 7.0705e-17 -0.57735 -1.4141e-16 0.57735 4 : 0.5 -0.5 -1.4141e-16 0.5 -0.5 5 : 0.288675 -0.5 0.57735 -0.5 0.288675 L1DD eigenerror = 4.8157e-14 L1DN Eigenvalues: 1: 2.91651 2: 24.85 3: 61.7533 4: 101.91 5: 132.57 L1DN Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.169891 0.455734 0.596885 0.548529 0.326019 2 : 0.326019 0.596885 0.169891 -0.455734 -0.548529 3 : 0.455734 0.326019 -0.548529 -0.169891 0.596885 4 : 0.548529 -0.169891 -0.326019 0.596885 -0.455734 5 : 0.596885 -0.548529 0.455734 -0.326019 0.169891 L1DN eigenerror = 4.45168e-14 L1ND Eigenvalues: 1: 2.91651 2: 24.85 3: 61.7533 4: 101.91 5: 132.57 L1ND Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.596885 0.548529 0.455734 0.326019 0.169891 2 : 0.548529 0.169891 -0.326019 -0.596885 -0.455734 3 : 0.455734 -0.326019 -0.548529 0.169891 0.596885 4 : 0.326019 -0.596885 0.169891 0.455734 -0.548529 5 : 0.169891 -0.455734 0.596885 -0.548529 0.326019 L1ND eigenerror = 6.01291e-14 L1NN Eigenvalues: 1: 0 2: 13.7508 3: 49.7508 4: 94.2492 5: 130.249 L1NN Eigenvectors: Col: 1 2 3 4 5 Row 1 : 2.23607 0.601501 0.511667 0.371748 0.19544 2 : 2.23607 0.371748 -0.19544 -0.601501 -0.511667 3 : 2.23607 3.87267e-17 -0.632456 -1.1618e-16 0.632456 4 : 2.23607 -0.371748 -0.19544 0.601501 -0.511667 5 : 2.23607 -0.601501 0.511667 -0.371748 0.19544 L1NN eigenerror = 3.23359e-14 L1PP Eigenvalues: 1: 0 2: 49.7508 3: 49.7508 4: 130.249 5: 130.249 L1PP Eigenvectors: Col: 1 2 3 4 5 Row 1 : 0.447214 0.371748 0.511667 0.601501 0.19544 2 : 0.447214 0.601501 -0.19544 -0.371748 -0.511667 3 : 0.447214 7.74535e-17 -0.632456 -1.54907e-16 0.632456 4 : 0.447214 -0.601501 -0.19544 0.371748 -0.511667 5 : 0.447214 -0.371748 0.511667 -0.601501 0.19544 L1PP eigenerror = 4.11208e-14 laplacian_matrix_test04(): The inverse of a full-storage matrix is returned by: L1DD_INVERSE: Dirichlet/Dirichlet BC; L1DN_INVERSE: Dirichlet/Neumann BC; L1ND_INVERSE: Neumann/Dirichlet BC; Using spacing H = 1 L1DD: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 2 L1DD_INVERSE: Col: 1 2 3 4 5 Row 1 : 0.833333 0.666667 0.5 0.333333 0.166667 2 : 0.666667 1.33333 1 0.666667 0.333333 3 : 0.5 1 1.5 1 0.5 4 : 0.333333 0.666667 1 1.33333 0.666667 5 : 0.166667 0.333333 0.5 0.666667 0.833333 L1DD inverse error = 6.86635e-16 L1DN: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 1 L1DN_INVERSE: Col: 1 2 3 4 5 Row 1 : 1 1 1 1 1 2 : 1 2 2 2 2 3 : 1 2 3 3 3 4 : 1 2 3 4 4 5 : 1 2 3 4 5 L1DD inverse error = 0 L1ND: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : -1 2 -1 0 0 3 : 0 -1 2 -1 0 4 : 0 0 -1 2 -1 5 : 0 0 0 -1 2 L1ND_INVERSE: Col: 1 2 3 4 5 Row 1 : 5 4 3 2 1 2 : 4 4 3 2 1 3 : 3 3 3 2 1 4 : 2 2 2 2 1 5 : 1 1 1 1 1 L1DD inverse error = 0 Using spacing H = 0.166667 L1DD: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 72 L1DD_INVERSE: Col: 1 2 3 4 5 Row 1 : 0.0231481 0.0185185 0.0138889 0.00925926 0.00462963 2 : 0.0185185 0.037037 0.0277778 0.0185185 0.00925926 3 : 0.0138889 0.0277778 0.0416667 0.0277778 0.0138889 4 : 0.00925926 0.0185185 0.0277778 0.037037 0.0185185 5 : 0.00462963 0.00925926 0.0138889 0.0185185 0.0231481 L1DD inverse error = 1.16573e-15 L1DN: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 36 L1DN_INVERSE: Col: 1 2 3 4 5 Row 1 : 0.0277778 0.0277778 0.0277778 0.0277778 0.0277778 2 : 0.0277778 0.0555556 0.0555556 0.0555556 0.0555556 3 : 0.0277778 0.0555556 0.0833333 0.0833333 0.0833333 4 : 0.0277778 0.0555556 0.0833333 0.111111 0.111111 5 : 0.0277778 0.0555556 0.0833333 0.111111 0.138889 L1DD inverse error = 2.51215e-15 L1ND: Col: 1 2 3 4 5 Row 1 : 36 -36 0 0 0 2 : -36 72 -36 0 0 3 : 0 -36 72 -36 0 4 : 0 0 -36 72 -36 5 : 0 0 0 -36 72 L1ND_INVERSE: Col: 1 2 3 4 5 Row 1 : 0.138889 0.111111 0.0833333 0.0555556 0.0277778 2 : 0.111111 0.111111 0.0833333 0.0555556 0.0277778 3 : 0.0833333 0.0833333 0.0833333 0.0555556 0.0277778 4 : 0.0555556 0.0555556 0.0555556 0.0555556 0.0277778 5 : 0.0277778 0.0277778 0.0277778 0.0277778 0.0277778 L1DD inverse error = 2.51215e-15 laplacian_matrix_test05(): Compute upper Cholesky factors for the Laplacian: L1DD_CHOLESKY for Dirichlet/Dirichlet BC; L1DN_CHOLESKY for Dirichlet/Neumann BC; L1ND_CHOLESKY for Neumann/Dirichlet BC; L1NN_CHOLESKY for Neumann/Neumann BC; L1PP_CHOLESKY for Periodic BC; Using spacing H = 1 L1DD Cholesky factor: Col: 1 2 3 4 5 Row 1 : 1.41421 -0.707107 0 0 0 2 : 0 1.22474 -0.816497 0 0 3 : 0 0 1.1547 -0.866025 0 4 : 0 0 0 1.11803 -0.894427 5 : 0 0 0 0 1.09545 L1DD Cholesky error = 8.88178e-16 L1DN Cholesky factor: Col: 1 2 3 4 5 Row 1 : 1.41421 -0.707107 0 0 0 2 : 0 1.22474 -0.816497 0 0 3 : 0 0 1.1547 -0.866025 0 4 : 0 0 0 1.11803 -0.894427 5 : 0 0 0 0 0.447214 L1DN Cholesky error = 7.77156e-16 L1ND Cholesky factor: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : 0 1 -1 0 0 3 : 0 0 1 -1 0 4 : 0 0 0 1 -1 5 : 0 0 0 0 1 L1ND Cholesky error = 0 L1NN Cholesky factor: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : 0 1 -1 0 0 3 : 0 0 1 -1 0 4 : 0 0 0 1 -1 5 : 0 0 0 0 0 L1NN Cholesky error = 0 L1PP Cholesky factor: Col: 1 2 3 4 5 Row 1 : 1.41421 -0.707107 0 0 -0.707107 2 : 0 1.22474 -0.816497 0 -0.408248 3 : 0 0 1.1547 -0.866025 -0.288675 4 : 0 0 0 1.11803 -1.11803 5 : 0 0 0 0 0 L1PP Cholesky error = 1.113e-15 Using spacing H = 0.166667 L1DD Cholesky factor: Col: 1 2 3 4 5 Row 1 : 8.48528 -4.24264 0 0 0 2 : 0 7.34847 -4.89898 0 0 3 : 0 0 6.9282 -5.19615 0 4 : 0 0 0 6.7082 -5.36656 5 : 0 0 0 0 6.57267 L1DD Cholesky error = 3.75984e-14 L1DN Cholesky factor: Col: 1 2 3 4 5 Row 1 : 8.48528 -4.24264 0 0 0 2 : 0 7.34847 -4.89898 0 0 3 : 0 0 6.9282 -5.19615 0 4 : 0 0 0 6.7082 -5.36656 5 : 0 0 0 0 2.68328 L1DN Cholesky error = 3.75984e-14 L1ND Cholesky factor: Col: 1 2 3 4 5 Row 1 : 6 -6 0 0 0 2 : 0 6 -6 0 0 3 : 0 0 6 -6 0 4 : 0 0 0 6 -6 5 : 0 0 0 0 6 L1ND Cholesky error = 0 L1NN Cholesky factor: Col: 1 2 3 4 5 Row 1 : 6 -6 0 0 0 2 : 0 6 -6 0 0 3 : 0 0 6 -6 0 4 : 0 0 0 6 -6 5 : 0 0 0 0 0 L1NN Cholesky error = 0 L1PP Cholesky factor: Col: 1 2 3 4 5 Row 1 : 8.48528 -4.24264 0 0 -4.24264 2 : 0 7.34847 -4.89898 0 -2.44949 3 : 0 0 6.9282 -5.19615 -1.73205 4 : 0 0 0 6.7082 -6.7082 5 : 0 0 0 0 0 L1PP Cholesky error = 4.14314e-14 laplacian_matrix_test06(): Compute LU factors for the Laplacian: L1DD_LU for Dirichlet/Dirichlet BC; L1DN_LU for Dirichlet/Neumann BC; L1ND_LU for Neumann/Dirichlet BC; L1NN_LU for Neumann/Neumann BC; L1PP_LU for Periodic BC; Using spacing H = 1 L1DD L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : 0 0 0 -0.8 1 L1DD U factor: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : 0 1.5 -1 0 0 3 : 0 0 1.33333 -1 0 4 : 0 0 0 1.25 -1 5 : 0 0 0 0 1.2 L1DD LU error = 0 L1DN L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : 0 0 0 -0.8 1 L1DN U factor: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 0 2 : 0 1.5 -1 0 0 3 : 0 0 1.33333 -1 0 4 : 0 0 0 1.25 -1 5 : 0 0 0 0 0.2 L1DN LU error = 0 L1ND L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -1 1 0 0 0 3 : 0 -1 1 0 0 4 : 0 0 -1 1 0 5 : 0 0 0 -1 1 L1ND U factor: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : 0 1 -1 0 0 3 : 0 0 1 -1 0 4 : 0 0 0 1 -1 5 : 0 0 0 0 1 L1ND LU error = 0 L1NN L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -1 1 0 0 0 3 : 0 -1 1 0 0 4 : 0 0 -1 1 0 5 : 0 0 0 -1 1 L1NN U factor: Col: 1 2 3 4 5 Row 1 : 1 -1 0 0 0 2 : 0 1 -1 0 0 3 : 0 0 1 -1 0 4 : 0 0 0 1 -1 5 : 0 0 0 0 0 L1NN LU error = 0 L1PP L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : -0.5 -0.333333 -0.25 -1 1 L1PP U factor: Col: 1 2 3 4 5 Row 1 : 2 -1 0 0 -1 2 : 0 1.5 -1 0 -0.5 3 : 0 0 1.33333 -1 -0.333333 4 : 0 0 0 1.25 -1.25 5 : 0 0 0 0 0 L1PP LU error = 0 Using spacing H = 0.166667 L1DD L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : 0 0 0 -0.8 1 L1DD U factor: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : 0 54 -36 0 0 3 : 0 0 48 -36 0 4 : 0 0 0 45 -36 5 : 0 0 0 0 43.2 L1DD LU error = 0 L1DN L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : 0 0 0 -0.8 1 L1DN U factor: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 0 2 : 0 54 -36 0 0 3 : 0 0 48 -36 0 4 : 0 0 0 45 -36 5 : 0 0 0 0 7.2 L1DN LU error = 0 L1ND L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -1 1 0 0 0 3 : 0 -1 1 0 0 4 : 0 0 -1 1 0 5 : 0 0 0 -1 1 L1ND U factor: Col: 1 2 3 4 5 Row 1 : 36 -36 0 0 0 2 : 0 36 -36 0 0 3 : 0 0 36 -36 0 4 : 0 0 0 36 -36 5 : 0 0 0 0 36 L1ND LU error = 0 L1NN L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -1 1 0 0 0 3 : 0 -1 1 0 0 4 : 0 0 -1 1 0 5 : 0 0 0 -1 1 L1NN U factor: Col: 1 2 3 4 5 Row 1 : 36 -36 0 0 0 2 : 0 36 -36 0 0 3 : 0 0 36 -36 0 4 : 0 0 0 36 -36 5 : 0 0 0 0 0 L1NN LU error = 0 L1PP L factor: Col: 1 2 3 4 5 Row 1 : 1 0 0 0 0 2 : -0.5 1 0 0 0 3 : 0 -0.666667 1 0 0 4 : 0 0 -0.75 1 0 5 : -0.5 -0.333333 -0.25 -1 1 L1PP U factor: Col: 1 2 3 4 5 Row 1 : 72 -36 0 0 -36 2 : 0 54 -36 0 -18 3 : 0 0 48 -36 -12 4 : 0 0 0 45 -45 5 : 0 0 0 0 0 L1PP LU error = 0 laplacian_matrix_test(): Normal end of execution. 23-Sep-2024 12:43:35