From 35eac2b9a3f28090bc386182b262ffc4e7979a30 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 1 Mar 2009 20:31:47 +0000 Subject: [PATCH 1/5] Better tagging support. --- bin/foamEbrowse | 15 +++++------ bin/foamTags | 56 +++++++++++++++++++++++++++++++++++++++++ bin/tools/gtagsrc | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 7 deletions(-) create mode 100755 bin/foamTags create mode 100644 bin/tools/gtagsrc diff --git a/bin/foamEbrowse b/bin/foamEbrowse index e303a77264..66fafc1e2b 100755 --- a/bin/foamEbrowse +++ b/bin/foamEbrowse @@ -27,26 +27,27 @@ # foamEbrowse # # Description -# Build the Ebrowse database for all the .C and .H files +# Build the Ebrowse database for all the .H and .C files # #------------------------------------------------------------------------------ -headersFile=${TMPDIR:-/tmp}/headersFile.$$ sourcesFile=${TMPDIR:-/tmp}/sourcesFile.$$ if [ $# -ne 0 ]; then echo "Usage : ${0##*/}" echo "" - echo "Build the Ebrowse dadbase for all the .C and .H files" + echo "Build the Ebrowse dadbase for all the .H and .C files" echo "" exit 1 fi # Clean up on termination and on Ctrl-C -trap 'rm -f $headersFile $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT +trap 'rm -f $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT cd $WM_PROJECT_DIR -find -H . -name "*.H" | fgrep -v lnInclude > $headersFile -find -H . -name "*.C" | fgrep -v lnInclude > $sourcesFile -ebrowse --files=$headersFile --files=$sourcesFile --output-file=.ebrowse +mkdir .tags 2>/dev/null +cd .tags + +find -H .. \( -name "*.[HC]" -not -name "lnInclude" -not -name "Doxygen" \) -print > $sourcesFile +ebrowse --files=$sourcesFile --output-file=ebrowse #------------------------------------------------------------------------------ diff --git a/bin/foamTags b/bin/foamTags new file mode 100755 index 0000000000..1cfd186f52 --- /dev/null +++ b/bin/foamTags @@ -0,0 +1,56 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Script +# foamTags +# +# Description +# Build the tags files for all the .C and .H files +# +#------------------------------------------------------------------------------ + +if [ $# -ne 0 ]; then + echo "Usage : ${0##*/}" + echo "" + echo "Build the tags files for all the .C and .H files" + echo "" + exit 1 +fi + +cd $WM_PROJECT_DIR +mkdir .tags 2>/dev/null + +find -H . \( -name "*.[HC]" -not -name "lnInclude" -not -name "Doxygen" \) | \ + etags --declarations -l c++ -o .tags/etags - +find -H . \( -name "*.[HC]" -not -name "lnInclude" -not -name "Doxygen" \) | \ + etags -l c++ -o .tags/etagsDef - +find -H . \( -name "*.H" -not -name "lnInclude" -not -name "Doxygen" \) | \ + etags --declarations -l c++ -o .tags/etagsDec - + +gtags -i --gtagsconf bin/tools/gtagsrc .tags + +foamEbrowse + +#------------------------------------------------------------------------------ diff --git a/bin/tools/gtagsrc b/bin/tools/gtagsrc new file mode 100644 index 0000000000..ce66e0c084 --- /dev/null +++ b/bin/tools/gtagsrc @@ -0,0 +1,63 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Canfiguration file +# gtagsrc +# +# Description +# Configuration file for gtags(1). +# +#------------------------------------------------------------------------------ +default:\ + :tc=gtags:tc=htags: +#------------------------------------------------------------------------------ +# Configuration for gtags(1) +# See gtags(1). +#------------------------------------------------------------------------------ +common:\ + :skip=GPATH,GTAGS,GRTAGS,GSYMS,HTML/,HTML.pub/,html/,tags,TAGS,ID,.ebrowse,.etags,.etagsDef,.etagsDec,y.tab.c,y.tab.h,.notfunction,cscope.out,cscope.po.out,cscope.in.out,.gdbinit,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,.svn/,.git/,.cvsrc,.cvsignore,.gitignore,.cvspass,.cvswrappers,.deps/,autom4te.cache/,.snprj/:\ + :langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml: +gtags:\ + :tc=common:\ + :GTAGS=gtags-parser %s:\ + :GRTAGS=gtags-parser -r %s:\ + :GSYMS=gtags-parser -s %s:\ + :skip=lnInclude/,tutorials/,wmake/,doc/,lib/,etc/: +# +#------------------------------------------------------------------------------ +# Configuration for htags(1) +#------------------------------------------------------------------------------ +htags:\ + :body_begin=:body_end=:\ + :table_begin=:table_end=
:\ + :title_begin=

:title_end=

:\ + :comment_begin=:comment_end=:\ + :sharp_begin=:sharp_end=:\ + :brace_begin=:brace_end=:\ + :warned_line_begin=:warned_line_end=:\ + :reserved_begin=:reserved_end=:script_alias=/cgi-bin/:\ + :ncol#4:tabs#8:normal_suffix=html:gzipped_suffix=ghtml:\ + :definition_header=no: + +#------------------------------------------------------------------------------ \ No newline at end of file From 9446fecf4963074540e690f8e01149e87db5b022 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 1 Mar 2009 20:32:41 +0000 Subject: [PATCH 2/5] Corrected dimension handling in pow functions. --- .../GeometricScalarField/GeometricScalarField.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C index 70f738fcfb..fa6a2a58d0 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C @@ -154,7 +154,7 @@ tmp > pow pow ( gsf1.dimensions(), - dimensionedScalar("1", 1.0, gsf2.dimensions()) + dimensionedScalar("1", gsf2.dimensions(), 1.0) ) ) ); @@ -183,7 +183,7 @@ tmp > pow pow ( gsf1.dimensions(), - dimensionedScalar("1", 1.0, gsf2.dimensions()) + dimensionedScalar("1", gsf2.dimensions(), 1.0) ) ) ); @@ -214,7 +214,7 @@ tmp > pow pow ( gsf1.dimensions(), - dimensionedScalar("1", 1.0, gsf2.dimensions()) + dimensionedScalar("1", gsf2.dimensions(), 1.0) ) ) ); @@ -247,7 +247,7 @@ tmp > pow pow ( gsf1.dimensions(), - dimensionedScalar("1", 1.0, gsf2.dimensions()) + dimensionedScalar("1", gsf2.dimensions(), 1.0) ) ) ); From c92fc95a04cebe150fd33df3e27f6e9b8dc651a7 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 1 Mar 2009 20:33:41 +0000 Subject: [PATCH 3/5] Added forward declarations of IO operators, see: http://openfoam.cfd-online.com/cgi-bin/forum/show.cgi?126/10948 --- src/meshTools/cellDist/wallPoint/wallPoint.H | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 0544b6ce36..82d6b385af 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -51,6 +51,12 @@ namespace Foam // Forward declaration of classes class polyPatch; class polyMesh; +class wallPoint; + +// Forward declaration of friend functions and operators +Ostream& operator<<(Ostream&, const wallPoint&); +Istream& operator>>(Istream&, wallPoint&); + /*---------------------------------------------------------------------------*\ Class wallPoint Declaration @@ -78,12 +84,15 @@ class wallPoint const scalar tol ); + public: + // Static data members //- initial point far away. static point greatPoint; + // Constructors //- Construct null @@ -102,6 +111,7 @@ public: const wallPoint& ); + // Member Functions // Access @@ -184,11 +194,11 @@ public: const scalar tol ); + // Member Operators // Needed for List IO inline bool operator==(const wallPoint&) const; - inline bool operator!=(const wallPoint&) const; From f94fd4eb919ad44e22453df2d8d73d7f74136937 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 1 Mar 2009 20:35:19 +0000 Subject: [PATCH 4/5] Minor format change. --- .../matrices/lduMatrix/lduMatrix/lduMatrixATmul.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C index 666d84a5c1..05958edf68 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C @@ -60,7 +60,7 @@ void Foam::lduMatrix::Amul interfaceBouCoeffs, interfaces, psi, - Apsi, + Apsi, cmpt ); @@ -79,7 +79,7 @@ void Foam::lduMatrix::Amul register const label nFaces = upper().size(); #ifdef ICC_IA64_PREFETCH - #pragma swp + #pragma swp #endif for (register label face=0; face Date: Sun, 1 Mar 2009 20:39:40 +0000 Subject: [PATCH 5/5] All tags files are now in the .tags directory; ignore it. --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 96c3093b71..150288aae2 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,7 @@ doc/[Dd]oxygen/man # ignore .timeStamp in the main directory /.timeStamp -# ignore .ebrowse in the main directory -/.ebrowse +# ignore .tags in the main directory +/.tags # end-of-file