<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Nov 28, 2018 at 3:51 PM Markus Lohmayer via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear PETSc users and developers,<br>
<br>
in particular those experienced with the relatively new DMNetwork object,<br>
I would like to get some advice on wether it makes sense for my application to be built using this PETSc feature<br>
or if I am equally well served if I use plain Vec and Mat objects.<br>
<br>
In the latter case, you might nevertheless have some good advice for a novice PETSc user<br>
or you might know about something that helps me to come up with a well architected solution.<br>
<br>
So the application context is closely linked to LTI state-space models (and in particular two-port / n-port network models and their interconnections):<br>
x,t = A x + B u<br>
y = C x + D u<br>
<br>
More specifically, input ‘u' and output ‘y' are vectors (of same length for all components).<br>
Different components will have different dimension of state ‘x' (and hence also ‘A', ‘B', ‘C').<br>
<br>
These component models then have to be interconnected according to a given topology:<br></blockquote><div><br></div><div>If the interconnection topology is 1D, then yes DMNetwork is designed to do this. At the simplest level, you</div><div>could just use a 1D DMPlex, which is inside DMNetwork, and hand code the Section (data layout) and residual/Jacobian</div><div>assembly. DMNetwork is a higher level around this that lets you put "components" down on vertices and edges</div><div>that translate to data layout and residual evaluation. I confess to not understanding the residual part all the way.</div><div>If you start trying to modify an example, we can help you I think.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>
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),<br>
it will be necessary to use an iterative eigenvalue solver to obtain eigenvectors for some interesting part of the spectrum.<br>
<br>
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.<br>
<br>
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”.<br>
The use cases and concept of network presented therein were slightly different from this one of interconnected multi-ports in state-space formulation.<br>
<br>
Thanks you very much for your advice and reading this post.<br>
<br>
Best,<br>
Markus</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>