Hi, I am trying to solve the Poisson equation like this:
from fipy.solvers.trilinos import LinearPCGSolver as mysolver
from fipy.solvers.trilinos.preconditioners import JacobiPreconditioner
as myprecon
rho_h = CellVariable(name = 'Charge Density', mesh=mesh, value = 0.0)
phi_h = CellVariable(name = 'Potential', mesh=mesh, value = 0.0)
epsilon = CellVariable(name = 'Dielectric Permitivity', mesh=mesh, value
= epsilon0)
phi_h.equation = (0.0 == DiffusionTerm(coeff = epsilon) + rho_h)
phi_h_res = phi_h.equation.sweep(var = phi_h, solver = mysolver
(iterations = phi_solver_iterations_per_step, precon = myprecon() ) )
What is strange is that if I use the PySparse equivalent LinearPCGSolver
and JacobiPreconditioner, the problem solves normally.
Also, in my code I solve a similar equation using the same Trilinos
solvers without any problems.
Thoughts?
-mike waters
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]