Skip to content

Commit

Permalink
Replace deprecated properties vol and cellGrad
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler committed Nov 2, 2023
1 parent 0c12275 commit 1a6761f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions geoscilabs/dcip/DCLayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ def solve_2D_potentials(rho1, rho2, h, A, B):
a = utils.closestPoints(mesh, A[:2])
b = utils.closestPoints(mesh, B[:2])

q[a] = 1.0 / mesh.vol[a]
q[b] = -1.0 / mesh.vol[b]
q[a] = 1.0 / mesh.cell_volumes[a]
q[b] = -1.0 / mesh.cell_volumes[b]

# q = q * 1./mesh.vol
# q = q * 1./mesh.cell_volumes

A = (
mesh.cellGrad.T
mesh.cell_gradient.T
* utils.sdiag(1.0 / (mesh.dim * mesh.aveF2CC.T * (1.0 / sigma)))
* mesh.cellGrad
* mesh.cell_gradient
)
Ainv = Pardiso(A)

Expand All @@ -184,7 +184,7 @@ def solve_2D_E(rho1, rho2, h, A, B):
"""

V = solve_2D_potentials(rho1, rho2, h, A, B)
E = -mesh.cellGrad * V
E = -mesh.cell_gradient * V
E = mesh.aveF2CCV * E
ex = E[: mesh.nC]
ez = E[mesh.nC :]
Expand Down

0 comments on commit 1a6761f

Please sign in to comment.