Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
camillo81 committed Nov 3, 2023
1 parent 5fd7f65 commit 8f7e477
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions psydac/feec/tests/test_commuting_projections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from psydac.feec.derivatives import ScalarCurl_2D, VectorCurl_2D, Curl_3D
from psydac.feec.derivatives import Divergence_2D, Divergence_3D
from psydac.ddm.cart import DomainDecomposition
from psydac.linalg.solvers import GMRES as Inverse
from psydac.linalg.solvers import inverse

from mpi4py import MPI
import numpy as np
Expand Down Expand Up @@ -81,8 +81,8 @@ def test_3d_commuting_pro_1(Nel, Nq, p, bc):
# build the solver from the LinearOperator
# imat_kronecker_P0 = P0.imat_kronecker
# imat_kronecker_P1 = P1.imat_kronecker
# I0inv = Inverse(imat_kronecker_P0, verbose=True)
# I1inv = Inverse(imat_kronecker_P1, verbose=True)
# I0inv = inverse(imat_kronecker_P0, 'gmres', verbose=True)
# I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)

# # build the rhs
# P0.func(fun1)
Expand Down Expand Up @@ -179,8 +179,8 @@ def test_3d_commuting_pro_2(Nel, Nq, p, bc):
# build the solver from the LinearOperator
# imat_kronecker_P1 = P1.imat_kronecker
# imat_kronecker_P2 = P2.imat_kronecker
# I1inv = Inverse(imat_kronecker_P1, verbose=True)
# I2inv = Inverse(imat_kronecker_P2, verbose=True)
# I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)
# I2inv = inverse(imat_kronecker_P2, 'gmres', verbose=True)

# # build the rhs
# P1.func(fun1, fun2, fun3)
Expand Down Expand Up @@ -268,8 +268,8 @@ def test_3d_commuting_pro_3(Nel, Nq, p, bc):
# build the solver from the LinearOperator
# imat_kronecker_P2 = P2.imat_kronecker
# imat_kronecker_P3 = P3.imat_kronecker
# I2inv = Inverse(imat_kronecker_P2, verbose=True)
# I3inv = Inverse(imat_kronecker_P3, verbose=True)
# I2inv = inverse(imat_kronecker_P2, 'gmres', verbose=True)
# I3inv = inverse(imat_kronecker_P3, 'gmres', verbose=True)

# # build the rhs
# P2.func(fun1, fun2, fun3)
Expand Down Expand Up @@ -344,8 +344,8 @@ def test_2d_commuting_pro_1(Nel, Nq, p, bc):
# build the solver from the LinearOperator
imat_kronecker_P0 = P0.imat_kronecker
imat_kronecker_P1 = P1.imat_kronecker
I0inv = Inverse(imat_kronecker_P0, verbose=True)
I1inv = Inverse(imat_kronecker_P1, verbose=True)
I0inv = inverse(imat_kronecker_P0, 'gmres', verbose=True)
I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)

# build the rhs
P0.func(fun1)
Expand Down Expand Up @@ -420,8 +420,8 @@ def test_2d_commuting_pro_2(Nel, Nq, p, bc):
# build the solver from the LinearOperator
imat_kronecker_P0 = P0.imat_kronecker
imat_kronecker_P1 = P1.imat_kronecker
I0inv = Inverse(imat_kronecker_P0, verbose=True)
I1inv = Inverse(imat_kronecker_P1, verbose=True)
I0inv = inverse(imat_kronecker_P0, 'gmres', verbose=True)
I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)

# build the rhs
P0.func(fun1)
Expand Down Expand Up @@ -503,8 +503,8 @@ def test_2d_commuting_pro_3(Nel, Nq, p, bc):
# build the solver from the LinearOperator
imat_kronecker_P2 = P2.imat_kronecker
imat_kronecker_P3 = P3.imat_kronecker
I2inv = Inverse(imat_kronecker_P2, verbose=True)
I3inv = Inverse(imat_kronecker_P3, verbose=True)
I2inv = inverse(imat_kronecker_P2, 'gmres', verbose=True)
I3inv = inverse(imat_kronecker_P3, 'gmres', verbose=True)

# build the rhs
P2.func(fun1, fun2)
Expand Down Expand Up @@ -586,8 +586,8 @@ def test_2d_commuting_pro_4(Nel, Nq, p, bc):
# build the solver from the LinearOperator
imat_kronecker_P1 = P1.imat_kronecker
imat_kronecker_P2 = P2.imat_kronecker
I1inv = Inverse(imat_kronecker_P1, verbose=True)
I2inv = Inverse(imat_kronecker_P2, verbose=True)
I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)
I2inv = inverse(imat_kronecker_P2, 'gmres', verbose=True)

# build the rhs
P1.func(fun1, fun2)
Expand Down Expand Up @@ -657,8 +657,8 @@ def test_1d_commuting_pro_1(Nel, Nq, p, bc):
# build the solver from the LinearOperator
imat_kronecker_P0 = P0.imat_kronecker
imat_kronecker_P1 = P1.imat_kronecker
I0inv = Inverse(imat_kronecker_P0, verbose=True)
I1inv = Inverse(imat_kronecker_P1, verbose=True)
I0inv = inverse(imat_kronecker_P0, 'gmres', verbose=True)
I1inv = inverse(imat_kronecker_P1, 'gmres', verbose=True)

# build the rhs
P0.func(fun1)
Expand Down Expand Up @@ -689,6 +689,5 @@ def test_1d_commuting_pro_1(Nel, Nq, p, bc):
test_3d_commuting_pro_1(Nel, Nq, p, bc)
test_3d_commuting_pro_2(Nel, Nq, p, bc)
test_3d_commuting_pro_3(Nel, Nq, p, bc)
test_2d_commuting_pro_4(Nel, Nq, p, bc)


0 comments on commit 8f7e477

Please sign in to comment.