Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/charisee_dev/examples/det3/det-2-byhand.diderot
ViewVC logotype

Diff of /branches/charisee_dev/examples/det3/det-2-byhand.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3317, Sat Oct 17 02:36:54 2015 UTC revision 3318, Sat Oct 17 04:50:28 2015 UTC
# Line 9  Line 9 
9             if(inside(pos,V)){             if(inside(pos,V)){
10          tensor[3,3] probeQ=V(pos);          tensor[3,3] probeQ=V(pos);
11          tensor[3,3,3] probedelQ=G(pos);          tensor[3,3,3] probedelQ=G(pos);
   
   
12          real qa=probeQ[0,0];          real qa=probeQ[0,0];
13          real qb=probeQ[0,1];          real qb=probeQ[0,1];
14          real qc=probeQ[0,2];          real qc=probeQ[0,2];
# Line 29  Line 27 
27          vec3 dqg=probedelQ[2,0,:];          vec3 dqg=probedelQ[2,0,:];
28          vec3 dqh=probedelQ[2,1,:];          vec3 dqh=probedelQ[2,1,:];
29          vec3 dqi=probedelQ[2,2,:];          vec3 dqi=probedelQ[2,2,:];
   
   
30          real t0=(qe*qi)-(qf*qh);          real t0=(qe*qi)-(qf*qh);
31          real t1=(qd*qi) -(qf*qg);          real t1=(qd*qi) -(qf*qg);
32          real t2=(qd*qh) -(qe*qg);          real t2=(qd*qh) -(qe*qg);
33          //real K=qa*t0 -qb*t1+qc*t2;//determinant of Q          //real K=qa*t0 -qb*t1+qc*t2;//determinant of Q
   
   
34          vec3 r0=(t0*dqa)+qa*((qe*dqi+dqe*qi)-(qf*dqh+dqf*qh));          vec3 r0=(t0*dqa)+qa*((qe*dqi+dqe*qi)-(qf*dqh+dqf*qh));
35          vec3 r1=(t1*dqb)+qb*((qd*dqi+dqd*qi)-(qf*dqg+dqf*qg));          vec3 r1=(t1*dqb)+qb*((qd*dqi+dqd*qi)-(qf*dqg+dqf*qg));
36          vec3 r2=(t2*dqc)+qc*((qd*dqh+dqh*qd)-(qe*dqg+dqe*qg));          vec3 r2=(t2*dqc)+qc*((qd*dqh+dqh*qd)-(qe*dqg+dqe*qg));
37          vec3 out=(r1+r2)•probeQ; //derivative of determinant of Q          vec3 out=(r1+r2)•probeQ; //derivative of determinant of Q
   
   
38          }          }
39        stabilize;        stabilize;
40      }      }

Legend:
Removed from v.3317  
changed lines
  Added in v.3318

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0