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

View of /trunk/gadget/lengthprey.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Mon Feb 10 17:09:07 2014 UTC (10 years, 3 months ago) by agomez
File size: 750 byte(s)
Initial version based on Gadget 2.2.00
#include "lengthprey.h"

LengthPrey::LengthPrey(CommentStream& infile, const char* givenname,
  const IntVector& Areas, const TimeClass* const TimeInfo, Keeper* const keeper)
  : Prey(infile, givenname, Areas, TimeInfo, keeper) {

  type = LENGTHPREY;
}

/* Sum number in Prey length groups. Prey length division is not
 * allowed to be finer than stock length division. */
void LengthPrey::Sum(const PopInfoVector& NumberInArea, int area) {
  int i, inarea = this->areaNum(area);
  preynumber[inarea].Sum(&NumberInArea, *CI);
  total[inarea] = 0.0;
  for (i = 0; i < preynumber.Ncol(inarea); i++) {
    biomass[inarea][i] = preynumber[inarea][i].N * preynumber[inarea][i].W;
    total[inarea] += biomass[inarea][i];
    cons[inarea][i] = 0.0;
  }
}

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

Powered By FusionForge