Skip to content

Commit

Permalink
Merge pull request #1 from r03ert0/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
katjaq committed Jul 24, 2015
2 parents 9dfe4c0 + 7182d77 commit c1ab8c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions display.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ function animate() {

display.mesh.needsUpdate=true;
display.geometry.colorsNeedUpdate=true;

$("#log").html("t: "+simulation.time.toFixed(4)+" Ue:"+simulation.me.Ue.toFixed(2));
}
/**
Color map: from dark blue to dark red for negative to positive values
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div style="font-family:sans-serif;font-size:12px;border:thin solid #bbb;padding:5px;position:absolute;top:10px;left:10px;z-index:10;background-color:rgba(255,255,255,0.8)">
<table id="params"></table>
<!-- <div id="log" style="border:thin solid lightGrey;padding:10px"></div> -->
<div id="log" style="border:thin solid lightGrey;padding:10px"></div>
<button id="restart">Restart</button>
</div>

Expand Down
7 changes: 5 additions & 2 deletions mechanics.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ function tetraElasticity(ge,me) {
Us = 0.5*mu*(trace(B)/Math.pow(J,2/3)-3);
Uv = K*(J-Math.log(J)-1);
Ue += Us + Uv;
}
//console.log(Ue);
}
// store elastic energy values
me.Us=Us;
me.Uv=Uv;
me.Ue=Ue;
}
/**
linElasticity.
Expand Down

0 comments on commit c1ab8c8

Please sign in to comment.