Skip to content

Commit 49aca94

Browse files
Merge branch 'main' into mkExRnble
2 parents fa2f162 + a5016f7 commit 49aca94

File tree

310 files changed

+3317
-3076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+3317
-3076
lines changed

.github/ISSUE_TEMPLATE/tmpltMeetIssue.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ assignees:
88
- JacquesCarette
99
- smiths
1010
- sarrasoussia
11-
- jackwyand
11+
- B-rando1
12+
- Xinlu-Y
13+
- JoeZZG
14+
1215

1316
---
1417

1518
**Agenda**
1619

1720
1. Blockers for @sarrasoussia
18-
19-
2. Blockers for @jackwyand
21+
2. Blockers for @B-rando1
22+
3. Blockers for @Xinlu-Y
23+
4. Blockers for @JoeZZG
2024

2125
Regrets:
2226

.github/workflows/Build.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
name: "Build & Deploy"
3030
runs-on: ubuntu-22.04
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333

3434
- name: "Update apt package list"
3535
run: |
@@ -65,7 +65,7 @@ jobs:
6565
stack-version: 'latest'
6666

6767
- name: "Cache dependencies"
68-
uses: actions/cache@v4.2.3
68+
uses: actions/cache@v4.2.4
6969
with:
7070
path: |
7171
~/.stack
@@ -127,6 +127,12 @@ jobs:
127127
run: make mdbook_build
128128
if: ${{ steps.changes.outputs.md == 'true' || fromJSON(env.is_deployment) }}
129129

130+
- name: "Extract HTML copies of Jupyter Notebooks"
131+
run: |
132+
sudo apt-get install -y --fix-missing jupyter
133+
make jupyter_html
134+
if: ${{ steps.changes.outputs.md == 'true' || fromJSON(env.is_deployment) }}
135+
130136
- name: "Build website generator"
131137
run: make website
132138

.github/workflows/Lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: "Linter"
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020

2121
# Prepare more specific paths filters
2222
- uses: dorny/paths-filter@v3.0.2
@@ -34,7 +34,7 @@ jobs:
3434
if: ${{ steps.filter.outputs.hs == 'true' }}
3535
uses: haskell-actions/hlint-setup@v2
3636
with: # DO NOT MODIFY THE BELOW LINE MANUALLY -- code/scripts/update_default_stackage.sh is in charge of this!
37-
version: '3.6.1' # HLINT VERSION TIED TO CURRENT TARGET (LTS-22.31)
37+
version: '3.6.1' # HLINT VERSION TIED TO CURRENT TARGET (LTS-22.44)
3838

3939
- name: 'Run HLint'
4040
if: ${{ steps.filter.outputs.hs == 'true' }}

.github/workflows/Wiki.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
if: github.event_name == 'pull_request'
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
with:
1919
fetch-depth: 0
2020

@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
5151
steps:
52-
- uses: actions/checkout@v4
52+
- uses: actions/checkout@v5
5353
with: # Fetch enough history to resolve HEAD^ -- https://github.com/actions/checkout?tab=readme-ov-file#checkout-head
5454
fetch-depth: 2
5555

CITATION.cff

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,7 @@ authors:
105105
given-names: Brandon
106106
email: "brandobosman@gmail.com"
107107
website: "https://github.com/B-rando1"
108+
- family-names: Wyand
109+
given-names: Jack
110+
email: "wyandj@mcmaster.ca"
111+
website: "https://github.com/jackwyand"
797 KB
Binary file not shown.
1.69 MB
Binary file not shown.

code/Makefile

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ INSTALL_E_SUFFIX = _install
7878
DEBUG_E_SUFFIX = _debug
7979
MDBOOK_BUILD_E_SUFFIX = _mdbook_build
8080
MDBOOK_SERVER_E_SUFFIX = _mdbook_server
81+
JUPYTER_HTML_E_SUFFIX = _juphtml
8182

8283
# add example names with the appropriate suffixes to create per-example targets
8384
GEN_EXAMPLES = $(addsuffix $(GEN_E_SUFFIX), $(EXAMPLES))
@@ -92,6 +93,7 @@ INSTALL_EXAMPLES = $(addsuffix $(INSTALL_E_SUFFIX), $(EXAMPLES))
9293
DEBUG_EXAMPLES = $(addsuffix $(DEBUG_E_SUFFIX), $(EXAMPLES))
9394
MDBOOK_BUILD_EXAMPLES = $(addsuffix $(MDBOOK_BUILD_E_SUFFIX), $(EXAMPLES))
9495
MDBOOK_SERVER_EXAMPLES = $(addsuffix $(MDBOOK_SERVER_E_SUFFIX), $(EXAMPLES))
96+
JUPYTER_HTML_EXAMPLES = $(addsuffix $(JUPYTER_HTML_E_SUFFIX), $(EXAMPLES))
9597

9698
# Website names with appropriate suffixes.
9799
TEST_WEBSITE = $(addsuffix $(TEST_E_SUFFIX), $(WEBSITE_FOLDER_NAME))
@@ -113,6 +115,14 @@ ALL_EXPANDED_TARGETS = $(foreach P, $(PACKAGE_GEN_TARGET), $($(P)_PACKAGES)) $(f
113115

114116
# make variables/configuration
115117
DIFF = diff --strip-trailing-cr -r -X ../.gitignore --exclude='*.prof' --exclude='.drasil' # Excludes are to ignore the data the 'debug'-related targets generate.
118+
DIFF_PREFIX ?=
119+
120+
# Run diff and capture both stdout and stderr into a log file. Redirecting
121+
# stderr to stdout to populate logs when issues with performing the diff occurs
122+
# (e.g., when `stable/` does not exist).
123+
# $1: stable path, $2: build path, $3: log path
124+
DO_DIFF = $(DIFF_PREFIX)$(DIFF) "$1" "$2" > "$3" 2>&1
125+
116126
LOG_SUFFIX = _log.log
117127
MIN_STACK_VER = 2.3.1 # Match stack.yaml see PR #2142 for more info.
118128
CACHED_MSV_FILE = .drasil-min-stack-ver
@@ -241,12 +251,15 @@ examples: $(GEN_EXAMPLES) ##@Examples Run all examples (no traceability graphs).
241251
# First build all the Drasil packages, then run all examples and generate graphs for them.
242252
tracegraphs: $(TRACE_GRAPH_EXAMPLES) ##@Examples Run examples with traceability graphs.
243253

244-
# First build all the Drasil packages, run all examples (no traceability graphs),
245-
# and then test the generated contents with those in the stable folder.
246-
test: $(TEST_EXAMPLES) ##@Examples Run all examples and compare against the stable folder examples.
247-
@echo ----------------------------
248-
@echo Make complete, checking logs
249-
@echo ----------------------------
254+
# Build all the Drasil packages (via 'code' dep.), run all examples, and then
255+
# test generated artifacts with stable/. Defer 'diff' exit codes to the log
256+
# checking script.
257+
test: code ##@Examples Test examples en masse against stable, only failing at the end if there were diffs.
258+
@echo "Running tests (ignoring diff exit codes)..."
259+
@$(MAKE) DIFF_PREFIX=- $(TEST_EXAMPLES)
260+
@echo ---------------------------------------
261+
@echo Tests complete, checking logs
262+
@echo ---------------------------------------
250263
@LOG_FOLDER="$(LOG_FOLDER)" LOG_SUFFIX="$(LOG_SUFFIX)" NOISY=$(NOISY) "$(SHELL)" "$(SCRIPT_FOLDER)log_check.sh"
251264

252265
# First builds the website and then tests the generated contenst with those in
@@ -287,15 +300,17 @@ packagedeps: graphmod check_dot
287300
# and then build the generated mdBook projects.
288301
mdbook_build: $(MDBOOK_BUILD_EXAMPLES) ##@Examples Build all generated mdBook projects.
289302

303+
jupyter_html: $(JUPYTER_HTML_EXAMPLES) ##@Examples Extract HTML copies from all Jupyter SRS Notebooks.
304+
290305
#--------------------------------------------------------------#
291306
#--- Targets that are used for individual packages/examples ---#
292307
#--------------------------------------------------------------#
293308
# Use filter to make a target for every package (second argument of filter)
294309
# with an appended suffix (first argument of filter).
295310

296311
# Variables needed to create individual example targets using filter.
297-
%$(GEN_E_SUFFIX) %$(TEST_E_SUFFIX) %$(STABILIZE_E_SUFFIX) %$(BC_E_SUFFIX) %$(TRACE_GRAPH_SUFFIX) %$(INSTALL_E_SUFFIX) %$(MDBOOK_BUILD_E_SUFFIX) %$(MDBOOK_SERVER_E_SUFFIX): EXAMPLE=$(shell echo $* | tr a-z A-Z)
298-
%$(GEN_E_SUFFIX) %$(TEST_E_SUFFIX) %$(STABILIZE_E_SUFFIX) %$(BC_E_SUFFIX) %$(TRACE_GRAPH_SUFFIX) %$(INSTALL_E_SUFFIX) %$(MDBOOK_BUILD_E_SUFFIX) %$(MDBOOK_SERVER_E_SUFFIX): EDIR=$($(EXAMPLE)_DIR)
312+
%$(GEN_E_SUFFIX) %$(TEST_E_SUFFIX) %$(STABILIZE_E_SUFFIX) %$(BC_E_SUFFIX) %$(TRACE_GRAPH_SUFFIX) %$(INSTALL_E_SUFFIX) %$(MDBOOK_BUILD_E_SUFFIX) %$(MDBOOK_SERVER_E_SUFFIX) %$(JUPYTER_HTML_E_SUFFIX): EXAMPLE=$(shell echo $* | tr a-z A-Z)
313+
%$(GEN_E_SUFFIX) %$(TEST_E_SUFFIX) %$(STABILIZE_E_SUFFIX) %$(BC_E_SUFFIX) %$(TRACE_GRAPH_SUFFIX) %$(INSTALL_E_SUFFIX) %$(MDBOOK_BUILD_E_SUFFIX) %$(MDBOOK_SERVER_E_SUFFIX) %$(JUPYTER_HTML_E_SUFFIX): EDIR=$($(EXAMPLE)_DIR)
299314
%$(GEN_E_SUFFIX) %$(TRACE_GRAPH_SUFFIX) %$(INSTALL_E_SUFFIX): EEXE=$($(EXAMPLE)_EXE)
300315

301316
# Build individual Drasil packages. Each package will have the target packageName_build.
@@ -313,15 +328,15 @@ $(filter %$(GEN_E_SUFFIX), $(GEN_EXAMPLES)): %$(GEN_E_SUFFIX):
313328

314329
# Compiles GOOL examples to concrete code (Java, C++, etc.)
315330
$(GOOLTEST)$(GEN_E_SUFFIX):
316-
- rm -rf "$(BUILD_FOLDER)$(GOOLTEST_DIR)"
331+
rm -rf "./$(BUILD_FOLDER)$(GOOLTEST_DIR)"
317332
stack build $(stackArgs) "drasil-code:exe:$(GOOLTEST_EXE)"
318333
@mkdir -p "$(BUILD_FOLDER)$(GOOLTEST_DIR)"
319334
cd "$(BUILD_FOLDER)$(GOOLTEST_DIR)" && $(STACK_EXEC) -- "$(GOOLTEST_EXE)"
320335

321336

322337
$(GOOLTEST)$(TEST_E_SUFFIX): $(GOOLTEST)$(GEN_E_SUFFIX) $(CLEAN_GF_PREFIX)$(LOG_FOLDER_NAME)
323338
@mkdir -p "$(LOG_FOLDER)"
324-
- $(DIFF) "$(STABLE_FOLDER)$(GOOLTEST_DIR)/" "$(BUILD_FOLDER)$(GOOLTEST_DIR)/" > "$(LOG_FOLDER)$(GOOLTEST_DIR)$(LOG_SUFFIX)"
339+
$(call DO_DIFF,$(STABLE_FOLDER)$(GOOLTEST_DIR)/,$(BUILD_FOLDER)$(GOOLTEST_DIR)/,$(LOG_FOLDER)$(GOOLTEST_DIR)$(LOG_SUFFIX))
325340
@LOG_FOLDER="$(LOG_FOLDER)" LOG_SUFFIX="$(LOG_SUFFIX)" NOISY=$(NOISY) "$(SHELL)" "$(SCRIPT_FOLDER)log_check.sh"
326341

327342
# Install individual Drasil examples
@@ -350,41 +365,44 @@ $(filter %$(TRACE_GRAPH_SUFFIX), $(TRACE_GRAPH_EXAMPLES)): %$(TRACE_GRAPH_SUFFIX
350365
# to those in the stable folder. Targets will have the form exampleName_diff.
351366
$(filter %$(TEST_E_SUFFIX), $(TEST_EXAMPLES)): %$(TEST_E_SUFFIX): $(CLEAN_GF_PREFIX)$(LOG_FOLDER_NAME) %$(GEN_E_SUFFIX)
352367
@mkdir -p "$(LOG_FOLDER)"
353-
- $(DIFF) "$(STABLE_FOLDER)$*/" "$(BUILD_FOLDER)$(EDIR)/" > "$(LOG_FOLDER)$(EDIR)$(LOG_SUFFIX)"
368+
$(call DO_DIFF,$(STABLE_FOLDER)$*/,$(BUILD_FOLDER)$(EDIR)/,$(LOG_FOLDER)$(EDIR)$(LOG_SUFFIX))
354369

355370
# Website diff tests. First builds the website and then compares the generated
356371
# contents in the Website folder to those in the stable-website folder.
357372
# Target will have the form Website_diff.
358373
$(filter %$(TEST_E_SUFFIX), $(TEST_WEBSITE)): %$(TEST_E_SUFFIX): $(CLEAN_GF_PREFIX)$(LOG_FOLDER_NAME) website
359374
@mkdir -p "$(LOG_FOLDER)"
360-
- $(DIFF) "$(STABLE_WEBSITE_FOLDER)" "$(WEBSITE_FOLDER)" > "$(LOG_FOLDER)$(WEBSITE_FOLDER_NAME)$(LOG_SUFFIX)"
375+
$(call DO_DIFF,$(STABLE_WEBSITE_FOLDER),$(WEBSITE_FOLDER),$(LOG_FOLDER)$(WEBSITE_FOLDER_NAME)$(LOG_SUFFIX))
361376

362377
# Individual example build cleans. Removes a specific example from the build folder.
363378
# Targets will have the form exampleName_build_clean.
364379
$(filter %$(BC_E_SUFFIX), $(BC_EXAMPLES)): %$(BC_E_SUFFIX):
365-
- rm -rf "$(BUILD_FOLDER)$(EDIR)"
380+
rm -rf "./$(BUILD_FOLDER)$(EDIR)"
366381

367382
# The website build cleans.
368383
# Target will have the form Website_build_clean
369384
$(filter %$(BC_E_SUFFIX), $(BC_WEBSITE)): %$(BC_E_SUFFIX):
370-
- rm -rf "$(WEBSITE_FOLDER)"
385+
rm -rf "./$(WEBSITE_FOLDER)"
371386

372387
# Individual example stabilization. First builds all Drasil packages,
373388
# runs all examples, and then copies contents from the build folder into stable.
374389
# Targets will have the form exampleName_stabilize.
375390
$(filter %$(STABILIZE_E_SUFFIX), $(STABILIZE_EXAMPLES)): %$(STABILIZE_E_SUFFIX): %$(BC_E_SUFFIX) %$(GEN_E_SUFFIX)
376-
- rm -rf "$(STABLE_FOLDER)$*/"
391+
rm -rf "./$(STABLE_FOLDER)$*/"
392+
@mkdir -p "$(STABLE_FOLDER)"
377393
- cp -r "$(BUILD_FOLDER)$(EDIR)" "$(STABLE_FOLDER)$*/"
378394

379395
$(GOOLTEST)$(STABILIZE_E_SUFFIX): $(GOOLTEST)$(GEN_E_SUFFIX)
380-
- rm -rf "$(STABLE_FOLDER)$(GOOLTEST_DIR)/"
396+
rm -rf "./$(STABLE_FOLDER)$(GOOLTEST_DIR)/"
397+
@mkdir -p "$(STABLE_FOLDER)"
381398
- cp -r "$(BUILD_FOLDER)$(GOOLTEST_DIR)/" "$(STABLE_FOLDER)$(GOOLTEST_DIR)"
382399

383400
# The website stabilization. First builds the website, and then copies the
384401
# contents from the website folder into stable-website.
385402
# Target will have the form Website_stabilize.
386403
$(filter %$(STABILIZE_E_SUFFIX), $(STABILIZE_WEBSITE)): %$(STABILIZE_E_SUFFIX): %$(BC_E_SUFFIX) website
387-
- rm -rf "$(STABLE_WEBSITE_FOLDER)"
404+
rm -rf "./$(STABLE_WEBSITE_FOLDER)"
405+
@mkdir -p "$(STABLE_WEBSITE_FOLDER)"
388406
- cp -r "$(WEBSITE_FOLDER)" "$(STABLE_WEBSITE_FOLDER)"
389407

390408
# Generate individual example pdfs. Needs Graphviz to work.
@@ -407,12 +425,16 @@ $(filter %$(MDBOOK_SERVER_E_SUFFIX), $(MDBOOK_SERVER_EXAMPLES)): %$(MDBOOK_SERVE
407425
- "$(SHELL)" "$(SCRIPT_FOLDER)copy_example_assets.sh" "$(BUILD_FOLDER)$(EDIR)/SRS/mdBook"
408426
mdbook serve --open "$(BUILD_FOLDER)$(EDIR)/SRS/mdBook"
409427

428+
# Targets will have the form exampleName_juphtml.
429+
$(filter %$(JUPYTER_HTML_E_SUFFIX), $(JUPYTER_HTML_EXAMPLES)): %$(JUPYTER_HTML_E_SUFFIX): %$(GEN_E_SUFFIX)
430+
jupyter nbconvert --to html "$(BUILD_FOLDER)$(EDIR)/SRS/Jupyter/*.ipynb"
431+
410432
#----------------------------------------------------------------------------------#
411433
#--- Generate analysis of module, class, datatype, and class instance structure ---#
412434
#----------------------------------------------------------------------------------#
413435

414436
graphs: $(GRAPH_PACKAGES) packagedeps ##@Analysis Generate all module dependency graphs.
415-
- echo "Graphs generated in local '$(GRAPH_FOLDER)' folder."
437+
@echo "Graphs generated in local '$(GRAPH_FOLDER)' folder."
416438

417439
# Generate individual package module dependency graphs.
418440
$(filter %$(GRAPH_P_SUFFIX), $(GRAPH_PACKAGES)): %$(GRAPH_P_SUFFIX): graphmod check_dot
@@ -424,7 +446,7 @@ $(filter %$(GRAPH_P_SUFFIX), $(GRAPH_PACKAGES)): %$(GRAPH_P_SUFFIX): graphmod ch
424446
# We also add example to these variables so that we can still
425447
# make the graphs for that folder (although it's technically not a package itself).
426448
analysis: graphmod ##@Analysis Generate a table and some graphs to analyze Drasil's class, datatype, and instance structures.
427-
- rm -rf "$(ANALYSIS_FOLDER)"
449+
rm -rf "./$(ANALYSIS_FOLDER)"
428450
@mkdir -p "$(ANALYSIS_FOLDER)"
429451
cd $(SCRIPT_FOLDER) && stack ClassInstDepGen.hs
430452
cd $(SCRIPT_FOLDER) && stack TypeDepGen.hs
@@ -587,6 +609,7 @@ help: ##@Help Show this help.
587609
@echo " X$(DCP_E_SUFFIX) Get all generated code file paths in the example."
588610
@echo " X$(MDBOOK_BUILD_E_SUFFIX) Build the mdBook SRS of an individual example."
589611
@echo " X$(MDBOOK_SERVER_E_SUFFIX) Launch local server for the mdBook SRS of an individual example."
612+
@echo " X$(JUPYTER_HTML_E_SUFFIX) Extract an HTML copy out of a Juypter Notebook."
590613
@echo ""
591614
@echo "Set a 'DEBUG_ENV' environment variable to 'true' if you want to check out the list of chunks in a Drasil run."
592615
@echo ""
@@ -604,4 +627,4 @@ help_packages: ##@Help Lists all packages.
604627
echo " $$package"; \
605628
done
606629

607-
.PHONY: help setup_debug_vars clean clean_artifacts cleanArtifacts gool code deps hlint hot_hlint analysis tex doc debug test graphs graphmod check_stack nographs graphs website deploy_code_path deploy deploy_lite all install examples tracegraphs doxygen shellcheck mdbook_build $(GOOLTEST) $(ALL_EXPANDED_TARGETS)
630+
.PHONY: help setup_debug_vars clean clean_artifacts cleanArtifacts gool code deps hlint hot_hlint analysis tex doc debug test graphs graphmod check_stack nographs graphs website deploy_code_path deploy deploy_lite all install examples tracegraphs doxygen shellcheck mdbook_build jupyter_html $(GOOLTEST) $(ALL_EXPANDED_TARGETS)

code/drasil-build/stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#
1818
# resolver: ./custom-snapshot.yaml
1919
# resolver: https://example.com/snapshots/2018-01-01.yaml
20-
resolver: lts-22.31
20+
resolver: lts-22.44
2121

2222
# User packages to be built.
2323
# Various formats can be used as shown in the example below.

code/drasil-code/lib/Data/Drasil/ExternalLibraries/ODELibraries.hs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ module Data.Drasil.ExternalLibraries.ODELibraries (
77
-- * Apache Commons (Java)
88
apacheODEPckg, apacheODESymbols,
99
-- * Odeint (C++)
10-
odeintPckg, odeintSymbols
10+
odeintPckg, odeintSymbols, diffCodeChunk,
11+
odeInfoChunks
1112
) where
1213

1314
import Language.Drasil (HasSymbol(symbol), HasUID(uid), MayHaveUnit(getUnit),
1415
HasSpace(typ), Space (Actor, Natural, Real, Void, Boolean, String, Array, Vect), implVar, implVar',
1516
compoundPhrase, nounPhrase, nounPhraseSP, label, sub, Idea(getA), NamedIdea(term), Stage(..),
16-
(+++), dccAWDS, dqd', Definition (defn), (+:+), Sentence (S), DefinedQuantityDict, dqdWr)
17+
(+++), Definition (defn), (+:+), Sentence (S), DefinedQuantityDict, dqdWr, implVarAU')
1718
import Language.Drasil.Display (Symbol(Label, Concat))
1819

1920
import Language.Drasil.Code (Lang(..), ExternalLibrary, Step, Argument,
@@ -630,10 +631,10 @@ odeMethodUnavailable = "Chosen ODE solving method is not available" ++
630631

631632
-- | Change in @X@ chunk constructor (where @X@ is a given argument).
632633
diffCodeChunk :: CodeVarChunk -> CodeVarChunk
633-
diffCodeChunk c = quantvar $ dqd' (dccAWDS (show $ c +++ "d" )
634+
diffCodeChunk c = quantvar $ implVarAU' (show $ c +++ "d" )
634635
(compoundPhrase (nounPhraseSP "change in") (c ^. term))
635-
(S "the change in" +:+ (c ^. defn)) (getA c))
636-
(const (Concat [label "d", symbol c Implementation])) (c ^. typ) (getUnit c)
636+
(S "the change in" +:+ (c ^. defn)) (getA c)
637+
(c ^. typ) (Concat [label "d", symbol c Implementation]) (getUnit c)
637638

638639
-- FIXME: This is surely a hack, but I can't think of a better way right now.
639640
-- | Some libraries use an array instead of a list to internally represent the ODE.
@@ -674,3 +675,14 @@ modifiedODESyst sufx info = map replaceDepVar (odeSyst info)
674675
(replaceDepVar e1) (replaceDepVar e2)
675676
replaceDepVar (Operator ao dd e) = Operator ao dd $ replaceDepVar e
676677
replaceDepVar e = e
678+
679+
-- | Collect all chunks related to a specific ODE
680+
odeInfoChunks :: ODEInfo -> [DefinedQuantityDict]
681+
odeInfoChunks info =
682+
let dv = depVar info
683+
in map dqdWr [ dv
684+
, listToArray dv
685+
, arrayVecDepVar info
686+
, diffCodeChunk dv
687+
, listToArray $ diffCodeChunk dv
688+
]

0 commit comments

Comments
 (0)