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

Annotation of /trunk/gadget/lengthprey.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #include "lengthprey.h"
2 :    
3 :     LengthPrey::LengthPrey(CommentStream& infile, const char* givenname,
4 :     const IntVector& Areas, const TimeClass* const TimeInfo, Keeper* const keeper)
5 :     : Prey(infile, givenname, Areas, TimeInfo, keeper) {
6 :    
7 :     type = LENGTHPREY;
8 :     }
9 :    
10 :     /* Sum number in Prey length groups. Prey length division is not
11 :     * allowed to be finer than stock length division. */
12 :     void LengthPrey::Sum(const PopInfoVector& NumberInArea, int area) {
13 :     int i, inarea = this->areaNum(area);
14 :     preynumber[inarea].Sum(&NumberInArea, *CI);
15 :     total[inarea] = 0.0;
16 :     for (i = 0; i < preynumber.Ncol(inarea); i++) {
17 :     biomass[inarea][i] = preynumber[inarea][i].N * preynumber[inarea][i].W;
18 :     total[inarea] += biomass[inarea][i];
19 :     cons[inarea][i] = 0.0;
20 :     }
21 :     }

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

Powered By FusionForge