- Subject: RE: Looking for C/C++ (and S-Lang) programmers for testing
- From: "Olesen, Mark" <Mark.Olesen@xxxxxxxxxxxxxxxx>
- Date: Mon, 13 Nov 2006 10:46:00 +0100
Hi John,
> I was unable to find any coding standard document for the OpenFoam
> project.
I have emacs defs from the OpenFOAM principal if you wish, but no idea how
well they really work and how much hand indentation has been taken.
> So I downloaded the code to see the style for myself. There
> I managed to get a feeling for the style as reflected by such code
> fragments as these:
>
> return
> (
> position_
> + iRadius
> * (
> tangentialInjectionVector1_*cos(iAngle)
> + tangentialInjectionVector2_*sin(iAngle)
> )
> );
This first fragment should be handled correctly by the updated cmode.
IMO, automatically indenting the second fragment is beyond the scope of an
editor:
> scalar tauStrip =
> Cs_ * p.d()
> * sqrt
> (
> fuels.rho(pressure, p.T(), p.X())
> / rhoAverage
> )
> / mag(p.Urel(vel));
Adding parentheses is a very acceptable alternative that would help with
many of the indentation issues.
> I have not had any luck properly indenting the above code using either
> your version of cmode.sl or mine. In fact, I spent more time trying
> to make the code work than it took for me to write a specialized
> "foam_mode" that seems to work pretty well.
If the standard cmode doesn't manage construct 2, it's not particularly
tragic.
> However, it requires the latest version of my cmode.sl, which is in
> jed's svn repository (0.99.19-38).
Apart from the operator outdent sugar, the standard c-mode I think that the
foam indentation should be possible - the strangeness with
"cout << .. " etc is common to lots of C++ code.
I'd like to try your new code, but the cvs/svn ports are closed. Could you
send it directly, or place it somewhere else (ftp/http)?
/mark
This e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of ArvinMeritor, Inc., its affiliates, or third parties. This notice serves as marking of its ?Confidential? status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]