← Back to team overview

yade-users team mailing list archive

Re: [Question #137115]: Commit new files to trunk

 

Question #137115 on Yade changed:
https://answers.launchpad.net/yade/+question/137115

    Status: Open => Answered

Václav Šmilauer proposed the following answer:
Hi,

you're right that short names are fine capitalized (since there is no
danger that a type would be named As; though Brittleness should be, I
think, lowercased (I did not say that tthe suggestions are some hard
rules or that they are followed everywhere in yade; but you asked for
comments, so there you go :-) ).

I usually put such scripts to scripts/test, do the same. (It is a good
candidate for cleanup btw, there is bunch of junk that does not even
work anymore).

I was looking at your code only briefly. I thought that for
interpolating on the piecewise-linear function, you could find the
lintearInterpolate template useful (in
pkg/common/LinearInterpolate.hpp); the last parameter (called "pos") it
takes holds position from the last interpolation, so next time you
interpolate the same function with x-value (the tt vector) which is
close to the previous one, it will be very likely in that segment
already, or will move just to the neigbouring segment. It could make
some difference with large number of interpolations and/or large number
of segments for the function.

Cheers! v.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.