[petsc-users] Questions from a new user

Scott Norris snorris at smu.edu
Fri Jul 28 14:13:27 CDT 2017


Hi,

My graduate student and I are new to petsc -- we have worked through some
of the PDE examples, and modified them to use solve a single-variable
nonlinear PDE relevant to our research, by defining appropriate callback
functions (i.e. problem definition, jacobian of residual, and initial
condition).  Although we are not numerical specialists, this seemed
relatively straightforward, and we are very much appreciative!

Now we are looking to use it to solve a system of linear boundary-value
problems.  This seems like it ought to be broadly similar in structure
despite the lack of timestepping (i.e. one still needs a problem
definition, residual jacobian, and initial guess), with the main
complication being the addition of multiple fields/components.

We've found simple examples where a single linear BVP is solved directly
using KSP (which we've been able to run and modify successfully), but this
seems rather low-level, and we've found no KSP examples that involved
multple variables, and manually keeping track of which blocks of a vector /
matrix correspond to which variable seems a bit of a headache.  In
contrast, we've found examples with multiple components, including one
(ex19.c) with nice notation such as
f[j][i].u =
f[j][i].v =
However, this seems much more complicated than our case, and we are
struggling to understand it (i.e., the the NonlinearGS-related code
optional?)

For someone who approaches this very much as an end-user (i.e. quick
solution to BVPs/PDEs on simple grids), I'm thinking a simple nonlinear
system example is likely to be the way to go -- it would resemble the PDEs
we've already solved, work for nonlinear problems if we get to them, and in
the event that our equations are actually linear, then the Jacobian would
simply be the matrix one creates in a simple KSP example (which, as an
added bonus, could be approximated).

Okay, to our questions:
(1) Does this seem reasonable?  Are we missing an important sense of the
overall structure of PETSc?
(2) Can multi-variable BVPs be solved in a user-friendly way (a.u, a.v,
etc.) using the linear solvers?
(3) If the nonlinear solvers allow a more user-friendly interface, are
there any special considerations to keep in mind?
(4) Most generally, where else should we look for inspiration?  Are there
more detailed tutorials than the examples?

Thanks in advance for your time and any thoughts.

Scott Norris
Department of Mathematics
Southern Methodist University


-- 
Dr. Scott A. Norris
Associate Professor of Mathematics
Director of Undergraduate Studies
http://faculty.smu.edu/snorris
https://smu-snorris.ycb.me <https://smu-snorris.youcanbook.me>
Clements Hall, Room 239
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170728/32bc8f18/attachment.html>


More information about the petsc-users mailing list