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/growthcalc.cc
[mareframe] / trunk / gadget / growthcalc.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/growthcalc.cc

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

revision 1, Mon Feb 10 17:09:07 2014 UTC revision 2, Wed Apr 29 12:55:30 2015 UTC
# Line 701  Line 701 
701      Lgrowth[i] = (growthPar[0] - LgrpDiv->meanLength(i)) * mult;      Lgrowth[i] = (growthPar[0] - LgrpDiv->meanLength(i)) * mult;
702  }  }
703    
704    
705    
706    void GrowthCalcH::calcGrowth(int area, double* Lgrowth, double* Wgrowth,
707      const PopInfoVector& numGrow, const AreaClass* const Area,
708      const TimeClass* const TimeInfo, const DoubleVector& Fphi,
709      const DoubleVector& MaxCon, const LengthGroupDivision* const LgrpDiv, int size) {
710    
711      growthPar.Update(TimeInfo);
712      //JMB - first some error checking
713      if ((handle.getLogLevel() >= LOGWARN) && (growthPar.didChange(TimeInfo))) {
714        if (isZero(growthPar[1]) || isZero(growthPar[2]))
715          handle.logMessage(LOGWARN, "Warning in growth calculation - growth parameter is zero");
716        if (LgrpDiv->maxLength() > growthPar[0])
717          handle.logMessage(LOGWARN, "Warning in growth calculation - length greater than length infinity");
718      }
719    
720      double mult = 1.0 - exp(-growthPar[1] * TimeInfo->getTimeStepSize());
721      int i;
722      for (i = 0; i < size; i++)
723        Lgrowth[i] = (growthPar[0] - LgrpDiv->meanLength(i)) * mult;
724    }
725    
726    
727    
728    
729    
730  // ********************************************************  // ********************************************************
731  // Functions for GrowthCalcI  // Functions for GrowthCalcI
732  // ********************************************************  // ********************************************************

Legend:
Removed from v.1  
changed lines
  Added in v.2

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

Powered By FusionForge