[petsc-users] Array of SNES's

Justin Chang jychang48 at gmail.com
Tue Jan 5 22:24:11 CST 2016


No i haven't tried, mainly because I don't know how. Btw I am not doing
this in C or FORTRAN, I want to do this in python (via petsc4py) since I am
trying to make this compatible with Firedrake (which is also python-based).


On Tue, Jan 5, 2016 at 8:57 PM, Timothée Nicolas <timothee.nicolas at gmail.com
> wrote:

> Hello and happy new year,
> Have you actually tried ? I just declared an array of 10 snes and created
> them, and there is no complaint whatsoever. Also, something I do usually is
> that I declare a derived type which contains some Petsc Objects (like SNES,
> KSP, matrices, vectors, whatever), and create arrays of this derived types.
> This works perfectly fine in my case (I use FORTRAN btw).
> Best wishes
> Timothee
> 2016-01-06 11:53 GMT+09:00 Justin Chang <jychang48 at gmail.com>:
>> Hi all,
>> Is it possible to create an array of SNES's? If I have a problem size N
>> degrees of freedom, I want each dof to have its own SNES solver (basically
>> a pointer to N SNES's). Reason for this is because I am performing a
>> "post-processing" step where after my global solve, each entry of my
>> solution vector of size N will go through some algebraic manipulation.
>> If I did a standard LU solve for these individual SNES's, I could use the
>> same snes and this issue would be moot. But i am using the Variational
>> Inequality, which basically requires a fresh SNES for each problem.
>> Thanks,
>> Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160105/de37e195/attachment.html>

More information about the petsc-users mailing list