Project
People
Skill
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/conversionindex.cc
[mareframe]
/
trunk
/
gadget
/
conversionindex.cc
Repository:
Repository Listing
mareframe
Diff of /trunk/gadget/conversionindex.cc
Parent Directory
|
Revision Log
|
Patch
revision 1, Mon Feb 10 17:09:07 2014 UTC
revision 4, Thu Apr 30 17:32:47 2015 UTC
#
Line 142
Line 142
142
143
//The function interpolates values calculated on a coarse length distribution
//The function interpolates values calculated on a coarse length distribution
144
//Vc to a finer length distribution Vf using the conversionindex CI
//Vc to a finer length distribution Vf using the conversionindex CI
145
void ConversionIndex::interpolateLengths(DoubleVector& Vf, const DoubleVector& Vc) {
void ConversionIndex::interpolateLengths(DoubleVector& Vf, const double* Vc, int size) {
146
147
if (!interpolate)
if (!interpolate)
148
handle.logMessage(LOGFAIL, "Error in conversionindex - cannot interpolate between lengthgroups");
handle.logMessage(LOGFAIL, "Error in conversionindex - cannot interpolate between lengthgroups");
#
Line 158
Line 158
158
159
if (maxlength < Vf.Size())
if (maxlength < Vf.Size())
160
for (i = maxlength; i < Vf.Size(); i++)
for (i = maxlength; i < Vf.Size(); i++)
161
Vf[i] = Vc[Vc.Size() - 1];
Vf[i] = Vc[size - 1];
162
163
} else {
} else {
164
for (i = 0; i < Vf.Size(); i++) {
for (i = 0; i < Vf.Size(); i++) {
#
Line 168
Line 168
168
Vf[i] = (Vc[ipos[i]] * (1.0 - iratio[i])) + (Vc[ipos[i] + 1] * iratio[i]);
Vf[i] = (Vc[ipos[i]] * (1.0 - iratio[i])) + (Vc[ipos[i] + 1] * iratio[i]);
169
}
}
170
}
}
171
172
}
}
Colored Diff
Long Colored Diff
Unidiff
Context Diff
Side by Side
Legend:
Removed from v.1
changed lines
Added in v.4
root@forge.cesga.es
ViewVC Help
Powered by
ViewVC 1.0.0