Revision: 139731 https://trac.macports.org/changeset/139731 Author: michaelld@macports.org Date: 2015-08-25 10:54:45 -0700 (Tue, 25 Aug 2015) Log Message: ----------- octave-ocs: update to 0.1.5. Modified Paths: -------------- trunk/dports/math/octave-ocs/Portfile trunk/dports/math/octave-ocs/files/patch-src-Mshichmanhodgesmosfet.cc.diff Modified: trunk/dports/math/octave-ocs/Portfile =================================================================== --- trunk/dports/math/octave-ocs/Portfile 2015-08-25 17:49:57 UTC (rev 139730) +++ trunk/dports/math/octave-ocs/Portfile 2015-08-25 17:54:45 UTC (rev 139731) @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup octave 1.0 -octave.setup ocs 0.1.4 +octave.setup ocs 0.1.5 platforms darwin license GPL-2+ maintainers gmail.com:mschamschula openmaintainer @@ -12,8 +12,8 @@ electrical circuit equations. long_description ${description} -checksums rmd160 750636fe2f101c079f99e61a5e14c615ed386e9d \ - sha256 0f0ac9457de7d77b94e18989c78d5aa71a1e3363f012bd6e59bb951c1dac2bba +checksums rmd160 fcc669049503009e52ac7b7595c7a4248c779b72 \ + sha256 1370bcde11871e96272216fffc3a5f5b3cc989fe8302456c127d3eb105d02013 depends_lib-append port:octave-odepkg Modified: trunk/dports/math/octave-ocs/files/patch-src-Mshichmanhodgesmosfet.cc.diff =================================================================== --- trunk/dports/math/octave-ocs/files/patch-src-Mshichmanhodgesmosfet.cc.diff 2015-08-25 17:49:57 UTC (rev 139730) +++ trunk/dports/math/octave-ocs/files/patch-src-Mshichmanhodgesmosfet.cc.diff 2015-08-25 17:54:45 UTC (rev 139731) @@ -1,26 +1,24 @@ ---- src/Mshichmanhodgesmosfet.cc.orig 2015-07-07 00:03:42.000000000 -0500 -+++ src/Mshichmanhodgesmosfet.cc 2015-07-09 18:04:13.000000000 -0500 -@@ -123,8 +123,8 @@ +--- src/Mshichmanhodgesmosfet.cc.orig 2015-08-24 16:25:14.000000000 -0400 ++++ src/Mshichmanhodgesmosfet.cc 2015-08-24 16:26:30.000000000 -0400 +@@ -123,7 +123,7 @@ double vb = extvar(3); // V-bulk double T = extvar(4); // Temperature - double k = mu0*Cox*pow((T + Tshift)/300.0,-3.0/2.0)*W/L; -- double dkdT = mu0*Cox*W*(-3.0/2)*pow((T + Tshift)/300.0,-5.0/2.0 )*(1.0/300.0)/L; + double k = mu0*Cox*std::pow((T + Tshift)/300.0,-3.0/2.0)*W/L; -+ double dkdT = mu0*Cox*W*(-3.0/2)*std::pow((T + Tshift)/300.0,-5.0/2.0 )*(1.0/300.0)/L; + double dkdT = mu0*Cox*W*(-3.0/2)*std::pow((T + Tshift)/300.0,-5.0/2.0 )*(1.0/300.0)/L; double vgs = vg - vs; - double vds = vd - vs; @@ -138,10 +138,10 @@ } else if ( ( (vgs-Vth)>= vds ) && (vds>=0)) { -- *ids = k*((vgs-Vth)*vds - pow(vds,2)/2 ) + vds/rd; -+ *ids = k*((vgs-Vth)*vds - std::pow(vds,2)/2 ) + vds/rd; +- *ids = k*((vgs-Vth)*vds - std::pow(vds,2)/2 ) + vds/rd; ++ *ids = k*((vgs-Vth)*vds - std::pow(vds,2.0)/2 ) + vds/rd; *gm = k*vds; *gd = k*(vgs-Vth-vds) + (1/rd); -- *didT = dkdT*((vgs-Vth)*vds-(pow(vds,2))/2); -+ *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2))/2); +- *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2))/2); ++ *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2.0))/2); } else if (((vgs-Vth)>=(vds))&&(vds<0)) { @@ -28,36 +26,25 @@ } else // (i.e. if 0 <= vgs-vth <= vds) { -- *ids = (k/2)*pow((vgs-Vth),2) + vds/rd; -+ *ids = (k/2)*std::pow((vgs-Vth),2) + vds/rd; +- *ids = (k/2)*std::pow((vgs-Vth),2) + vds/rd; ++ *ids = (k/2)*std::pow((vgs-Vth),2.0) + vds/rd; *gm = k*(vgs-Vth); *gd = 1/rd; -- *didT= (dkdT/(2))*pow((vgs-Vth),2); -+ *didT= (dkdT/(2))*std::pow((vgs-Vth),2); +- *didT= (dkdT/(2))*std::pow((vgs-Vth),2); ++ *didT= (dkdT/(2))*std::pow((vgs-Vth),2.0); } *P = -(*ids)*vds; -@@ -177,8 +177,8 @@ - double vb = extvar(3); // V-bulk - double T = extvar(4); // Temperature - -- double k = - mu0*Cox*pow((T + Tshift)/300.0,-3.0/2.0)*W/L; -- double dkdT = - mu0*Cox*W*(-3.0/2.0)*pow((T + Tshift)/300.0,-5.0/2.0 )*(1.0/300.0)/L; -+ double k = - mu0*Cox*std::pow((T + Tshift)/300.0,-3.0/2.0)*W/L; -+ double dkdT = - mu0*Cox*W*(-3.0/2.0)*std::pow((T + Tshift)/300.0,-5.0/2.0 )*(1.0/300.0)/L; - - double vgs = vg - vs; - double vds = vd - vs; @@ -192,10 +192,10 @@ } else if ( ( (vgs-Vth)<= vds ) && (vds<=0)) { -- *ids = k*((vgs-Vth)*vds - pow(vds,2)/2 ) + vds/rd; -+ *ids = k*((vgs-Vth)*vds - std::pow(vds,2)/2 ) + vds/rd; +- *ids = k*((vgs-Vth)*vds - std::pow(vds,2)/2 ) + vds/rd; ++ *ids = k*((vgs-Vth)*vds - std::pow(vds,2.0)/2 ) + vds/rd; *gm = k*vds; *gd = k*(vgs-Vth-vds) + (1/rd); -- *didT = dkdT*((vgs-Vth)*vds-(pow(vds,2))/2); -+ *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2))/2); +- *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2))/2); ++ *didT = dkdT*((vgs-Vth)*vds-(std::pow(vds,2.0))/2); } else if (((vgs-Vth)<=(vds))&&(vds>0)) { @@ -65,12 +52,12 @@ } else // (i.e. if 0 <= vgs-vth <= vds) { -- *ids = (k/2)*pow((vgs-Vth),2) + vds/rd; -+ *ids = (k/2)*std::pow((vgs-Vth),2) + vds/rd; +- *ids = (k/2)*std::pow((vgs-Vth),2) + vds/rd; ++ *ids = (k/2)*std::pow((vgs-Vth),2.0) + vds/rd; *gm = k*(vgs-Vth); *gd = 1/rd; -- *didT= (dkdT/(2))*pow((vgs-Vth),2); -+ *didT= (dkdT/(2))*std::pow((vgs-Vth),2); +- *didT= (dkdT/(2))*std::pow((vgs-Vth),2); ++ *didT= (dkdT/(2))*std::pow((vgs-Vth),2.0); } *P = -(*ids)*vds;
participants (1)
-
michaelld@macports.org