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

Support for state sol of NamedTuple type #225

Closed
wants to merge 1 commit into from
Closed

Conversation

navidcy
Copy link
Member

@navidcy navidcy commented Nov 18, 2020

This is an attempt to deal with #212.

@glwagner
Copy link
Member

The design requires sol, L, and N to all be NamedTuples with the same names and fields.

The module writers will still provide one function calcN!. However they can use the tuples.

A nice convenience would be that a named tuple value of nothing doesn't error. That will mean that you get correct behavior when typeof(sol.U) isa AbstractArray or when typeof(sol.U) isa Nothing.

Are there any complications with Equation or Problem?

@navidcy
Copy link
Member Author

navidcy commented Nov 18, 2020

Equation struct includes dims which would become a tuple of tuples I guess?
But I'm not even sure if Equation.dims is used...

@navidcy
Copy link
Member Author

navidcy commented Nov 18, 2020

Also

sol = devzeros(dev, eqn.T, eqn.dims)

should be generalized...

@glwagner
Copy link
Member

Also

sol = devzeros(dev, eqn.T, eqn.dims)

should be generalized...

Won't module writers just use

solution = (u=devzeros(...), v=devzeros(...))

why do you need a special utility?

@navidcy
Copy link
Member Author

navidcy commented Nov 19, 2020

True.

sol is constructed automatically based on the dimension of L. But I guess I answered myself; if the user prescribed L appropriately the everything should follow through.

@glwagner
Copy link
Member

True.

sol is constructed automatically based on the dimension of L. But I guess I answered myself; if the user prescribed L appropriately the everything should follow through.

user: "module writer", I think you mean.

@navidcy
Copy link
Member Author

navidcy commented Jul 1, 2022

I'm closing this for now

@navidcy navidcy closed this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants