From fdb48d643c1688a82d0e121f28023a6a946fa16b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 7 Feb 2018 14:42:26 +0000 Subject: [PATCH] Comments and formatting --- .../decompositionMethod/decompositionMethod.H | 14 ++- .../parMetisDecomp/parMetisDecomp.H | 8 +- src/foam/db/Time/TimePaths.H | 101 ++++++++++-------- src/foam/db/Time/foamTime.H | 23 ++-- src/foam/db/objectRegistry/objectRegistry.H | 2 +- 5 files changed, 83 insertions(+), 65 deletions(-) diff --git a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H index df4ca9b04..9bf99744a 100644 --- a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H +++ b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H @@ -113,9 +113,11 @@ private: //- Disallow default bitwise assignment void operator=(const decompositionMethod&); - //- load missing libraries to avoid compile-time linking to external dependencies + //- Load missing libraries to avoid compile-time linking + // to external dependencies static void loadExternalLibraries(); + public: //- Runtime type information @@ -177,10 +179,9 @@ public: {} - // Destructor - - virtual ~decompositionMethod() - {} + //- Destructor + virtual ~decompositionMethod() + {} // Member Functions @@ -201,7 +202,6 @@ public: const scalarField& pointWeights ) = 0; - //- Decompose cell clusters // Calls decompose (below) with uniform weights virtual labelList decompose @@ -218,7 +218,6 @@ public: const scalarField& coarseWeights ); - //- Decompose cells with weights with explicitly provided connectivity virtual labelList decompose ( @@ -226,7 +225,6 @@ public: const pointField& cc, const scalarField& cWeights ) = 0; - }; diff --git a/src/decompositionMethods/parMetisDecomp/parMetisDecomp.H b/src/decompositionMethods/parMetisDecomp/parMetisDecomp.H index 7d2b27149..3b7bf1489 100644 --- a/src/decompositionMethods/parMetisDecomp/parMetisDecomp.H +++ b/src/decompositionMethods/parMetisDecomp/parMetisDecomp.H @@ -49,6 +49,7 @@ class parMetisDecomp { // Private data + //- Mesh reference const polyMesh& mesh_; @@ -98,10 +99,9 @@ public: ); - // Destructor - - ~parMetisDecomp() - {} + //- Destructor + virtual ~parMetisDecomp() + {} // Member Functions diff --git a/src/foam/db/Time/TimePaths.H b/src/foam/db/Time/TimePaths.H index 107ca42c4..800cf1d05 100644 --- a/src/foam/db/Time/TimePaths.H +++ b/src/foam/db/Time/TimePaths.H @@ -51,10 +51,19 @@ class TimePaths { // Private data + //- Processor case bool processorCase_; + + //- Root path fileName rootPath_; + + //- Case name fileName case_; + + //- System directory name word system_; + + //- Constant directory name word constant_; @@ -74,61 +83,61 @@ public: // Member functions - //- Return true if this is a processor case - bool processorCase() const - { - return processorCase_; - } + //- Return true if this is a processor case + bool processorCase() const + { + return processorCase_; + } - //- Return root path - const fileName& rootPath() const - { - return rootPath_; - } + //- Return root path + const fileName& rootPath() const + { + return rootPath_; + } - //- Return case name - const fileName& caseName() const - { - return case_; - } + //- Return case name + const fileName& caseName() const + { + return case_; + } - //- Return system name - const word& system() const - { - return system_; - } + //- Return system name + const word& system() const + { + return system_; + } - //- Return system name for the case - // which for parallel runs returns ../system() - fileName caseSystem() const; + //- Return system name for the case + // which for parallel runs returns ../system() + fileName caseSystem() const; - //- Return constant name - const word& constant() const - { - return constant_; - } + //- Return constant name + const word& constant() const + { + return constant_; + } - //- Return constant name for the case - // which for parallel runs returns ../constant() - fileName caseConstant() const; + //- Return constant name for the case + // which for parallel runs returns ../constant() + fileName caseConstant() const; - //- Return path - fileName path() const - { - return rootPath()/caseName(); - } + //- Return path + fileName path() const + { + return rootPath()/caseName(); + } - //- Return system path - fileName systemPath() const - { - return path()/system(); - } + //- Return system path + fileName systemPath() const + { + return path()/system(); + } - //- Return constant path - fileName constantPath() const - { - return path()/constant(); - } + //- Return constant path + fileName constantPath() const + { + return path()/constant(); + } }; diff --git a/src/foam/db/Time/foamTime.H b/src/foam/db/Time/foamTime.H index d035a2c54..4e3936028 100644 --- a/src/foam/db/Time/foamTime.H +++ b/src/foam/db/Time/foamTime.H @@ -104,23 +104,36 @@ public: scientific = ios_base::scientific }; + //- Stop at control names + static const NamedEnum stopAtControlNames_; + + //- Write control names + static const NamedEnum writeControlNames_; + protected: // Protected data + //- Start time index label startTimeIndex_; + + //- Start time scalar startTime_; + + //- End time scalar endTime_; - static const NamedEnum stopAtControlNames_; + //- Stop at stopAtControls stopAt_; - static const NamedEnum writeControlNames_; + //- Write control writeControls writeControl_; + //- Write interval scalar writeInterval_; + //- Purge write label purgeWrite_; mutable FIFOStack previousOutputTimes_; @@ -213,10 +226,8 @@ public: ); - // Destructor - - //- Virtual destructor - virtual ~Time(); + //- Destructor + virtual ~Time(); // Member functions diff --git a/src/foam/db/objectRegistry/objectRegistry.H b/src/foam/db/objectRegistry/objectRegistry.H index 00d6ab1c8..b3d894c05 100644 --- a/src/foam/db/objectRegistry/objectRegistry.H +++ b/src/foam/db/objectRegistry/objectRegistry.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class objectRegistry Declaration + Class objectRegistry Declaration \*---------------------------------------------------------------------------*/ class objectRegistry