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

Plot non-state variables in Decapodes #315

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Plot non-state variables in Decapodes #315

wants to merge 1 commit into from

Conversation

quffaro
Copy link
Collaborator

@quffaro quffaro commented Jan 3, 2025

This feature allows us to plot non-state variables.

Currently, state variables are able to be retrieved from the ODESolution object, and therefore plotted, because they are passed in as initial conditions to the solver. However the variables specified for plotting are stored in a separate field, plotVars, and therefore may not have initial conditions.

The design decision made in this draft PR intends to also endow variables in plotVars with a default initial condition called "Zeros." The initial_conditions function dispatches on Zeroes initial condition type, returning zeros(geometry.dualmesh[:point]).

At the time of opening this draft PR, all variables in the uuid2symb mapping are given Zeroes ICs if they are not specified in the initialConditions field in the JSON.

My question is

  1. should AlgebraicJuliaService restrict giving ICs to just symbols in either initial conditions (ic_specs) or specified to be plotted, or should every variable be given ICs?
  2. Is giving a default IC always valid? For instance if we give Zeroes, what if the model has a singularity at 0?
  3. Are there ways of extracting the trajectories of variables where ICs are not provided? I've checked ODESolution source and I'm doubtful.

@quffaro quffaro added the enhancement New feature or request label Jan 3, 2025
@quffaro quffaro linked an issue Jan 3, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jan 3, 2025

@epatters epatters added the external Work on interfacing with other tools label Jan 3, 2025
@epatters epatters changed the title Plotting Non-State Variables Plot non-state variables in Decapodes Jan 4, 2025
@epatters epatters added the visualization Visualization and plotting label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external Work on interfacing with other tools visualization Visualization and plotting
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Plot a non-state variable via Decapodes
2 participants