[petsc-users] A question regarding a potential use case for DMNetwork

Zhang, Hong hzhang at mcs.anl.gov
Thu Nov 29 09:38:49 CST 2018


A simple example of DMNetwork, an electric circuit:
petsc/src/ksp/ksp/examples/tutorials/network/ex1.c
Hong

On Wed, Nov 28, 2018 at 5:08 PM Matthew Knepley via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
On Wed, Nov 28, 2018 at 3:51 PM Markus Lohmayer via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Dear PETSc users and developers,

in particular those experienced with the relatively new DMNetwork object,
I would like to get some advice on wether it makes sense for my application to be built using this PETSc feature
or if I am equally well served if I use plain Vec and Mat objects.

In the latter case, you might nevertheless have some good advice for a novice PETSc user
or you might know about something that helps me to come up with a well architected solution.

So the application context is closely linked to LTI state-space models (and in particular two-port / n-port network models and their interconnections):
x,t = A x + B u
y   = C x + D u

More specifically, input ‘u' and output ‘y' are vectors (of same length for all components).
Different components will have different dimension of state ‘x' (and hence also ‘A', ‘B', ‘C').

These component models then have to be interconnected according to a given topology:

If the interconnection topology is 1D, then yes DMNetwork is designed to do this. At the simplest level, you
could just use a 1D DMPlex, which is inside DMNetwork, and hand code the Section (data layout) and residual/Jacobian
assembly. DMNetwork is a higher level around this that lets you put "components" down on vertices and edges
that translate to data layout and residual evaluation. I confess to not understanding the residual part all the way.
If you start trying to modify an example, we can help you I think.

  Thanks,

     Matt

Some pair of outputs of model 1  feeds into  the corresponding pair of inputs of model 2  (and also the other way round by symmetry), etc.

After most (or even all) of the original inputs 'u_i' / outputs 'y_i' have been eliminated (based on the given interconnection structure amongst components),
it will be necessary to use an iterative eigenvalue solver to obtain eigenvectors for some interesting part of the spectrum.

The models will probably not be "very large" in the foreseeable future but this still doesn’t make e.g. MATLAB’s control toolbox an option.

I have seen the presentation by Hong Zhang (1) at this year’s user meeting and I have looked at the paper “Scalable Multiphysics Network Simulation Using PETSc DMNetwork”.
The use cases and concept of network presented therein were slightly different from this one of interconnected multi-ports in state-space formulation.

Thanks you very much for your advice and reading this post.

Best,
Markus


--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181129/ead3be44/attachment-0001.html>


More information about the petsc-users mailing list