Skip to content

fix: get direct data offset from the separated dimension#114

Merged
chrispcampbell merged 11 commits into
developfrom
todd/113-direct-data
Sep 27, 2021
Merged

fix: get direct data offset from the separated dimension#114
chrispcampbell merged 11 commits into
developfrom
todd/113-direct-data

Conversation

@ToddFincannon
Copy link
Copy Markdown
Collaborator

@ToddFincannon ToddFincannon commented Sep 16, 2021

Fixes #113.

See #113 for details. New case added to the directdata model.

@ToddFincannon ToddFincannon added this to the 0.6.0 milestone Sep 16, 2021
@chrispcampbell chrispcampbell changed the title get direct data offset from the separated dimension fix: get direct data offset from the separated dimension Sep 23, 2021
Base automatically changed from todd/111-ref-expand to develop September 27, 2021 21:54
Copy link
Copy Markdown
Contributor

@chrispcampbell chrispcampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ToddFincannon Looks good to me. I added one non-blocking comment about error handling but it's more a thought for another day. I'll merge this one shortly.

Comment thread src/EquationGen.js
let ind = sub(this.var.subscripts[0])
indexNum = ind.value
if (this.var.separationDims.length > 1) {
console.error(`WARNING: direct data variable ${this.var.varName} separated on more than one dimension`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a blocking comment because I think we have other existing cases like this (treating unexpected cases as a soft warning), but I wonder if we should make this and similar cases a hard error (exit with non-zero code). At some point it might be good to revisit error handling in SDE to be a bit more fail-fast and consistent with error reporting mechanisms, but that's for another day.

@chrispcampbell chrispcampbell merged commit ebbaa01 into develop Sep 27, 2021
@chrispcampbell chrispcampbell deleted the todd/113-direct-data branch September 27, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Direct data read fails when data dimension is not the first subscript

2 participants