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

Zhang, Hong hzhang at mcs.anl.gov
Wed Dec 5 13:53:17 CST 2018


Markus:
Thanks for telling me more about your model. I am curious and like to know more about it.
My understanding is that you do have
1) a network (edges and nodes)
2) components (math equations over each edge):
        dx / dt = A * x + B * input
        output = C * x + D * input

It seems you must solve this problem in sequence, i.e., solving edge1 to get output1. Then proceed to edge 2:
input2 = TF*output1, and solve
       dx2 / dt = A * x2 + B * input2
       output2 = C * x2 + D * input2
Here I use a simple network
edge1 -> node1 -> edge2.

Am I correct?
Hong



Thank you very much both Hong and Matt for your answers!

I have looked at the examples and I am still in the middle of figuring out how the concept of network in my application differs from the concept in the examples.
It is sure that this will take me a while, especially since I am a beginner.

No need to take further care of my question now! I will come back later, once I am more knowledgeable.
At the moment I don’t have much more than an intuition,
and it tells me that it makes probably no sense to consider DMNetwork or any kind of DM for that matter.
I think the bottom line is that, despite the fact that the application has very much a network character, this is a quite different kind of network.

Thanks again,
Markus


Appendix:
--------------

Nevertheless, since Hong asked about a more precise definition, and for the sake of “completeness”, I will elaborate more (just in case you want to know):

Yes definitely, the problem I am dealing with can be seen as nodes connected by structures of topological dimension one (i.e. edges).

The nodes always come in “in/out" pairs and one such pair is referred to as a port.

Every edge (i.e. component) represents a transfer function `TF`, i.e. `OUTPUT(s) = TF(s) * INPUT(s)`, where `s` represents a complex frequency (Laplace transform).
This transfer function is rational, i.e.
`TF(s) = numer(s) / denom(s)`,
which means it is equivalent to a linear ODE of order `n`, where `n` is the order of the polynomial `denom`.
Note that this makes an edge a directed interconnection element! (INPUT --> OUTPUT is a causal relationship)

This ODE of order `n` can be rewritten as a system of first-order ODEs.
There are infinitely many ways to do so, but a straightforward choice is 'controllable canonical form'.

Hence, *each* edge is represented by a 4-tuple of real-valued matrices (A, B, C, D).
        A in R^{n x n}   (R stands for real numbers)
        B in R^{n x 1}   (1 -> single input)
        C in R^{1 x n}   (1-> single output)
        D in R^{1 x 1}   (dito)

The transfer function has the same input-output dynamics as the system
        dx / dt = A * x + B * input
        output = C * x + D * input
The vector `x in R^n` is the local state (i.e. local to a particular edge / transfer function).

Looking at one node, the outputs of all edges which are connected to that node with their output end are summed together.
This sum is then fed as the input to all edges which are connected to that node with their input end.

It is the ultimate goal to assemble a matrix `A_global` which is right-multiplied by a global state vector `x_global`.
This matrix is built by appending A matrices of all edges in a block-diagonal way.
Matrices B, C, D of all edges are necessary to add off-diagonal entries accounting for the interconnection of components (i.e. edges) (cf. paragraph above).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181205/69e9ac20/attachment-0001.html>


More information about the petsc-users mailing list