Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formulating Dynam IVPs as C-Sets #5

Open
jpfairbanks opened this issue Aug 29, 2020 · 3 comments
Open

Formulating Dynam IVPs as C-Sets #5

jpfairbanks opened this issue Aug 29, 2020 · 3 comments

Comments

@jpfairbanks
Copy link
Member

@epatters @slibkind, Is this the right formulation for a C-Set of IVPs?

image

Notes: Function and Type are julia types that implement the dynamical system and vector spaces.

@epatters
Copy link
Member

The top half the diagram is the schema for UWDs, which makes sense to me. What do the morphisms puts and tan represent?

@slibkind
Copy link
Collaborator

I assume tan is related to tangent space, but I'm also wondering what puts represents. Does the jt .impl = value ensure that systems agree on their shared boundaries?

Is there a graphic of the C-Set implementation of undirected wiring diagrams? I'm still getting used to this formulation!

@jpfairbanks
Copy link
Member Author

Yeah tan represents the type of the tangent space for a given type. I was trying to keep track of the fact that if states are in units U the tangent vectors will be in U per second. DiffEqs.jl supports unitful quantities in Julia so that would be a requirement.

The puts are the inputs+outputs. I’m realizing now that should be states. When you go to solve the ODE the function you pass to the ODE solver has to take in values for all the states and given you a tangent vector for all the states. The ODEsolver isn’t compositional so it doesn’t know about boundaries or hierarchy at all. The domain of the function you give to the ODEsolver is the state space of the ODE. And the codomain is the tangent space.

The composition structure of the dynamical systems doesn’t relate to the composition of these functions S->T(S). In that to compute compse(f,g) you don’t plug tangent vectors of f into the vector field of g. I think this is an example of our AlgJulia motto “the CCC structure of PLs is not the only categorical structure for computing in science”

The value was getting at the fact that junctions have an object and an initial value. That object has to get mapped to the type of that value. The initial conditions are indexed by junctions to enforce the property that all ports connected to the same junction have the same initial condition.

In the error analysis we talked about having two state spaces that are connected by the matrix P and P^t. The smaller space is indexed by junctions and the larger space is indexed by ports. If a port is connected to a junction by a wire, then that port reads its value from that junction at the beginning of an Euler step. The conversion from junction space to port space is the copying map and from port space to junction space is the adding map. This gives me a good way to eliminate more allocations from the implementation, we can just solve the problem in port space and down select at the end. This goes full ghost node mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants