diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 1445ad0bc21bfe9eff1be2e6f5fdf04eef92b5ce..51a8ae2b503a66ce1d7d4767c375d3c28e1780de 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -574,12 +574,14 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -# INPUT = $(WM_PROJECT_DIR)/src \ +#INPUT = $(WM_PROJECT_DIR)/src \ # $(WM_PROJECT_DIR)/applications/utilities \ # $(WM_PROJECT_DIR)/applications/solvers # limit input for testing purposes -INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global +INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global \ + $(WM_PROJECT_DIR)/src/OpenFOAM/containers \ + $(WM_PROJECT_DIR)/src/OpenFOAM/primitives # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/etc/settings.csh b/etc/settings.csh index 8b51bb7b412ca5878ad26d933fb822419150b078..d1d9a413fcd9344c9b3e685d658a66d150706376 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -108,6 +108,12 @@ case OpenFOAM: set gmp_version=gmp-4.2.4 set mpfr_version=mpfr-2.4.1 breaksw + case Clang: + # using clang - not gcc + setenv WM_CC 'clang' + setenv WM_CXX 'clang++' + set clang_version=llvm-2.8 + breaksw default: echo echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" @@ -159,6 +165,25 @@ case OpenFOAM: endif unset gcc_version gccDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir + + if ( $?clang_version ) then + set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version + + # Check that the compiler directory can be found + if ( ! -d "$clangDir" ) then + echo + echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" + echo " Cannot find $clangDir installation." + echo " Please install this compiler version or if you wish to use the system compiler," + echo " change the 'compilerInstall' setting to 'system' in this file" + echo + endif + + _foamAddMan $clangDir/man + _foamAddPath $clangDir/bin + endif + unset clang_version clangDir + breaksw endsw diff --git a/etc/settings.sh b/etc/settings.sh index aae19a764b20e359fef52f32e66d2e6a670a1e9f..4a1ce214c32688ee7298a2f02dd7c5321bdf0d3d 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -131,6 +131,12 @@ OpenFOAM) gmp_version=gmp-4.2.4 mpfr_version=mpfr-2.4.1 ;; + Clang) + # using clang - not gcc + export WM_CC='clang' + export WM_CXX='clang++' + clang_version=llvm-2.8 + ;; *) echo echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" @@ -183,6 +189,25 @@ OpenFOAM) fi unset gcc_version gccDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir + + if [ -n "$clang_version" ] + then + clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version + + # Check that the compiler directory can be found + [ -d "$clangDir" ] || { + echo + echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" + echo " Cannot find $clangDir installation." + echo " Please install this compiler version or if you wish to use the system compiler," + echo " change the 'compilerInstall' setting to 'system' in this file" + echo + } + + _foamAddMan $clangDir/share/man + _foamAddPath $clangDir/bin + fi + unset clang_version clangDir ;; esac diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index 48807d2e68393a8e8d7a40428713d2308596b92b..982d5e28dc0321496473f4d4cc1de8d59669781e 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -49,19 +49,19 @@ Class defineTypeNameAndDebug(Foam::fileMonitor, 0); -template<> -const char* Foam::NamedEnum<Foam::fileMonitor::fileState, 3>::names[] = -{ - "unmodified", - "modified", - "deleted" -}; const Foam::NamedEnum<Foam::fileMonitor::fileState, 3> Foam::fileMonitor::fileStateNames_; - namespace Foam { + template<> + const char* Foam::NamedEnum<Foam::fileMonitor::fileState, 3>::names[] = + { + "unmodified", + "modified", + "deleted" + }; + //- Reduction operator for PackedList of fileState class reduceFileStates { diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H index 7e47674b8b78efff001c10fd50e1d53e79cdf946..fb790a3e05cce58808ffd68de4794c908f4fddef 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H @@ -51,6 +51,12 @@ SeeAlso namespace Foam { +// Forward declaration +class PackedBoolList; + +//- @typedef A List of PackedBoolList +typedef List<PackedBoolList> PackedBoolListList; + /*---------------------------------------------------------------------------*\ Class PackedBoolList Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 8f7e0092875ced3fc8409294117b59d5750e27de..d0cb05fc1727747c5fbf850e1657c56964830302 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -59,6 +59,7 @@ template<class T> class SubList; template<class T> class UList; template<class T> Ostream& operator<<(Ostream&, const UList<T>&); +typedef UList<label> labelUList; /*---------------------------------------------------------------------------*\ Class UList Declaration diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index b5d22692f0c9187ffd537e4570f86ec8953e1a3b..51e2fadfe77a4cc749b12a20a27e2dd9b198dfcd 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -32,13 +32,17 @@ License defineTypeNameAndDebug(Foam::UPstream, 0); -template<> -const char* Foam::NamedEnum<Foam::UPstream::commsTypes, 3>::names[] = +namespace Foam { - "blocking", - "scheduled", - "nonBlocking" -}; + template<> + const char* Foam::NamedEnum<Foam::UPstream::commsTypes, 3>::names[] = + { + "blocking", + "scheduled", + "nonBlocking" + }; +} + const Foam::NamedEnum<Foam::UPstream::commsTypes, 3> Foam::UPstream::commsTypeNames; diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index aadcdc7c54b34fcb3683cf0641505809af0c1c5e..487576586bf025995778a59e2289efaca093f33f 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -32,28 +32,31 @@ License defineTypeNameAndDebug(Foam::Time, 0); -template<> -const char* Foam::NamedEnum<Foam::Time::stopAtControls, 4>::names[] = +namespace Foam { - "endTime", - "noWriteNow", - "writeNow", - "nextWrite" -}; + template<> + const char* Foam::NamedEnum<Foam::Time::stopAtControls, 4>::names[] = + { + "endTime", + "noWriteNow", + "writeNow", + "nextWrite" + }; + + template<> + const char* Foam::NamedEnum<Foam::Time::writeControls, 5>::names[] = + { + "timeStep", + "runTime", + "adjustableRunTime", + "clockTime", + "cpuTime" + }; +} const Foam::NamedEnum<Foam::Time::stopAtControls, 4> Foam::Time::stopAtControlNames_; -template<> -const char* Foam::NamedEnum<Foam::Time::writeControls, 5>::names[] = -{ - "timeStep", - "runTime", - "adjustableRunTime", - "clockTime", - "cpuTime" -}; - const Foam::NamedEnum<Foam::Time::writeControls, 5> Foam::Time::writeControlNames_; diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C index 82e74c55c7602f6a935dc8091a649807ade8ac02..008085253d443046669be3c61796c6cb9a6037b4 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C @@ -27,16 +27,19 @@ License // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum -< - Foam::outputFilterOutputControl::outputControls, - 2 ->::names[] = +namespace Foam { - "timeStep", - "outputTime" -}; + template<> + const char* Foam::NamedEnum + < + Foam::outputFilterOutputControl::outputControls, + 2 + >::names[] = + { + "timeStep", + "outputTime" + }; +} const Foam::NamedEnum<Foam::outputFilterOutputControl::outputControls, 2> Foam::outputFilterOutputControl::outputControlNames_; diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduSchedule/lduSchedule.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduSchedule/lduSchedule.H index 7c975627cc40c2c9956207286242bd5228d78a27..3793a5452836a1a402bfd7417cceea5313699bf6 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduSchedule/lduSchedule.H +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduSchedule/lduSchedule.H @@ -42,7 +42,7 @@ namespace Foam // Forward declaration of friend functions and operators -class lduScheduleEntry; +struct lduScheduleEntry; Ostream& operator<<(Ostream& os, const lduScheduleEntry& lb); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index f86bfa49de1934a096ad00a2d767f70e093d8fa2..370a90c89e5919dbe90202aba0d3b79be9bd5ff7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -44,16 +44,20 @@ namespace Foam addToRunTimeSelectionTable(polyPatch, cyclicPolyPatch, word); addToRunTimeSelectionTable(polyPatch, cyclicPolyPatch, dictionary); -} -template<> -const char* Foam::NamedEnum<Foam::cyclicPolyPatch::transformType, 4>::names[] = -{ - "unknown", - "rotational", - "translational", - "noOrdering" -}; + template<> + const char* Foam::NamedEnum + < + Foam::cyclicPolyPatch::transformType, + 4 + >::names[] = + { + "unknown", + "rotational", + "translational", + "noOrdering" + }; +} const Foam::NamedEnum<Foam::cyclicPolyPatch::transformType, 4> Foam::cyclicPolyPatch::transformTypeNames; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortEdges.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortEdges.C index 037aa14717b49e7f1ca8388b64f3d2fc7160e4c0..d4834a6ff690ef7e768d48377ba08d9d8e288af7 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortEdges.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortEdges.C @@ -49,7 +49,7 @@ Foam::PatchTools::sortedEdgeFaces const Field<PointType>& localPoints = p.localPoints(); // create the lists for the various results. (resized on completion) - labelListList& sortedEdgeFaces = labelListList(edgeFaces.size()); + labelListList sortedEdgeFaces(edgeFaces.size()); forAll(edgeFaces, edgeI) { diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C index abaf9c5015acbc743d507c00ea08836802b38550..110754f77a1494ff70167bf1c2ff7acf8cd1389a 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C @@ -29,27 +29,29 @@ License Foam::scalar Foam::intersection::planarTol_ = 0.2; -template<> -const char* Foam::NamedEnum<Foam::intersection::direction, 2>::names[] = +namespace Foam { - "vector", - "contactSphere" -}; + template<> + const char* Foam::NamedEnum<Foam::intersection::direction, 2>::names[] = + { + "vector", + "contactSphere" + }; + + template<> + const char* Foam::NamedEnum<Foam::intersection::algorithm, 3>::names[] = + { + "fullRay", + "halfRay", + "visible" + }; +} const Foam::NamedEnum<Foam::intersection::direction, 2> Foam::intersection::directionNames_; -template<> -const char* Foam::NamedEnum<Foam::intersection::algorithm, 3>::names[] = -{ - "fullRay", - "halfRay", - "visible" -}; - const Foam::NamedEnum<Foam::intersection::algorithm, 3> Foam::intersection::algorithmNames_; - // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/Lists/boolList.H b/src/OpenFOAM/primitives/Lists/boolList.H index 32696a3231e9ed15232b3bfa85695ed64b8f922a..84f31f2bc536d23b2f5696a0d5a09833f055e629 100644 --- a/src/OpenFOAM/primitives/Lists/boolList.H +++ b/src/OpenFOAM/primitives/Lists/boolList.H @@ -21,6 +21,12 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::boolUList + +Description + A UList of bool + Typedef Foam::boolList @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<bool> boolUList; + typedef List<bool> boolList; typedef List<List<bool> > boolListList; } diff --git a/src/OpenFOAM/primitives/Lists/fileNameList.H b/src/OpenFOAM/primitives/Lists/fileNameList.H index 29cb0727ff2ab5e015dbe7537034a37e5f864969..44479127951ff20c79c709b617351256d59f79ff 100644 --- a/src/OpenFOAM/primitives/Lists/fileNameList.H +++ b/src/OpenFOAM/primitives/Lists/fileNameList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::fileNameUList + +Description + A UList of fileNames. + Typedef Foam::fileNameList Description - List of fileNames. + A List of fileNames. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<fileName> fileNameUList; + typedef List<fileName> fileNameList; } diff --git a/src/OpenFOAM/primitives/Lists/labelList.H b/src/OpenFOAM/primitives/Lists/labelList.H index e91e0982f582e0068cf3b8fa65c5fc8255f56742..f89ba637997b42baaa38fec3ced6a1d77c1a83a9 100644 --- a/src/OpenFOAM/primitives/Lists/labelList.H +++ b/src/OpenFOAM/primitives/Lists/labelList.H @@ -25,7 +25,19 @@ Typedef Foam::labelList Description - Label container classes + A List of labels + +Typedef + Foam::labelListList + +Description + A List of labelList + +Typedef + Foam::labelListListList + +Description + A List of labelListList \*---------------------------------------------------------------------------*/ @@ -39,11 +51,11 @@ Description namespace Foam { + // Note: frequently used UList version is located in container itself + typedef List<label> labelList; typedef List<labelList> labelListList; typedef List<labelListList> labelListListList; - - typedef UList<label> unallocLabelList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/Lists/scalarList.H b/src/OpenFOAM/primitives/Lists/scalarList.H index 5b8091f1b60d4a8a3baec61bda2c38c2dc582514..e611c9d0fd2b1010691b4aaac0cad9cf7637dd68 100644 --- a/src/OpenFOAM/primitives/Lists/scalarList.H +++ b/src/OpenFOAM/primitives/Lists/scalarList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::scalarUList + +Description + A UList of scalars. + Typedef Foam::scalarList Description - List of scalars. + A List of scalars. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<scalar> scalarUList; + typedef List<scalar> scalarList; typedef List<scalarList> scalarListList; } diff --git a/src/OpenFOAM/primitives/Lists/sphericalTensorList.H b/src/OpenFOAM/primitives/Lists/sphericalTensorList.H index be62ae7306186ea6979a1feb40f5ea177e7c5c1d..9a8fc80e57714de677e4969af065138cd908db12 100644 --- a/src/OpenFOAM/primitives/Lists/sphericalTensorList.H +++ b/src/OpenFOAM/primitives/Lists/sphericalTensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::sphericalTensorUList + +Description + A UList of sphericalTensors. + Typedef Foam::sphericalTensorList Description - List of sphericalTensors. + A List of sphericalTensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<sphericalTensor> sphericalTensorUList; + typedef List<sphericalTensor> sphericalTensorList; } diff --git a/src/OpenFOAM/primitives/Lists/stringList.H b/src/OpenFOAM/primitives/Lists/stringList.H index 6649229d2d6ad86102a58215f6788332fb33cc19..153b41fb9274b247f3c44f24366825503089f552 100644 --- a/src/OpenFOAM/primitives/Lists/stringList.H +++ b/src/OpenFOAM/primitives/Lists/stringList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::stringUList + +Description + A UList of strings. + Typedef Foam::stringList Description - List of strings. + A List of strings. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<string> stringUList; + typedef List<string> stringList; } diff --git a/src/OpenFOAM/primitives/Lists/symmTensorList.H b/src/OpenFOAM/primitives/Lists/symmTensorList.H index e4dd5e9ece1dc17849788c04651eb7373ae536bc..9039e5798d9a5d15c41c006373a5aa009e42a7e6 100644 --- a/src/OpenFOAM/primitives/Lists/symmTensorList.H +++ b/src/OpenFOAM/primitives/Lists/symmTensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::symmTensorUList + +Description + A UList of symmTensors. + Typedef Foam::symmTensorList Description - List of symmTensors. + A List of symmTensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<symmTensor> symmTensorUList; + typedef List<symmTensor> symmTensorList; } diff --git a/src/OpenFOAM/primitives/Lists/tensorList.H b/src/OpenFOAM/primitives/Lists/tensorList.H index 0c22e4e4eb1c6b70d9b92c9f5cf18e785fbfd63e..fd3a7a9f01d4999ae08f47ca46dca9c4c6d116f4 100644 --- a/src/OpenFOAM/primitives/Lists/tensorList.H +++ b/src/OpenFOAM/primitives/Lists/tensorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::tensorUList + +Description + A UList of tensors. + Typedef Foam::tensorList Description - List of tensors. + A List of tensors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<tensor> tensorUList; + typedef List<tensor> tensorList; } diff --git a/src/OpenFOAM/primitives/Lists/vectorList.H b/src/OpenFOAM/primitives/Lists/vectorList.H index 2fd9fc808795dc2a0cbd3a8f46bd63364640dca0..596f828b266d8b8fa1219269191a6c6e34f0e9d8 100644 --- a/src/OpenFOAM/primitives/Lists/vectorList.H +++ b/src/OpenFOAM/primitives/Lists/vectorList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::vectorUList + +Description + A UList of vectors. + Typedef Foam::vectorList Description - List of vectors. + A List of vectors. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<vector> vectorUList; + typedef List<vector> vectorList; } diff --git a/src/OpenFOAM/primitives/Lists/wordList.H b/src/OpenFOAM/primitives/Lists/wordList.H index 6cd6e71b485b9326b6d77d37e138b0b82dbab04d..8f9fb2638729061ce833c279fe5dfb5c0cd68eea 100644 --- a/src/OpenFOAM/primitives/Lists/wordList.H +++ b/src/OpenFOAM/primitives/Lists/wordList.H @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::wordUList + +Description + A UList of words. + Typedef Foam::wordList Description - List of words. + A List of words. \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<word> wordUList; + typedef List<word> wordList; } diff --git a/src/OpenFOAM/primitives/Lists/wordReList.H b/src/OpenFOAM/primitives/Lists/wordReList.H index eb31391e5680105cfe73d5d0ecc8d4a71e08ae74..31a4793655fdc6ee359fea1be81115b5724b6c48 100644 --- a/src/OpenFOAM/primitives/Lists/wordReList.H +++ b/src/OpenFOAM/primitives/Lists/wordReList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,11 +21,17 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::wordReUList + +Description + A UList of wordRe (word or regular expression) + Typedef Foam::wordReList Description - List of wordRe (word or regular expression) + A List of wordRe (word or regular expression) \*---------------------------------------------------------------------------*/ @@ -39,6 +45,8 @@ Description namespace Foam { + typedef UList<wordRe> wordReUList; + typedef List<wordRe> wordReList; } diff --git a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C index 63419832aff8f394e9910597718d8146f04ddebc..e8a189f0946e4cde7c0b182603597960e840efbc 100644 --- a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C +++ b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C @@ -28,32 +28,35 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* const Foam::labelTensor::typeName = "labelTensor"; - -template<> -const char* Foam::labelTensor::componentNames[] = +namespace Foam { - "xx", "xy", "xz", - "yx", "yy", "yz", - "zx", "zy", "zz" -}; - -template<> -const Foam::labelTensor Foam::labelTensor::zero -( - 0, 0, 0, - 0, 0, 0, - 0, 0, 0 -); - -template<> -const Foam::labelTensor Foam::labelTensor::one -( - 1, 1, 1, - 1, 1, 1, - 1, 1, 1 -); + template<> + const char* const Foam::labelTensor::typeName = "labelTensor"; + + template<> + const char* Foam::labelTensor::componentNames[] = + { + "xx", "xy", "xz", + "yx", "yy", "yz", + "zx", "zy", "zz" + }; + + template<> + const Foam::labelTensor Foam::labelTensor::zero + ( + 0, 0, 0, + 0, 0, 0, + 0, 0, 0 + ); + + template<> + const Foam::labelTensor Foam::labelTensor::one + ( + 1, 1, 1, + 1, 1, 1, + 1, 1, 1 + ); +} // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C index b7473ee50e41d6f410d3bc9b3811bf84d6e3b094..c98da288cf6c63fd19f3630b82a6c445012f84ff 100644 --- a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C +++ b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C @@ -27,17 +27,19 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* const Foam::labelVector::typeName = "labelVector"; +namespace Foam +{ + template<> + const char* const Foam::labelVector::typeName = "labelVector"; -template<> -const char* Foam::labelVector::componentNames[] = {"x", "y", "z"}; + template<> + const char* Foam::labelVector::componentNames[] = {"x", "y", "z"}; -template<> -const Foam::labelVector Foam::labelVector::zero(0, 0, 0); - -template<> -const Foam::labelVector Foam::labelVector::one(1, 1, 1); + template<> + const Foam::labelVector Foam::labelVector::zero(0, 0, 0); + template<> + const Foam::labelVector Foam::labelVector::one(1, 1, 1); +} // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C index 693ae0535dbffb97ed6c5eb1499584a75a58b679..e0dca4a0a0cc7efc8440aaeb8c9f4a5035e75130 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C +++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H index 16d86b7fcfccc2ab66f761a51143e3e8ceea48a4..566f42af6ca3de138db7e830d30d76dcb585871e 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H +++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H index 7cf6ff6e23a2cc512c54e37e26bfe20dbfc10706..713c003064180706e4dc31781682e40a1a6b9630 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H +++ b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 793323e54dd5bc58582f543995d40a8dada01990..5f5fb220afe231762290b679da2cc0808a9c8cc5 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -35,19 +35,21 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum<Foam::directions::directionType, 3>::names[] = +namespace Foam { - "tan1", - "tan2", - "normal" -}; + template<> + const char* Foam::NamedEnum<Foam::directions::directionType, 3>::names[] = + { + "tan1", + "tan2", + "normal" + }; +} const Foam::NamedEnum<Foam::directions::directionType, 3> Foam::directions::directionTypeNames_; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // For debugging diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index b7bbecdc5c994ddf64fca8010c564a15083fff5c..85fa0807507e99cf9cbd958038cbda37ff3ee05f 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -45,15 +45,18 @@ namespace Foam slidingInterface, dictionary ); -} - -template<> -const char* Foam::NamedEnum<Foam::slidingInterface::typeOfMatch, 2>::names[] = -{ - "integral", - "partial" -}; + template<> + const char* Foam::NamedEnum + < + Foam::slidingInterface::typeOfMatch, + 2 + >::names[] = + { + "integral", + "partial" + }; +} const Foam::NamedEnum<Foam::slidingInterface::typeOfMatch, 2> diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H index ef48645d2ba315ca151b83a6af18098252c00a75..3b1e3a6df1f706f1b3bbb4dddf2259e4a50a58e1 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H @@ -21,6 +21,12 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Namespace + Foam::porousMedia + +Description + Namespace for models related to porous media + Class Foam::porousZone diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index bd01c8b2070cbe3b9367cfb406b4cd226c9168d6..4ad492b064a26812115b16770df229ee470b8d31 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -27,15 +27,17 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum<Foam::phaseProperties::phaseType, 4>::names[] = +namespace Foam { - "gas", - "liquid", - "solid", - "unknown" -}; - + template<> + const char* Foam::NamedEnum<Foam::phaseProperties::phaseType, 4>::names[] = + { + "gas", + "liquid", + "solid", + "unknown" + }; +} const Foam::NamedEnum<Foam::phaseProperties::phaseType, 4> Foam::phaseProperties::phaseTypeNames_; diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C index ecb0542578b92c591d2d35741f6206aee992da8a..9a91bcccb0b37a0fe745b1935b506051d270aea1 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C @@ -34,15 +34,19 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* -Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4>::names[] = +namespace Foam { - "inside", - "outside", - "insidePoint", - "none" -}; + template<> + const char* + Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4>::names[] = + { + "inside", + "outside", + "insidePoint", + "none" + }; +} + const Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4> Foam::refinementSurfaces::areaSelectionAlgoNames; @@ -388,7 +392,7 @@ Foam::labelList Foam::refinementSurfaces::getClosedNamedSurfaces() const } -// Get indices of named surfaces with a +// Get indices of named surfaces with a Foam::labelList Foam::refinementSurfaces::getInsidePointNamedSurfaces() const { labelList closed(cellZoneNames_.size()); @@ -411,9 +415,9 @@ Foam::labelList Foam::refinementSurfaces::getInsidePointNamedSurfaces() const // Foam::labelList Foam::refinementSurfaces::countRegions(const triSurface& s) // { // const geometricSurfacePatchList& regions = s.patches(); -// +// // labelList nTris(regions.size(), 0); -// +// // forAll(s, triI) // { // nTris[s[triI].region()]++; @@ -433,15 +437,15 @@ Foam::labelList Foam::refinementSurfaces::getInsidePointNamedSurfaces() const // ) const // { // const searchableSurface& geom = allGeometry_[surfaces_[surfI]]; -// +// // // Get per element the region // labelList region; // geom.getRegion(info, region); -// +// // // Initialise fields to region wise minLevel // minLevelField.setSize(ctrs.size()); // minLevelField = -1; -// +// // forAll(minLevelField, i) // { // if (info[i].hit()) @@ -449,12 +453,12 @@ Foam::labelList Foam::refinementSurfaces::getInsidePointNamedSurfaces() const // minLevelField[i] = minLevel(surfI, region[i]); // } // } -// +// // // Find out if triangle inside shell with higher level // // What level does shell want to refine fc to? // labelList shellLevel; // shells.findHigherLevel(ctrs, minLevelField, shellLevel); -// +// // forAll(minLevelField, i) // { // minLevelField[i] = max(minLevelField[i], shellLevel[i]); diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index db7cb5269f2528af56830df5e6a84e2bf49ac374..9589929aeda44d03e879fbe431cdf40b794a12e5 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -33,13 +33,18 @@ License namespace Foam { + defineTypeNameAndDebug(faceToCell, 0); + addToRunTimeSelectionTable(topoSetSource, faceToCell, word); + addToRunTimeSelectionTable(topoSetSource, faceToCell, istream); -defineTypeNameAndDebug(faceToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, faceToCell, word); - -addToRunTimeSelectionTable(topoSetSource, faceToCell, istream); - + template<> + const char* Foam::NamedEnum<Foam::faceToCell::faceAction, 4>::names[] = + { + "neighbour", + "owner", + "any", + "all" + }; } @@ -51,15 +56,6 @@ Foam::topoSetSource::addToUsageTable Foam::faceToCell::usage_ " of the faces in the faceSet or where all faces are in the faceSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::faceToCell::faceAction, 4>::names[] = -{ - "neighbour", - "owner", - "any", - "all" -}; - const Foam::NamedEnum<Foam::faceToCell::faceAction, 4> Foam::faceToCell::faceActionNames_; diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C index da2feb7e04f0ae80cc6ccb28b3d4a318f8bc02cc..2d5bd7f4d509c5cf3d5cba9fb5da181231d963d3 100644 --- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C +++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C @@ -32,13 +32,16 @@ License namespace Foam { + defineTypeNameAndDebug(faceZoneToCell, 0); + addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, word); + addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, istream); -defineTypeNameAndDebug(faceZoneToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, word); - -addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, istream); - + template<> + const char* Foam::NamedEnum<Foam::faceZoneToCell::faceAction, 2>::names[] = + { + "master", + "slave" + }; } @@ -51,14 +54,6 @@ Foam::topoSetSource::addToUsageTable Foam::faceZoneToCell::usage_ ); -template<> -const char* Foam::NamedEnum<Foam::faceZoneToCell::faceAction, 2>::names[] = -{ - "master", - "slave" -}; - - const Foam::NamedEnum<Foam::faceZoneToCell::faceAction, 2> Foam::faceZoneToCell::faceActionNames_; diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index 359f82fae3d99efdd83f4e96fbb00aeabbf17cd4..ebb3a010b947d2cdae776f807e8e5579156c7dd5 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -33,13 +33,15 @@ License namespace Foam { + defineTypeNameAndDebug(pointToCell, 0); + addToRunTimeSelectionTable(topoSetSource, pointToCell, word); + addToRunTimeSelectionTable(topoSetSource, pointToCell, istream); -defineTypeNameAndDebug(pointToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, pointToCell, word); - -addToRunTimeSelectionTable(topoSetSource, pointToCell, istream); - + template<> + const char* Foam::NamedEnum<Foam::pointToCell::pointAction, 1>::names[] = + { + "any" + }; } @@ -50,13 +52,6 @@ Foam::topoSetSource::addToUsageTable Foam::pointToCell::usage_ " Select all cells with any point in the pointSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::pointToCell::pointAction, 1>::names[] = -{ - "any" -}; - - const Foam::NamedEnum<Foam::pointToCell::pointAction, 1> Foam::pointToCell::pointActionNames_; diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C index a7e5b8c28543a98e0a6f809096e300e3775d7b55..2ff1769c8f9bd301553935142ab8e30947d6f158 100644 --- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C +++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C @@ -34,13 +34,16 @@ License namespace Foam { + defineTypeNameAndDebug(cellToFace, 0); + addToRunTimeSelectionTable(topoSetSource, cellToFace, word); + addToRunTimeSelectionTable(topoSetSource, cellToFace, istream); -defineTypeNameAndDebug(cellToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, cellToFace, word); - -addToRunTimeSelectionTable(topoSetSource, cellToFace, istream); - + template<> + const char* Foam::NamedEnum<Foam::cellToFace::cellAction, 2>::names[] = + { + "all", + "both" + }; } @@ -52,13 +55,6 @@ Foam::topoSetSource::addToUsageTable Foam::cellToFace::usage_ " -both: faces where both neighbours are in the cellSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::cellToFace::cellAction, 2>::names[] = -{ - "all", - "both" -}; - const Foam::NamedEnum<Foam::cellToFace::cellAction, 2> Foam::cellToFace::cellActionNames_; diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index 51c7fb135120c16b68336428e53e03a28475e671..8e272b86dff4e720043331bbeed09e13c469a5ff 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -33,13 +33,16 @@ License namespace Foam { + defineTypeNameAndDebug(pointToFace, 0); + addToRunTimeSelectionTable(topoSetSource, pointToFace, word); + addToRunTimeSelectionTable(topoSetSource, pointToFace, istream); -defineTypeNameAndDebug(pointToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, pointToFace, word); - -addToRunTimeSelectionTable(topoSetSource, pointToFace, istream); - + template<> + const char* Foam::NamedEnum<Foam::pointToFace::pointAction, 2>::names[] = + { + "any", + "all" + }; } @@ -52,13 +55,6 @@ Foam::topoSetSource::addToUsageTable Foam::pointToFace::usage_ " -all points in the pointSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::pointToFace::pointAction, 2>::names[] = -{ - "any", - "all" -}; - const Foam::NamedEnum<Foam::pointToFace::pointAction, 2> Foam::pointToFace::pointActionNames_; diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C index aaa74c8493285c5aff2cb208f3e70b33cee0e3a4..5026b51cfc119cb0aebe2e9dc2d885bafe1a41cb 100644 --- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C +++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C @@ -33,13 +33,15 @@ License namespace Foam { + defineTypeNameAndDebug(cellToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, cellToPoint, word); + addToRunTimeSelectionTable(topoSetSource, cellToPoint, istream); -defineTypeNameAndDebug(cellToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, cellToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, cellToPoint, istream); - + template<> + const char* Foam::NamedEnum<Foam::cellToPoint::cellAction, 1>::names[] = + { + "all" + }; } @@ -50,12 +52,6 @@ Foam::topoSetSource::addToUsageTable Foam::cellToPoint::usage_ " Select all points of cells in the cellSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::cellToPoint::cellAction, 1>::names[] = -{ - "all" -}; - const Foam::NamedEnum<Foam::cellToPoint::cellAction, 1> Foam::cellToPoint::cellActionNames_; diff --git a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C index ff1161b820878d36d47e9c390be8c713733c6022..4d0919f7c88b8a94b266c1e8c47c8093cd69a0f1 100644 --- a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C +++ b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C @@ -33,13 +33,15 @@ License namespace Foam { + defineTypeNameAndDebug(faceToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, faceToPoint, word); + addToRunTimeSelectionTable(topoSetSource, faceToPoint, istream); -defineTypeNameAndDebug(faceToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, faceToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, faceToPoint, istream); - + template<> + const char* Foam::NamedEnum<Foam::faceToPoint::faceAction, 1>::names[] = + { + "all" + }; } @@ -50,12 +52,6 @@ Foam::topoSetSource::addToUsageTable Foam::faceToPoint::usage_ " Select all points of faces in the faceSet\n\n" ); -template<> -const char* Foam::NamedEnum<Foam::faceToPoint::faceAction, 1>::names[] = -{ - "all" -}; - const Foam::NamedEnum<Foam::faceToPoint::faceAction, 1> Foam::faceToPoint::faceActionNames_; diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index bb68be7e9ca57fae64c20350cb7fe97e63664279..f82cf59a90df57b0e3cb87a6a7463c90b617b386 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -34,24 +34,24 @@ namespace Foam defineTypeNameAndDebug(topoSetSource, 0); defineRunTimeSelectionTable(topoSetSource, word); defineRunTimeSelectionTable(topoSetSource, istream); + + template<> + const char* Foam::NamedEnum<Foam::topoSetSource::setAction, 8>::names[] = + { + "clear", + "new", + "invert", + "add", + "delete", + "subset", + "list", + "remove" + }; } Foam::HashTable<Foam::string>* Foam::topoSetSource::usageTablePtr_ = NULL; -template<> -const char* Foam::NamedEnum<Foam::topoSetSource::setAction, 8>::names[] = -{ - "clear", - "new", - "invert", - "add", - "delete", - "subset", - "list", - "remove" -}; - const Foam::NamedEnum<Foam::topoSetSource::setAction, 8> Foam::topoSetSource::actionNames_; diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 80d9c43651a05650720302b075b1b7e0c2c6c94c..accee92b3f77325c0fa0a54b06b94b3f4ba9610b 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -49,17 +49,19 @@ namespace Foam distributedTriSurfaceMesh, dict ); -} - -template<> -const char* -Foam::NamedEnum<Foam::distributedTriSurfaceMesh::distributionType, 3>::names[] = -{ - "follow", - "independent", - "frozen" -}; + template<> + const char* Foam::NamedEnum + < + Foam::distributedTriSurfaceMesh::distributionType, + 3 + >::names[] = + { + "follow", + "independent", + "frozen" + }; +} const Foam::NamedEnum<Foam::distributedTriSurfaceMesh::distributionType, 3> Foam::distributedTriSurfaceMesh::distributionTypeNames_; diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C index 591bc36229c2d637022b4f4b8f1b5f4b96032919..ee3d6e4e8ae331cfd04a403cfff6429449d4fba6 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C @@ -27,12 +27,16 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum<Foam::fieldAverageItem::baseType, 2>::names[] = +namespace Foam { - "iteration", - "time" -}; + template<> + const char* Foam::NamedEnum<Foam::fieldAverageItem::baseType, 2>::names[] = + { + "iteration", + "time" + }; +} + const Foam::NamedEnum<Foam::fieldAverageItem::baseType, 2> Foam::fieldAverageItem::baseTypeNames_; diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index eda5f7434f0e3f46f4b1da64c27f1fdaf23c6da8..c0f715e71621aafe1527f9b2c2a8363cd217812e 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -33,13 +33,15 @@ License defineTypeNameAndDebug(Foam::fieldMinMax, 0); - -template<> -const char* Foam::NamedEnum<Foam::fieldMinMax::modeType, 2>::names[] = +namespace Foam { - "magnitude", - "component" -}; + template<> + const char* Foam::NamedEnum<Foam::fieldMinMax::modeType, 2>::names[] = + { + "magnitude", + "component" + }; +} const Foam::NamedEnum<Foam::fieldMinMax::modeType, 2> diff --git a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C index 49ae674ef6f2d4012804e7a122665728ed9c4247..f26f558fb50cac4044d1b74d51de43c1f9489a3d 100644 --- a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C +++ b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C @@ -37,13 +37,21 @@ defineTypeNameAndDebug(Foam::abortCalculation, 0); // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum<Foam::abortCalculation::actionType, 3>::names[] = +namespace Foam { - "noWriteNow", - "writeNow", - "nextWrite" -}; + template<> + const char* Foam::NamedEnum + < + Foam::abortCalculation::actionType, + 3 + >::names[] = + { + "noWriteNow", + "writeNow", + "nextWrite" + }; +} + const Foam::NamedEnum<Foam::abortCalculation::actionType, 3> Foam::abortCalculation::actionTypeNames_; diff --git a/src/sampling/sampledSet/coordSet/coordSet.C b/src/sampling/sampledSet/coordSet/coordSet.C index bc1237f31085af77d3452e3f038f82315e924d1e..24d6b4174cadc7318b4fe72a2b944aa3f299721a 100644 --- a/src/sampling/sampledSet/coordSet/coordSet.C +++ b/src/sampling/sampledSet/coordSet/coordSet.C @@ -27,15 +27,19 @@ License // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum<Foam::coordSet::coordFormat, 5>::names[] = +namespace Foam { - "xyz", - "x", - "y", - "z", - "distance" -}; + template<> + const char* Foam::NamedEnum<Foam::coordSet::coordFormat, 5>::names[] = + { + "xyz", + "x", + "y", + "z", + "distance" + }; +} + const Foam::NamedEnum<Foam::coordSet::coordFormat, 5> Foam::coordSet::coordFormatNames_; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C index 512746722c880c88b9b73231889870a6566f9b14..dba5a3d470c994e66093b803864f6b18d1a48b22 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -32,6 +32,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace porousMedia { defineTypeNameAndDebug(fixedTemperature, 0); @@ -42,11 +44,12 @@ namespace Foam pZone ); } +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fixedTemperature::fixedTemperature(const porousZone& pZone) +Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone) : thermalModel(pZone, typeName), T_(readScalar(coeffDict_.lookup("T"))) @@ -55,13 +58,13 @@ Foam::fixedTemperature::fixedTemperature(const porousZone& pZone) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // -Foam::fixedTemperature::~fixedTemperature() +Foam::porousMedia::fixedTemperature::~fixedTemperature() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::fixedTemperature::addEnthalpySource +void Foam::porousMedia::fixedTemperature::addEnthalpySource ( const basicThermo& thermo, const volScalarField& rho, diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H index 11c1c7c4426ff6e744ae57209bd7d2cc917e2195..4ae9aab656f1a9821f26c834efd432f0c2a27f11 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::fixedTemperature + Foam::porousMedia::fixedTemperature Description - Fixed temperature model + Fixed temperature model for porous media \*---------------------------------------------------------------------------*/ @@ -40,6 +40,8 @@ Description namespace Foam { +namespace porousMedia +{ /*---------------------------------------------------------------------------*\ Class fixedTemperature Declaration @@ -86,6 +88,10 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace porousMedia + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C index a7c3dfd0177e3ef0190fbfd6fd9dddb1b4fa63a2..b654bef6f699f9106fcdcfd98f9bf5648f492b30 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C @@ -33,20 +33,23 @@ License namespace Foam { - defineTypeNameAndDebug(noThermalModel, 0); - - addToRunTimeSelectionTable - ( - thermalModel, - noThermalModel, - pZone - ); +namespace porousMedia +{ + defineTypeNameAndDebug(noThermalModel, 0); + + addToRunTimeSelectionTable + ( + thermalModel, + noThermalModel, + pZone + ); +} } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::noThermalModel::noThermalModel(const porousZone& pZone) +Foam::porousMedia::noThermalModel::noThermalModel(const porousZone& pZone) : thermalModel(pZone) {} @@ -54,13 +57,13 @@ Foam::noThermalModel::noThermalModel(const porousZone& pZone) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // -Foam::noThermalModel::~noThermalModel() +Foam::porousMedia::noThermalModel::~noThermalModel() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::noThermalModel::addEnthalpySource +void Foam::porousMedia::noThermalModel::addEnthalpySource ( const basicThermo&, const volScalarField&, diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H index af23d09feb2117c8bc126c1d4dd0846efd5f3459..123a9b2fd5602c3a52778d24b04e6f8f7ca37e59 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::noThermalModel + Foam::porousMedia::noThermalModel Description - Dummy model for 'none' option + A dummy thermal model porous media, corresponding to the 'none' option \*---------------------------------------------------------------------------*/ @@ -40,9 +40,11 @@ Description namespace Foam { +namespace porousMedia +{ /*---------------------------------------------------------------------------*\ - Class noThermalModel Declaration + Class noThermalModel Declaration \*---------------------------------------------------------------------------*/ class noThermalModel @@ -59,7 +61,7 @@ public: // Constructors //- Construct from porous zone - noThermalModel(const porousZone& pZone); + noThermalModel(const porousZone&); //- Destructor @@ -78,6 +80,10 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace porousMedia + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C index e8ba858b8cadf6fbac0812db5c44801c2a1aa59b..d7e36c8ed8c1b5d23de3432f0bfd50bb49dc5c9c 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C @@ -29,21 +29,24 @@ License namespace Foam { - defineTypeNameAndDebug(thermalModel, 0); - defineRunTimeSelectionTable(thermalModel, pZone); +namespace porousMedia +{ + defineTypeNameAndDebug(thermalModel, 0); + defineRunTimeSelectionTable(thermalModel, pZone); +} } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::thermalModel::thermalModel(const porousZone& pZone) +Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone) : pZone_(pZone), coeffDict_(dictionary::null) {} -Foam::thermalModel::thermalModel +Foam::porousMedia::thermalModel::thermalModel ( const porousZone& pZone, const word& modelType @@ -56,7 +59,7 @@ Foam::thermalModel::thermalModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // -Foam::thermalModel::~thermalModel() +Foam::porousMedia::thermalModel::~thermalModel() {} diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H index c6bd8619195947001ac952140c9961dc310cb899..bda42db68e2462a9189eab4981eb400073d30bcc 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::thermalModel + Foam::porousMedia::thermalModel Description - Base class for selecting the temperature specification models + Base class to select the temperature specification models for porousMedia \*---------------------------------------------------------------------------*/ @@ -43,10 +43,14 @@ Description namespace Foam { +// Forward declaration of classes class basicThermo; +namespace porousMedia +{ + /*---------------------------------------------------------------------------*\ - Class thermalModel Declaration + Class thermalModel Declaration \*---------------------------------------------------------------------------*/ class thermalModel @@ -84,10 +88,10 @@ public: // Constructors //- Construct null from porous zone - thermalModel(const porousZone& pZone); + thermalModel(const porousZone&); //- Construct from porous zone and model type name - thermalModel(const porousZone& pZone, const word& modelType); + thermalModel(const porousZone&, const word& modelType); //- Destructor @@ -95,7 +99,7 @@ public: //- Selector - static autoPtr<thermalModel> New(const porousZone& pZone); + static autoPtr<thermalModel> New(const porousZone&); // Member Functions @@ -110,6 +114,10 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace porousMedia + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C index e97685a3fc6e5a6f355c28011ae163b9999579e8..8b89b7eef1b2dc5d2529c2c4ba97db4a073fa643 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New +Foam::autoPtr<Foam::porousMedia::thermalModel> +Foam::porousMedia::thermalModel::New ( const porousZone& pZone ) @@ -43,7 +44,7 @@ Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New { FatalErrorIn ( - "thermalModel::New(const porousZone&)" + "porousMedia::thermalModel::New(const porousZone&)" ) << "Unknown thermalModel type " << modelType << nl << nl << "Valid thermalModel types are :" << endl @@ -51,7 +52,7 @@ Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New << abort(FatalError); } - return autoPtr<thermalModel>(cstrIter()(pZone)); + return autoPtr<porousMedia::thermalModel>(cstrIter()(pZone)); } diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C index 6e19d7a1775e9957a37aa24f5b2d2c4f2daa67ff..bd5c3783083d900a70f883b1e5a553e242cef0c0 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C @@ -38,7 +38,7 @@ Foam::thermalPorousZone::thermalPorousZone ) : porousZone(key, mesh, dict), - model_(thermalModel::New(*this)) + model_(porousMedia::thermalModel::New(*this)) {} diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H index 3264194939616fe7d8cee000328dcf3977a7bf6f..6164420e8fc5545292c2ee9f81329ccb03170cc2 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H @@ -68,7 +68,7 @@ class thermalPorousZone void operator=(const thermalPorousZone&); //- Thermal model - autoPtr<thermalModel> model_; + autoPtr<porousMedia::thermalModel> model_; public: diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index 1d030286cf989c2d48256fd86dfbc7bd1a8213da..53e2bdc5c8b05cb492814158f6ae9d7a99e2c490 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -33,20 +33,20 @@ License namespace Foam { defineTypeNameAndDebug(alphaContactAngleFvPatchScalarField, 0); -} -template<> -const char* Foam::NamedEnum -< - Foam::alphaContactAngleFvPatchScalarField::limitControls, - 4 ->::names[] = -{ - "none", - "gradient", - "zeroGradient", - "alpha" -}; + template<> + const char* Foam::NamedEnum + < + Foam::alphaContactAngleFvPatchScalarField::limitControls, + 4 + >::names[] = + { + "none", + "gradient", + "zeroGradient", + "alpha" + }; +} const Foam::NamedEnum < diff --git a/wmake/rules/linux64Clang/c b/wmake/rules/linux64Clang/c new file mode 100644 index 0000000000000000000000000000000000000000..7d7d4f61a1bc410e3c4f9e51aca63b28f9f6d91f --- /dev/null +++ b/wmake/rules/linux64Clang/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = clang -m64 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++ new file mode 100644 index 0000000000000000000000000000000000000000..75da3e4ad2ff0bac5116f6987f9113b7ac2dfc53 --- /dev/null +++ b/wmake/rules/linux64Clang/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor + +CC = clang++ -m64 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-60 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed diff --git a/wmake/rules/linux64Clang/c++Debug b/wmake/rules/linux64Clang/c++Debug new file mode 100644 index 0000000000000000000000000000000000000000..19bdb9c3346fc7a69380dfedd6e7911fe220a965 --- /dev/null +++ b/wmake/rules/linux64Clang/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Clang/c++Opt b/wmake/rules/linux64Clang/c++Opt new file mode 100644 index 0000000000000000000000000000000000000000..3363be80905262684d0f126daa1cd6388231184d --- /dev/null +++ b/wmake/rules/linux64Clang/c++Opt @@ -0,0 +1,3 @@ +#c++DBUG = -O0 -DFULLDEBUG -g +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linux64Clang/c++Prof b/wmake/rules/linux64Clang/c++Prof new file mode 100644 index 0000000000000000000000000000000000000000..3bda4dad55e898a8198f6e8bfe21e8d829d7230a --- /dev/null +++ b/wmake/rules/linux64Clang/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Clang/cDebug b/wmake/rules/linux64Clang/cDebug new file mode 100644 index 0000000000000000000000000000000000000000..72b638f458220e329d52b59e3566a3c807101f9d --- /dev/null +++ b/wmake/rules/linux64Clang/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Clang/cOpt b/wmake/rules/linux64Clang/cOpt new file mode 100644 index 0000000000000000000000000000000000000000..17318709f1fa39e6bf89cbe87778bc6fa459de17 --- /dev/null +++ b/wmake/rules/linux64Clang/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Clang/cProf b/wmake/rules/linux64Clang/cProf new file mode 100644 index 0000000000000000000000000000000000000000..ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7 --- /dev/null +++ b/wmake/rules/linux64Clang/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Clang/general b/wmake/rules/linux64Clang/general new file mode 100644 index 0000000000000000000000000000000000000000..809751cd0afab5ce33a04b3c72e266b16b7cc267 --- /dev/null +++ b/wmake/rules/linux64Clang/general @@ -0,0 +1,8 @@ +CPP = cpp -traditional-cpp $(GFLAGS) + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linux64Clang/mplibHPMPI b/wmake/rules/linux64Clang/mplibHPMPI new file mode 100644 index 0000000000000000000000000000000000000000..574492a236a32f7d87d00bf0e3507a5ac8e54f55 --- /dev/null +++ b/wmake/rules/linux64Clang/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi diff --git a/wmake/rules/linuxClang/c b/wmake/rules/linuxClang/c new file mode 100644 index 0000000000000000000000000000000000000000..99b3238306b8c10944010169d73283061bc75aaa --- /dev/null +++ b/wmake/rules/linuxClang/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = clang -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++ new file mode 100644 index 0000000000000000000000000000000000000000..2f7a3bde441a8c169bbd0f11da1ae949c2e5f6df --- /dev/null +++ b/wmake/rules/linuxClang/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = clang++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-60 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed diff --git a/wmake/rules/linuxClang/c++Debug b/wmake/rules/linuxClang/c++Debug new file mode 100644 index 0000000000000000000000000000000000000000..19bdb9c3346fc7a69380dfedd6e7911fe220a965 --- /dev/null +++ b/wmake/rules/linuxClang/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxClang/c++Opt b/wmake/rules/linuxClang/c++Opt new file mode 100644 index 0000000000000000000000000000000000000000..2aedabd6280a3476bc58db13139a0a3aa579502b --- /dev/null +++ b/wmake/rules/linuxClang/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxClang/c++Prof b/wmake/rules/linuxClang/c++Prof new file mode 100644 index 0000000000000000000000000000000000000000..3bda4dad55e898a8198f6e8bfe21e8d829d7230a --- /dev/null +++ b/wmake/rules/linuxClang/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxClang/cDebug b/wmake/rules/linuxClang/cDebug new file mode 100644 index 0000000000000000000000000000000000000000..72b638f458220e329d52b59e3566a3c807101f9d --- /dev/null +++ b/wmake/rules/linuxClang/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxClang/cOpt b/wmake/rules/linuxClang/cOpt new file mode 100644 index 0000000000000000000000000000000000000000..17318709f1fa39e6bf89cbe87778bc6fa459de17 --- /dev/null +++ b/wmake/rules/linuxClang/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxClang/cProf b/wmake/rules/linuxClang/cProf new file mode 100644 index 0000000000000000000000000000000000000000..ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7 --- /dev/null +++ b/wmake/rules/linuxClang/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxClang/general b/wmake/rules/linuxClang/general new file mode 100644 index 0000000000000000000000000000000000000000..97ce8c940c5b38bfcf1ec91f9399bfc3561d13b5 --- /dev/null +++ b/wmake/rules/linuxClang/general @@ -0,0 +1,9 @@ +CPP = cpp -traditional-cpp $(GFLAGS) +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxClang/mplibHPMPI b/wmake/rules/linuxClang/mplibHPMPI new file mode 100644 index 0000000000000000000000000000000000000000..8aff40632bd23af9607d63c4eb675a8de0cd287c --- /dev/null +++ b/wmake/rules/linuxClang/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi