From 4f73aeb5eee91a4bf407d7e1fe3e2441d026a0fe Mon Sep 17 00:00:00 2001 From: laurabreiman Date: Thu, 8 Aug 2013 16:44:10 -0400 Subject: [PATCH 1/4] working allMaxTemps? --- heat-diffusion.js | 21 +++++++++++---------- home-screen.css | 4 ++-- perfectSteak.js | 6 +++++- sample.js | 1 - 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/heat-diffusion.js b/heat-diffusion.js index 9adc8af..975155c 100644 --- a/heat-diffusion.js +++ b/heat-diffusion.js @@ -279,22 +279,23 @@ function HeatSolver(startingTemps,timestep,spacestep){ } var cnVector = make_crank_nicolson_vector(); calculate_next_cn(cnVector); - var newMaxTemp = []; - for(var n=0; n maxTemps[maxTemps.length-1][n]){ - newMaxTemp.push(tempArray[tempArray.length-1][n]); - } - else{ - newMaxTemp.push(maxTemps[maxTemps.length-1][n]) - } - } - maxTemps.push(newMaxTemp); } } var arrays = tempArray.length-1 ; var len= tempArray[0].length; var step = arrays/60.0; for(var i=0; i<60*step; i+=step){ + + var newMaxTemp = []; + for(var n=0; n maxTemps[maxTemps.length-1][n]){ + newMaxTemp.push(tempArray[parseInt(i)][n]); + } + else{ + newMaxTemp.push(maxTemps[maxTemps.length-1][n]) + } + } + maxTemps.push(newMaxTemp); grapharray.push(tempArray[parseInt(i)].slice(1,len-1)); diff --git a/home-screen.css b/home-screen.css index 0cdaaac..1f6ac2f 100644 --- a/home-screen.css +++ b/home-screen.css @@ -11,8 +11,8 @@ border: 1px solid black; } -#startModal .modal-footer{ - text-align:center; +.modal-footer{ + text-align:center !important; } /*.dropdown{ diff --git a/perfectSteak.js b/perfectSteak.js index 6486bf2..cb0b4df 100644 --- a/perfectSteak.js +++ b/perfectSteak.js @@ -251,7 +251,11 @@ var clicked=false; var addQuickButton = $(""); var addTextButton = $(""); var saveModal=$(''); - displayDiv.append(saveModal) + var cookDropdown=$(""); + + var quickAddModal=$(''); + $(".cookp").append(cookDropdown); + displayDiv.append(saveModal, quickAddModal) saveBut.on("click", function(){ diff --git a/sample.js b/sample.js index 6694584..e88f475 100644 --- a/sample.js +++ b/sample.js @@ -17,7 +17,6 @@ var calculate=function(data,steak,meatType,first,totalTime){ if(timestep > 39){ //39 is basically the maximum timestep for acceptable accuracy (below 1° error) timestep = 39; } - var myheatsolver = HeatSolver(steak,timestep,spacestep); var Thedata=myheatsolver.sixty_graph_arrays_duration(data); var sampledata=Thedata.temps; From d7af86f0211707ac3f6f88f1c12cfcd28c552ae6 Mon Sep 17 00:00:00 2001 From: laurabreiman Date: Thu, 8 Aug 2013 16:52:13 -0400 Subject: [PATCH 2/4] little fix --- heat-diffusion.js | 2 +- perfectSteak.js | 33 --------------------------------- sample.js | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/heat-diffusion.js b/heat-diffusion.js index 975155c..806b158 100644 --- a/heat-diffusion.js +++ b/heat-diffusion.js @@ -247,7 +247,7 @@ function HeatSolver(startingTemps,timestep,spacestep){ var count=0; var maxTemps=[]; var firstMaxTemp=[]; - for(var i=0;i0;i--) { firstMaxTemp.push(tempArray[0][i]) } diff --git a/perfectSteak.js b/perfectSteak.js index cb0b4df..3a77fcb 100644 --- a/perfectSteak.js +++ b/perfectSteak.js @@ -219,28 +219,6 @@ var clicked=false; var displayDiv = $("
"); displayDiv.append(inputTable); - - // displayDiv.change(function(){ - // model.checkDiv() - // model.buildData(); - // updateTime(); - // for (var j=0; j1) - // {var time=60*parseFloat(timeInSecs[0])+parseFloat(timeInSecs[1]);} - // else{var time=parseFloat(timeInSecs[0]);} - // $("#row"+j+"time").val(model.convertTime(time)) - //} - // } - - - // model.buildData(); - // updateTime(); - - // if(clicked&&model.currentInfo["OKToGraph"]){graph(false)} - - // else{ d3.selectAll(".containters").remove(); - // d3.selectAll(".mysteak").remove(); var addButton; var flipButton; @@ -252,21 +230,10 @@ var clicked=false; var addTextButton = $(""); var saveModal=$(''); var cookDropdown=$(""); - var quickAddModal=$(''); $(".cookp").append(cookDropdown); displayDiv.append(saveModal, quickAddModal) -saveBut.on("click", function(){ - -///var selectName=$("
") -//var name=$("#recipeName").val(); - -//model.saveRecipe(name); - -}); - - var updateTime=function(){ var time=0; for(var i=0;i Date: Thu, 8 Aug 2013 16:54:12 -0400 Subject: [PATCH 3/4] one more --- heat-diffusion.js | 2 +- sample.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/heat-diffusion.js b/heat-diffusion.js index 806b158..5c90248 100644 --- a/heat-diffusion.js +++ b/heat-diffusion.js @@ -247,7 +247,7 @@ function HeatSolver(startingTemps,timestep,spacestep){ var count=0; var maxTemps=[]; var firstMaxTemp=[]; - for(var i=tempArray[0].length-1;i>0;i--) + for(var i=tempArray[0].length-1;i>-1;i--) { firstMaxTemp.push(tempArray[0][i]) } diff --git a/sample.js b/sample.js index cac128a..af0657f 100644 --- a/sample.js +++ b/sample.js @@ -23,6 +23,7 @@ var calculate=function(data,steak,meatType,first,totalTime){ var flame=Thedata.points; var timestep=1/Thedata.step; var maxTemps=Thedata.maxTemps; + console.log(Thedata.allMaxTemps); if(first){ drawFinished(meatType,maxTemps,data,steak[0],0); drawFinished(meatType,maxTemps,data,steak[0],1); From f910eee68400ddca198720ce8b671003f6d616a5 Mon Sep 17 00:00:00 2001 From: laurabreiman Date: Thu, 8 Aug 2013 16:54:21 -0400 Subject: [PATCH 4/4] one more --- sample.js | 1 - 1 file changed, 1 deletion(-) diff --git a/sample.js b/sample.js index af0657f..cac128a 100644 --- a/sample.js +++ b/sample.js @@ -23,7 +23,6 @@ var calculate=function(data,steak,meatType,first,totalTime){ var flame=Thedata.points; var timestep=1/Thedata.step; var maxTemps=Thedata.maxTemps; - console.log(Thedata.allMaxTemps); if(first){ drawFinished(meatType,maxTemps,data,steak[0],0); drawFinished(meatType,maxTemps,data,steak[0],1);