Skip to content

Commit

Permalink
working allMaxTemps?
Browse files Browse the repository at this point in the history
  • Loading branch information
laurabreiman committed Aug 8, 2013
1 parent 221e312 commit 4f73aeb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
21 changes: 11 additions & 10 deletions heat-diffusion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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].length; n++){
if(tempArray[tempArray.length-1][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].length; n++){
if(tempArray[parseInt(i)][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));

Expand Down
4 changes: 2 additions & 2 deletions home-screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
border: 1px solid black;
}

#startModal .modal-footer{
text-align:center;
.modal-footer{
text-align:center !important;
}

/*.dropdown{
Expand Down
6 changes: 5 additions & 1 deletion perfectSteak.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ var clicked=false;
var addQuickButton = $("<button class='btn' id='addQuickButton'>Quick Add</button>");
var addTextButton = $("<button class='btn' id='addTextButton'>Edit Recipe Text</button>");
var saveModal=$('<div id="saveBut" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-body">Please select a name for your recipe <p> <input type="text" id="recipeName"></input><p><button class="btn" data-dismiss="modal" aria-hidden="true">OK</button></div></div>');
displayDiv.append(saveModal)
var cookDropdown=$("<div class='dropdown'><select class='cookDropdown'></select></div>");

var quickAddModal=$('<div id="quickAdd" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h3 id="myModalLabel">Quick Add</h3></div><div class="modal-body"> <p class="cookp">Cook at: </p></div><div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">OK</button></div></div>');
$(".cookp").append(cookDropdown);
displayDiv.append(saveModal, quickAddModal)

saveBut.on("click", function(){

Expand Down
1 change: 0 additions & 1 deletion sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f73aeb

Please sign in to comment.