From: villberg Date: Wed, 18 Jun 2014 06:27:17 +0000 (+0000) Subject: refs #4960 X-Git-Tag: 1.8.1~21 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=949598884634132259b6b4e3bae68c99c214318f;p=simantics%2Fsysdyn.git refs #4960 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29641 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java index 69688355..77362aa5 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java @@ -48,7 +48,20 @@ public class ElementwiseDivision implements IExpression { result.addElement(ld/rd); } return result; - } else throw new UnsupportedOperationException(); + } else if(left instanceof Array && right instanceof Double) { + Array la = (Array)left; + double rd = (Double)right; + Collection lae = la.elements(); + Iterator li = lae.iterator(); + Array result = new Array(); + for(int i=0;i lae = la.elements(); + Iterator li = lae.iterator(); + Array result = new Array(); + for(int i=0;i