Skip to content

Commit

Permalink
Merge pull request #292 from mgreminger/matrix-index-fix
Browse files Browse the repository at this point in the history
fix: fix dimension handling for matrix indexing (WIP)
  • Loading branch information
mgreminger authored Oct 24, 2024
2 parents c305a3a + e2bd714 commit 29034ca
Show file tree
Hide file tree
Showing 9 changed files with 289 additions and 202 deletions.
250 changes: 132 additions & 118 deletions public/dimensional_analysis.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/PlotCell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,12 @@
</TooltipIcon>
{:else if !unitsValid($results[index][i].data[0].displayInputUnits)}
<TooltipIcon direction="right" align="end">
<span slot="tooltipText">X-axis upper and/or lower limit dimension error{$results[index][i].data[0].asciiInputUnits === "Exponent Not Dimensionless" ? ": Exponent Not Dimensionless": ""}</span>
<span slot="tooltipText">X-axis upper and/or lower limit dimension error{$results[index][i].data[0].asciiInputUnits.startsWith("Dimension Error:") ? $results[index][i].data[0].asciiInputUnits.slice(15) : ""}</span>
<Error class="error"/>
</TooltipIcon>
{:else if !unitsValid($results[index][i].data[0].displayOutputUnits)}
<TooltipIcon direction="right" align="end">
<span slot="tooltipText">Y-axis dimension error{$results[index][i].data[0].asciiOutputUnits === "Exponent Not Dimensionless" ? ": Exponent Not Dimensionless": ""}</span>
<span slot="tooltipText">Y-axis dimension error{$results[index][i].data[0].asciiOutputUnits.startsWith("Dimension Error:") ? $results[index][i].data[0].asciiOutputUnits.slice(15) : ""}</span>
<Error class="error"/>
</TooltipIcon>
{:else if $results[index][i].data[0].unitsMismatch}
Expand Down
4 changes: 2 additions & 2 deletions src/cells/FluidCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ export default class FluidCell extends BaseCell {
name: this.mathField.statement.name,
sympy: `${fluidFuncName}(0,0)`,
params: [],
isExponent: false,
isUnitlessSubExpression: false,
isFunctionArgument: false,
isFunction: false,
exponents: [],
unitlessSubExpressions: [],
implicitParams: [],
functions: [],
arguments: [],
Expand Down
Loading

0 comments on commit 29034ca

Please sign in to comment.