Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Diff of /trunk/gadget/growermemberfunctions.cc
[mareframe] / trunk / gadget / growermemberfunctions.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/growermemberfunctions.cc

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

revision 3, Thu Apr 30 12:52:16 2015 UTC revision 4, Thu Apr 30 17:32:47 2015 UTC
# Line 58  Line 58 
58          part4[j] = part4[j - 1] * (j - 1 + alpha);          part4[j] = part4[j - 1] * (j - 1 + alpha);
59    
60      for (j = 0; j <= maxlengthgroupgrowth; j++)      for (j = 0; j <= maxlengthgroupgrowth; j++)
61          (*_lgrowth)[j][lgroup] = part1[j] * part2[j] * tmppart3 * part4[j];          (*lgrowth)[j][lgroup] = part1[j] * part2[j] * tmppart3 * part4[j];
62    
63      switch (functionnumber) {      switch (functionnumber) {
64        case 1:        case 1:
# Line 72  Line 72 
72          meanw = 0.0;          meanw = 0.0;
73          tmpweight = (NumberInArea[lgroup].W * tmpPower * Lengths->dl()) / Lengths->meanLength(lgroup);          tmpweight = (NumberInArea[lgroup].W * tmpPower * Lengths->dl()) / Lengths->meanLength(lgroup);
74          for (j = 0; j <= maxlengthgroupgrowth; j++) {          for (j = 0; j <= maxlengthgroupgrowth; j++) {
75                  (*_wgrowth)[j][lgroup] = tmpweight * j;                  (*wgrowth)[j][lgroup] = tmpweight * j;
76            meanw += (*_wgrowth)[j][lgroup] * (*_lgrowth)[j][lgroup];            meanw += (*wgrowth)[j][lgroup] * (*lgrowth)[j][lgroup];
77          }          }
78    
79          tmpweight = interpWeightGrowth[inarea][lgroup] - meanw;          tmpweight = interpWeightGrowth[inarea][lgroup] - meanw;
80          for (j = 0; j <= maxlengthgroupgrowth; j++)          for (j = 0; j <= maxlengthgroupgrowth; j++)
81          {          {
82                  aux = (*_wgrowth)[j][lgroup];                  aux = (*wgrowth)[j][lgroup];
83                  (*_wgrowth)[j][lgroup] =  aux + tmpweight;                  (*wgrowth)[j][lgroup] =  aux + tmpweight;
84          }          }
85          break;          break;
86        case 8:        case 8:
87        case 10:        case 10:
88        case 11:        case 11:
89          pow_L = meanlength_vectorPow[lgroup];          pow_L = meanlength_vectorPow[lgroup];
90          if (lgroup != numLenGr) //FIXME ??          if (lgroup != numLenGr) //FIXME for (lgroup = 0; ¿¿¿lgroup < numLenGr????; lgroup++)
91            for (j = 1; j <= maxlengthgroupgrowth; j++)            for (j = 1; j <= maxlengthgroupgrowth; j++)
92                    (*_wgrowth)[j][lgroup] = tmpMult * (meanlength_vectorPow[lgroup + j] - pow_L);                    (*wgrowth)[j][lgroup] = tmpMult * (meanlength_vectorPow[lgroup + j] - pow_L);
93          break;          break;
94        default:        default:
95          handle.logMessage(LOGFAIL, "Error in grower - unrecognised growth function", functionnumber);          handle.logMessage(LOGFAIL, "Error in grower - unrecognised growth function", functionnumber);
# Line 123  Line 123 
123          part4[j] = part4[j - 1] * (j - 1 + alpha);          part4[j] = part4[j - 1] * (j - 1 + alpha);
124    
125      for (j = 0; j <= maxlengthgroupgrowth; j++)      for (j = 0; j <= maxlengthgroupgrowth; j++)
126        (_lgrowth[inarea])[j][lgroup] = part1[j] * part2[j] * tmppart3 * part4[j];        (lgrowth[inarea])[j][lgroup] = part1[j] * part2[j] * tmppart3 * part4[j];
127    }    }
128  }  }

Legend:
Removed from v.3  
changed lines
  Added in v.4

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge