diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.C index 65ef2dd5f..217eedd94 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.C @@ -29,8 +29,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::multiphaseAlphaContactAngleFvPatchScalarField:: -interfaceThetaProps::interfaceThetaProps +Foam::interfaceThetaProps::interfaceThetaProps ( Istream& is ) @@ -45,7 +44,7 @@ interfaceThetaProps::interfaceThetaProps Foam::Istream& Foam::operator>> ( Istream& is, - multiphaseAlphaContactAngleFvPatchScalarField::interfaceThetaProps& tp + interfaceThetaProps& tp ) { is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; @@ -56,8 +55,7 @@ Foam::Istream& Foam::operator>> Foam::Ostream& Foam::operator<< ( Ostream& os, - const - multiphaseAlphaContactAngleFvPatchScalarField::interfaceThetaProps& tp + const interfaceThetaProps& tp ) { os << tp.theta0_ << token::SPACE diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.H index c778cd7d6..decf6c531 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseAlphaContactAngle/multiphaseAlphaContactAngleFvPatchScalarField.H @@ -44,8 +44,86 @@ SourceFiles namespace Foam { +class interfaceThetaProps; + +// Forward declaration of friend functions and operators +Istream& operator>> +( + Istream&, + interfaceThetaProps& +); +Ostream& operator<< +( + Ostream&, + const interfaceThetaProps& +); + /*---------------------------------------------------------------------------*\ - Class multiphaseAlphaContactAngleFvPatch Declaration + Class interfaceThetaProps Declaration +\*---------------------------------------------------------------------------*/ + +class interfaceThetaProps +{ + //- Equilibrium contact angle + scalar theta0_; + + //- Dynamic contact angle velocity scale + scalar uTheta_; + + //- Limiting advancing contact angle + scalar thetaA_; + + //- Limiting receeding contact angle + scalar thetaR_; + + +public: + + // Constructors + interfaceThetaProps() + {} + + interfaceThetaProps(Istream&); + + + // Member functions + + //- Return the equilibrium contact angle theta0 + scalar theta0(bool matched=true) const + { + if (matched) return theta0_; + else return 180.0 - theta0_; + } + + //- Return the dynamic contact angle velocity scale + scalar uTheta() const + { + return uTheta_; + } + + //- Return the limiting advancing contact angle + scalar thetaA(bool matched=true) const + { + if (matched) return thetaA_; + else return 180.0 - thetaA_; + } + + //- Return the limiting receeding contact angle + scalar thetaR(bool matched=true) const + { + if (matched) return thetaR_; + else return 180.0 - thetaR_; + } + + + // IO functions + + friend Istream& operator>>(Istream&, interfaceThetaProps&); + friend Ostream& operator<<(Ostream&, const interfaceThetaProps&); +}; + +/*---------------------------------------------------------------------------*\ + Class multiphaseAlphaContactAngleFvPatch Declaration \*---------------------------------------------------------------------------*/ class multiphaseAlphaContactAngleFvPatchScalarField @@ -54,66 +132,7 @@ class multiphaseAlphaContactAngleFvPatchScalarField { public: - class interfaceThetaProps - { - //- Equilibrium contact angle - scalar theta0_; - - //- Dynamic contact angle velocity scale - scalar uTheta_; - - //- Limiting advancing contact angle - scalar thetaA_; - - //- Limiting receeding contact angle - scalar thetaR_; - - - public: - - // Constructors - interfaceThetaProps() - {} - - interfaceThetaProps(Istream&); - - - // Member functions - - //- Return the equilibrium contact angle theta0 - scalar theta0(bool matched=true) const - { - if (matched) return theta0_; - else return 180.0 - theta0_; - } - - //- Return the dynamic contact angle velocity scale - scalar uTheta() const - { - return uTheta_; - } - - //- Return the limiting advancing contact angle - scalar thetaA(bool matched=true) const - { - if (matched) return thetaA_; - else return 180.0 - thetaA_; - } - - //- Return the limiting receeding contact angle - scalar thetaR(bool matched=true) const - { - if (matched) return thetaR_; - else return 180.0 - thetaR_; - } - - - // IO functions - - friend Istream& operator>>(Istream&, interfaceThetaProps&); - friend Ostream& operator<<(Ostream&, const interfaceThetaProps&); - }; - + // Public typedef typedef HashTable < interfaceThetaProps, diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 7afc21192..587a94ca8 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -187,7 +187,6 @@ mtype {space}"MTYPE:"{space} label curNumberOfNodes = 0; label curNumberOfCells = 0; label curGroupID = 0; - label nFlagsForStream = 0; label curBoundaryPatch = 0; label curPatchFace = 0; %} @@ -427,7 +426,7 @@ mtype {space}"MTYPE:"{space} if (curGroupID > 0) { - FatalErrorIn("gambitToFoam::main") + FatalErrorInFunction << "{space}{label} : " << "trying to reset group ID while active" << abort(FatalError); @@ -479,7 +478,7 @@ mtype {space}"MTYPE:"{space} IStringStream nFlagsStream(YYText()); - nFlagsForStream = readLabel(nFlagsStream); + readLabel(nFlagsStream); BEGIN(cellStreamTitle); } @@ -511,7 +510,6 @@ mtype {space}"MTYPE:"{space} // reset current group ID and a number of flags curGroupID = 0; - nFlagsForStream = 0; } @@ -523,7 +521,6 @@ mtype {space}"MTYPE:"{space} // reset current group ID and a number of flags curGroupID = 0; - nFlagsForStream = 0; BEGIN(INITIAL); } @@ -586,7 +583,7 @@ mtype {space}"MTYPE:"{space} {spaceNl}{label}({scalarList}|\n) { // Vertex-based boundary condition - FatalErrorIn("gambitToFoam::main") + FatalErrorInFunction << "{spaceNl}{label}{scalarList} : " << "boundary condition specified on vertices not supported" << abort(FatalError); @@ -643,12 +640,12 @@ int main(int argc, char *argv[]) # include "createTime.H" - fileName gambitFile(args.additionalArgs()[0]); + const fileName gambitFile(args.additionalArgs()[0]); ifstream gambitStream(gambitFile.c_str()); if (!gambitStream) { - FatalErrorIn("gambitToFoam::main") + FatalErrorInFunction << args.executable() << ": file " << gambitFile << " not found" << abort(FatalError); diff --git a/etc/bashrc b/etc/bashrc index 688bfde0a..0e0720bed 100755 --- a/etc/bashrc +++ b/etc/bashrc @@ -96,17 +96,20 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_DIR/ThirdParty # # For AllMake.stage2 -export WM_THIRD_PARTY_USE_OPENMPI_188=1 +#export WM_THIRD_PARTY_USE_OPENMPI_188=1 #export WM_THIRD_PARTY_USE_OPENMPI_400=1 # # For AllMake.stage3 -export WM_THIRD_PARTY_USE_METIS_510=1 +export METIS_SYSTEM=1 +#export WM_THIRD_PARTY_USE_METIS_510=1 export WM_THIRD_PARTY_USE_PARMGRIDGEN_10=1 -export WM_THIRD_PARTY_USE_LIBCCMIO_261=1 +#export WM_THIRD_PARTY_USE_LIBCCMIO_261=1 export WM_THIRD_PARTY_USE_MESQUITE_230=1 -export WM_THIRD_PARTY_USE_SCOTCH_604=1 -export WM_THIRD_PARTY_USE_PARMETIS_403=1 +export SCOTCH_SYSTEM=1 +#export WM_THIRD_PARTY_USE_SCOTCH_604=1 +export PARMETIS_SYSTEM=1 +#export WM_THIRD_PARTY_USE_PARMETIS_403=1 export WM_THIRD_PARTY_USE_PYFOAM_069=1 export WM_THIRD_PARTY_USE_HWLOC_201=1 @@ -189,7 +192,7 @@ export WM_COMPILER_LIB_ARCH= : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION # WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 -: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB +: ${WM_MPLIB:=SYSTEMOPENMPI}; export WM_MPLIB # WM_NCOMPPROCS = # Warning: Need to use a complete path for foamGetSystemInfo because the PATH diff --git a/etc/cshrc b/etc/cshrc index f3bc7436a..9c2bbb174 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -82,16 +82,19 @@ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_DIR/ThirdParty # # For AllMake.stage2 -setenv WM_THIRD_PARTY_USE_OPENMPI_188 1 +#setenv WM_THIRD_PARTY_USE_OPENMPI_188 1 # # For AllMake.stage3 -setenv WM_THIRD_PARTY_USE_METIS_510 1 +setenv METIS_SYSTEM 1 +#setenv WM_THIRD_PARTY_USE_METIS_510 1 setenv WM_THIRD_PARTY_USE_PARMGRIDGEN_10 1 setenv WM_THIRD_PARTY_USE_LIBCCMIO_261 1 setenv WM_THIRD_PARTY_USE_MESQUITE_230 1 -setenv WM_THIRD_PARTY_USE_SCOTCH_604 1 -setenv WM_THIRD_PARTY_USE_PARMETIS_403 1 +setenv SCOTCH_SYSTEM 1 +#setenv WM_THIRD_PARTY_USE_SCOTCH_604 1 +setenv PARMETIS_SYSTEM 1 +#setenv WM_THIRD_PARTY_USE_PARMETIS_403 1 setenv WM_THIRD_PARTY_USE_PYFOAM_069 1 setenv WM_THIRD_PARTY_USE_HWLOC_201 1 @@ -162,7 +165,8 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Debug # WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 -if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI +setenv WM_MPLIB SYSTEMOPENMPI +#if ( ! $?WM_MPLIB ) setenv WM_MPLIB SYSTEMOPENMPI # WM_NCOMPPROCS = # Warning: Need to use a complete path for foamGetSystemInfo because the PATH diff --git a/etc/settings.csh b/etc/settings.csh index db83f0498..08400c39b 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -201,7 +201,7 @@ case SYSTEMOPENMPI: # make sure not the "old" mpi is used # Not sure if this is necessary anymore. - # export OPAL_PREFIX= + # unsetenv OPAL_PREFIX # Make sure OPENMPI_BIN_DIR is set and valid if ($?OPENMPI_BIN_DIR != 0 ) then @@ -242,7 +242,7 @@ case SYSTEMOPENMPI: setenv MPI_HOME `dirname $OPENMPI_BIN_DIR` setenv MPI_ARCH_PATH $MPI_HOME - setenv OPAL_PREFIX $MPI_ARCH_PATH +#HJ setenv OPAL_PREFIX $MPI_ARCH_PATH # We initialize the rest of the environment using mpicc --showme: if ($?OPENMPI_INCLUDE_DIR == 0) then @@ -513,12 +513,24 @@ endif # Metis library if available # ~~~~~~~~~~~~~~~~~~~~~~~~~~ +if ( $?METIS_SYSTEM) then + setenv METIS_DIR /usr + setenv METIS_BIN_DIR /usr/bin + setenv METIS_LIB_DIR /lib + setenv METIS_INCLUDE_DIR /usr/include +endif if ( $?METIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_METIS_510 != 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ) then _foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh endif # ParMetis library if available # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +if ( $?PARMETIS_SYSTEM) then + setenv PARMETIS_DIR /usr + setenv PARMETIS_BIN_DIR /usr/bin + setenv PARMETIS_LIB_DIR /lib + setenv PARMETIS_INCLUDE_DIR /usr/include +endif if ( $?PARMETIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARMETIS_403 != 0 && -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ) then _foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh endif @@ -538,6 +550,12 @@ endif # Scotch library if available # ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +if ( $?SCOTCH_SYSTEM) then + setenv SCOTCH_DIR /usr + setenv SCOTCH_BIN_DIR /usr/bin + setenv SCOTCH_LIB_DIR /lib + setenv SCOTCH_INCLUDE_DIR /usr/include/scotch +endif if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_604 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ) then _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh endif diff --git a/etc/settings.sh b/etc/settings.sh index 4cf5cb311..90f64f663 100755 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -331,7 +331,7 @@ SYSTEMOPENMPI) export MPI_HOME=`dirname $OPENMPI_BIN_DIR` export MPI_ARCH_PATH=$MPI_HOME - export OPAL_PREFIX=$MPI_ARCH_PATH + #HJ export OPAL_PREFIX=$MPI_ARCH_PATH # We initialize the rest of the environment using mpicc --showme: [ ! -n "${OPENMPI_INCLUDE_DIR}" ] && export OPENMPI_INCLUDE_DIR="`mpicc --showme:incdirs`" @@ -616,6 +616,13 @@ export MPI_BUFFER_SIZE # Load Metis library # ~~~~~~~~~~~~~~~~~~ +[ ! -z "$METIS_SYSTEM" ] && { + export METIS_DIR=/usr + export METIS_BIN_DIR=/usr/bin + export METIS_LIB_DIR=/lib + export METIS_INCLUDE_DIR=/usr/include +} + [ -z "$METIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_METIS_510 ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ] && { _foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.sh } @@ -624,6 +631,13 @@ export MPI_BUFFER_SIZE # Load ParMetis library # ~~~~~~~~~~~~~~~~~~~~~ +[ ! -z "$PARMETIS_SYSTEM" ] && { + export PARMETIS_DIR=/usr + export PARMETIS_BIN_DIR=/usr/bin + export PARMETIS_LIB_DIR=/lib + export PARMETIS_INCLUDE_DIR=/usr/include +} + [ -z "$PARMETIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARMETIS_403 ] && [ -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ] && { _foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.sh } @@ -648,6 +662,13 @@ export MPI_BUFFER_SIZE # Load Scotch library # ~~~~~~~~~~~~~~~~~~~ +[ ! -z "$SCOTCH_SYSTEM" ] && { + export SCOTCH_DIR=/usr + export SCOTCH_BIN_DIR=/usr/bin + export SCOTCH_LIB_DIR=/lib + export SCOTCH_INCLUDE_DIR=/usr/include/scotch +} + [ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_604 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ] && { _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.sh } diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.C b/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.C index 1384e2c09..8cf3905ee 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.C +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.C @@ -44,14 +44,6 @@ Foam::boundaryPatch::boundaryPatch {} -Foam::boundaryPatch::boundaryPatch(const boundaryPatch& sp) -: - patchIdentifier(sp.name(), sp.index(), sp.physicalType()), - size_(sp.size()), - start_(sp.start()) -{} - - Foam::boundaryPatch::boundaryPatch ( const word& name, @@ -71,12 +63,6 @@ Foam::autoPtr Foam::boundaryPatch::clone() const } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::boundaryPatch::~boundaryPatch() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::boundaryPatch::write(Ostream& os) const diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.H b/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.H index 3a31d0377..22109759b 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.H +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/boundaryMesh/boundaryPatch.H @@ -85,16 +85,12 @@ public: const label index ); - //- Construct as copy - boundaryPatch(const boundaryPatch&); - //- Clone autoPtr clone() const; - // Destructor - - ~boundaryPatch(); + //- Destructor + ~boundaryPatch() = default; // Member Functions diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfo.H index 1dd0df734..de6dbf215 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfo.H @@ -145,9 +145,6 @@ public: const vector& n ); - //- Construct as copy - inline directionInfo(const directionInfo&); - // Member Functions diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfoI.H b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfoI.H index 032c2838a..914c8d51b 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/directions/directionInfo/directionInfoI.H @@ -50,14 +50,6 @@ inline Foam::directionInfo::directionInfo {} -// Construct as copy -inline Foam::directionInfo::directionInfo(const directionInfo& w2) -: - index_(w2.index()), - n_(w2.n()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline bool Foam::directionInfo::valid() const diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index c55737a52..b4a5afda6 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H @@ -89,8 +89,6 @@ public: //- Construct from normal inline wallNormalInfo(const vector& normal); - //- Construct as copy - inline wallNormalInfo(const wallNormalInfo&); // Member Functions diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H index da5e8ba5e..96d25558b 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H @@ -69,13 +69,6 @@ inline Foam::wallNormalInfo::wallNormalInfo(const vector& normal) {} -// Construct as copy -inline Foam::wallNormalInfo::wallNormalInfo(const wallNormalInfo& wpt) -: - normal_(wpt.normal()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::vector& Foam::wallNormalInfo::normal() const diff --git a/src/dynamicMesh/dynamicTopoFvMesh/changeMap.H b/src/dynamicMesh/dynamicTopoFvMesh/changeMap.H index f71ef70fb..a562332ae 100644 --- a/src/dynamicMesh/dynamicTopoFvMesh/changeMap.H +++ b/src/dynamicMesh/dynamicTopoFvMesh/changeMap.H @@ -90,20 +90,27 @@ class changeMap public: // Constructor - changeMap() - : - index_(-1), - pIndex_(-1), - type_(-1), - addedPoints_(5), - addedEdges_(5), - addedFaces_(5), - addedCells_(5), - removedPoints_(5), - removedEdges_(5), - removedFaces_(5), - removedCells_(5) - {} + + //- Construct null + changeMap() + : + index_(-1), + pIndex_(-1), + type_(-1), + addedPoints_(5), + addedEdges_(5), + addedFaces_(5), + addedCells_(5), + removedPoints_(5), + removedEdges_(5), + removedFaces_(5), + removedCells_(5) + {} + + //- Copy constructor + // Bugfix, HJ, 5/Jul/2021 + changeMap(const changeMap&) = default; + //- Access diff --git a/src/engine/ignition/ignitionSite.C b/src/engine/ignition/ignitionSite.C index 41023f672..c6fa18598 100644 --- a/src/engine/ignition/ignitionSite.C +++ b/src/engine/ignition/ignitionSite.C @@ -124,20 +124,6 @@ bool ignitionSite::ignited() const } -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -void ignitionSite::operator=(const ignitionSite& is) -{ - location_ = is.location_; - diameter_ = is.diameter_; - time_ = is.time_; - duration_ = is.duration_; - strength_ = is.strength_; - cells_ = is.cells_; - cellVolumes_ = is.cellVolumes_; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/engine/ignition/ignitionSite.H b/src/engine/ignition/ignitionSite.H index adf0300a9..0f42c0b0a 100644 --- a/src/engine/ignition/ignitionSite.H +++ b/src/engine/ignition/ignitionSite.H @@ -168,11 +168,6 @@ public: bool igniting() const; bool ignited() const; - - - // Member Operators - - void operator=(const ignitionSite&); }; diff --git a/src/foam/containers/HashTables/HashSet/HashSet.C b/src/foam/containers/HashTables/HashSet/HashSet.C index 0a726405b..8bd62a2b8 100644 --- a/src/foam/containers/HashTables/HashSet/HashSet.C +++ b/src/foam/containers/HashTables/HashSet/HashSet.C @@ -79,6 +79,21 @@ inline bool Foam::HashSet::operator[](const Key& key) const } +template +void Foam::HashSet::operator=(const HashSet& rhs) +{ + // Check for assignment to self + if (this == &rhs) + { + FatalErrorInFunction + << "attempted assignment to self" + << abort(FatalError); + } + + HashTable::operator=(rhs); +} + + template bool Foam::HashSet::operator==(const HashSet& rhs) const { diff --git a/src/foam/containers/HashTables/HashSet/HashSet.H b/src/foam/containers/HashTables/HashSet/HashSet.H index 20f3da3b0..6d5f8b989 100644 --- a/src/foam/containers/HashTables/HashSet/HashSet.H +++ b/src/foam/containers/HashTables/HashSet/HashSet.H @@ -156,6 +156,9 @@ public: //- Return true if the entry exists, same as found() inline bool operator[](const Key&) const; + //- Assignment operator + void operator=(const HashSet&); + //- Equality. Two hashtables are equal when their contents are equal. // Independent of table size or order. bool operator==(const HashSet&) const; diff --git a/src/foam/containers/HashTables/Map/Map.H b/src/foam/containers/HashTables/Map/Map.H index 2384ea96a..317bd056a 100644 --- a/src/foam/containers/HashTables/Map/Map.H +++ b/src/foam/containers/HashTables/Map/Map.H @@ -91,6 +91,13 @@ public: HashTable >(map) {} + + // Member Operators + + void operator=(const Map& map) + { + HashTable>::operator=(map); + } }; diff --git a/src/foam/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/foam/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index 7c8fd32ea..0b1e26a3a 100644 --- a/src/foam/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/foam/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -203,6 +203,10 @@ public: //- Construct for a given DLListBase and link inline iterator(DLListBase&, link*); + //- Construct as copy + inline iterator(const iterator&) = default; + + // Member operators inline void operator=(const iterator&); @@ -238,9 +242,13 @@ public: //- Construct for a given DLListBase and link inline const_iterator(const DLListBase&, const link*); + //- Construct from a const iterator + inline const_iterator(const const_iterator&) = default; + //- Construct from a non-const iterator inline const_iterator(const iterator&); + // Member operators inline void operator=(const const_iterator&); diff --git a/src/foam/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H b/src/foam/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H index 3000de713..02b25da6b 100644 --- a/src/foam/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H +++ b/src/foam/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H @@ -188,6 +188,10 @@ public: //- Construct for a given SLListBase and link inline iterator(SLListBase&, link*); + //- Construct as copy + inline iterator(const iterator&) = default; + + // Member operators inline void operator=(const iterator&); @@ -223,6 +227,9 @@ public: //- Construct for a given SLListBase and link inline const_iterator(const SLListBase&, const link*); + //- Construct from a const iterator + inline const_iterator(const const_iterator&) = default; + //- Construct from a non-const iterator inline const_iterator(const iterator&); diff --git a/src/foam/containers/Lists/FixedList/FixedList.H b/src/foam/containers/Lists/FixedList/FixedList.H index edcc4a6fd..7a34b87d1 100644 --- a/src/foam/containers/Lists/FixedList/FixedList.H +++ b/src/foam/containers/Lists/FixedList/FixedList.H @@ -204,6 +204,9 @@ public: //- Return element of constant FixedList. inline const T& operator[](const label) const; + //- Assignment to a FixedList + inline void operator=(const FixedList&); + //- Assignment from array operator. Takes linear time. inline void operator=(const T v[Size]); diff --git a/src/foam/containers/Lists/FixedList/FixedListI.H b/src/foam/containers/Lists/FixedList/FixedListI.H index 31b8c7019..9b9c501f4 100644 --- a/src/foam/containers/Lists/FixedList/FixedListI.H +++ b/src/foam/containers/Lists/FixedList/FixedListI.H @@ -131,7 +131,7 @@ inline void Foam::FixedList::checkStart(const label start) const { if (start < 0 || (start && unsigned(start) >= Size)) { - FatalErrorIn("FixedList::checkStart(const label)") + FatalErrorInFunction << "start " << start << " out of range 0 ... " << (Size-1) << abort(FatalError); } @@ -144,8 +144,8 @@ inline void Foam::FixedList::checkSize(const label size) const { if (size < 0 || unsigned(size) > Size) { - FatalErrorIn("FixedList::checkSize(const label)") - << "size " << size << " out of range 0 ... " << (Size) + FatalErrorInFunction + << "size " << size << " != " << Size << abort(FatalError); } } @@ -231,6 +231,15 @@ inline const T& Foam::FixedList::operator[](const label i) const } +template +inline void Foam::FixedList::operator=(const FixedList& lst) +{ + for (unsigned i=0; i inline void Foam::FixedList::operator=(const T lst[Size]) { diff --git a/src/foam/containers/NamedEnum/NamedEnum.H b/src/foam/containers/NamedEnum/NamedEnum.H index 10c10461f..78efca71d 100644 --- a/src/foam/containers/NamedEnum/NamedEnum.H +++ b/src/foam/containers/NamedEnum/NamedEnum.H @@ -68,10 +68,10 @@ class NamedEnum // Private Member Functions //- Disallow default bitwise copy construct - NamedEnum(const NamedEnum&); + NamedEnum(const NamedEnum&) = delete; //- Disallow default bitwise assignment - void operator=(const NamedEnum&); + void operator=(const NamedEnum&) = delete; public: diff --git a/src/foam/db/IOobject/IOobject.H b/src/foam/db/IOobject/IOobject.H index c4ff89fe7..038790935 100644 --- a/src/foam/db/IOobject/IOobject.H +++ b/src/foam/db/IOobject/IOobject.H @@ -251,6 +251,9 @@ public: bool registerObject = true ); + //- Copy construct + IOobject(const IOobject&) = default; + //- Clone Foam::autoPtr clone() const { diff --git a/src/foam/db/IOobjects/IOdictionary/IOdictionary.C b/src/foam/db/IOobjects/IOdictionary/IOdictionary.C index 61ccefd67..b0e431da0 100644 --- a/src/foam/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/foam/db/IOobjects/IOdictionary/IOdictionary.C @@ -180,6 +180,14 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, Istream& is) } +Foam::IOdictionary::IOdictionary(const IOdictionary& dict) +: + regIOobject(dict), + dictionary(dict) +{ +} + + // * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // Foam::IOdictionary::~IOdictionary() diff --git a/src/foam/db/IOobjects/IOdictionary/IOdictionary.H b/src/foam/db/IOobjects/IOdictionary/IOdictionary.H index 682b370aa..5f4d34986 100644 --- a/src/foam/db/IOobjects/IOdictionary/IOdictionary.H +++ b/src/foam/db/IOobjects/IOdictionary/IOdictionary.H @@ -83,6 +83,9 @@ public: //- Construct given an IOobject and Istream IOdictionary(const IOobject&, Istream&); + //- Copy constructor + IOdictionary(const IOdictionary&); + //- Destructor virtual ~IOdictionary(); diff --git a/src/foam/db/IOstreams/Tstreams/ITstream.H b/src/foam/db/IOstreams/Tstreams/ITstream.H index f7c956165..f1aeb2d47 100644 --- a/src/foam/db/IOstreams/Tstreams/ITstream.H +++ b/src/foam/db/IOstreams/Tstreams/ITstream.H @@ -208,6 +208,21 @@ public: //- Print description of IOstream to Ostream void print(Ostream&) const; + + + // Member Operators + + //- Assignment operator + void operator=(const ITstream& its) + { + Istream::operator=(its); + tokenList::operator=(its); + name_ = its.name_; + tokenIndex_ = 0; + + setOpened(); + setGood(); + } }; diff --git a/src/foam/dimensionSet/dimensionSet.C b/src/foam/dimensionSet/dimensionSet.C index 593069ba5..6f91a6ccb 100644 --- a/src/foam/dimensionSet/dimensionSet.C +++ b/src/foam/dimensionSet/dimensionSet.C @@ -74,6 +74,12 @@ Foam::dimensionSet::dimensionSet } +Foam::dimensionSet::dimensionSet(const dimensionSet& ds) +{ + reset(ds); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::dimensionSet::dimensionless() const diff --git a/src/foam/dimensionSet/dimensionSet.H b/src/foam/dimensionSet/dimensionSet.H index b9f95f180..ccdfea0be 100644 --- a/src/foam/dimensionSet/dimensionSet.H +++ b/src/foam/dimensionSet/dimensionSet.H @@ -43,6 +43,7 @@ SourceFiles #include "bool.H" #include "dimensionedScalarFwd.H" #include "className.H" +#include "autoPtr.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -139,7 +140,7 @@ public: private: - // private data + // Private data // dimensionSet stored as an array of dimension exponents scalar exponents_[nDimensions]; @@ -180,6 +181,15 @@ public: //- Construct from Istream dimensionSet(Istream&); + //- Construct as copy + dimensionSet(const dimensionSet& ds); + + //- Construct and return a clone + autoPtr clone() const + { + return autoPtr(new dimensionSet(*this)); + } + // Member functions diff --git a/src/foam/fields/CoeffField/scalarCoeffField.C b/src/foam/fields/CoeffField/scalarCoeffField.C index 22a8135ac..89b9efb91 100644 --- a/src/foam/fields/CoeffField/scalarCoeffField.C +++ b/src/foam/fields/CoeffField/scalarCoeffField.C @@ -294,6 +294,12 @@ void Foam::CoeffField::addSubset // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +void Foam::CoeffField::operator=(const CoeffField& f) +{ + scalarField::operator=(f.asScalar()); +} + + void Foam::CoeffField::operator=(const scalarField& f) { scalarField::operator=(f); diff --git a/src/foam/fields/CoeffField/scalarCoeffField.H b/src/foam/fields/CoeffField/scalarCoeffField.H index 7a39bd38a..5481e6d21 100644 --- a/src/foam/fields/CoeffField/scalarCoeffField.H +++ b/src/foam/fields/CoeffField/scalarCoeffField.H @@ -188,6 +188,7 @@ public: // Member operators + void operator=(const CoeffField&); void operator=(const scalarField&); void operator=(const tmp&); diff --git a/src/foam/meshes/patchIdentifier/patchIdentifier.C b/src/foam/meshes/patchIdentifier/patchIdentifier.C index 799700859..ea6ee3404 100644 --- a/src/foam/meshes/patchIdentifier/patchIdentifier.C +++ b/src/foam/meshes/patchIdentifier/patchIdentifier.C @@ -72,12 +72,6 @@ Foam::patchIdentifier::patchIdentifier {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::patchIdentifier::~patchIdentifier() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::patchIdentifier::inGroup(const word& name) const diff --git a/src/foam/meshes/patchIdentifier/patchIdentifier.H b/src/foam/meshes/patchIdentifier/patchIdentifier.H index 674a75e9e..3e1f9cdba 100644 --- a/src/foam/meshes/patchIdentifier/patchIdentifier.H +++ b/src/foam/meshes/patchIdentifier/patchIdentifier.H @@ -102,7 +102,7 @@ public: //- Destructor - virtual ~patchIdentifier(); + virtual ~patchIdentifier() = default; // Member Functions diff --git a/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C index 34271b9d0..2e6e529ad 100644 --- a/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C +++ b/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C @@ -367,8 +367,7 @@ void Foam::mapDistribute::distribute else { FatalErrorInFunction - << "Unknown communication schedule " - << Pstream::commsTypeNames[commsType] + << "Unknown communication schedule " << int(commsType) << abort(FatalError); } } @@ -709,7 +708,7 @@ void Foam::mapDistribute::distribute else { FatalErrorInFunction - << "Unknown communication schedule " << commsType + << "Unknown communication schedule " << int(commsType) << abort(FatalError); } } diff --git a/src/foam/primitives/complex/complex.H b/src/foam/primitives/complex/complex.H index 20996395f..bae2aca3f 100644 --- a/src/foam/primitives/complex/complex.H +++ b/src/foam/primitives/complex/complex.H @@ -126,7 +126,6 @@ public: // Member operators - inline const complex& operator=(const complex&); inline void operator+=(const complex&); inline void operator-=(const complex&); inline void operator*=(const complex&); diff --git a/src/foam/primitives/complex/complexI.H b/src/foam/primitives/complex/complexI.H index bcc8e1d92..953a7962e 100644 --- a/src/foam/primitives/complex/complexI.H +++ b/src/foam/primitives/complex/complexI.H @@ -75,14 +75,6 @@ inline complex complex::conjugate() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline const complex& complex::operator=(const complex& c) -{ - re = c.re; - im = c.im; - return *this; -} - - inline void complex::operator+=(const complex& c) { re += c.re; diff --git a/src/foam/primitives/functions/Polynomial/Polynomial.C b/src/foam/primitives/functions/Polynomial/Polynomial.C index 398387b75..1bb9a28f2 100644 --- a/src/foam/primitives/functions/Polynomial/Polynomial.C +++ b/src/foam/primitives/functions/Polynomial/Polynomial.C @@ -41,18 +41,6 @@ Foam::Polynomial::Polynomial() } -template -Foam::Polynomial::Polynomial -( - const Polynomial& poly -) -: - VectorSpace, scalar, PolySize>(poly), - logActive_(poly.logActive_), - logCoeff_(poly.logCoeff_) -{} - - template Foam::Polynomial::Polynomial(const scalar coeffs[PolySize]) : diff --git a/src/foam/primitives/functions/Polynomial/Polynomial.H b/src/foam/primitives/functions/Polynomial/Polynomial.H index 24fdfd533..ceb9b91dc 100644 --- a/src/foam/primitives/functions/Polynomial/Polynomial.H +++ b/src/foam/primitives/functions/Polynomial/Polynomial.H @@ -107,9 +107,6 @@ public: //- Construct null, with all coefficients = 0.0 Polynomial(); - //- Copy constructor - Polynomial(const Polynomial&); - //- Construct from C-array of coefficients explicit Polynomial(const scalar coeffs[PolySize]); diff --git a/src/foam/primitives/quaternion/quaternion.H b/src/foam/primitives/quaternion/quaternion.H index 10a2cdb7e..bd76d9cf6 100644 --- a/src/foam/primitives/quaternion/quaternion.H +++ b/src/foam/primitives/quaternion/quaternion.H @@ -112,6 +112,9 @@ public: //- Construct from Istream quaternion(Istream&); + //- Copy construct + quaternion(const quaternion&) = default; + // Member functions diff --git a/src/foam/primitives/septernion/septernion.H b/src/foam/primitives/septernion/septernion.H index 167b5bedd..a670b555b 100644 --- a/src/foam/primitives/septernion/septernion.H +++ b/src/foam/primitives/septernion/septernion.H @@ -126,7 +126,6 @@ public: // Member operators - inline void operator=(const septernion&); inline void operator*=(const septernion&); inline void operator=(const vector&); diff --git a/src/foam/primitives/septernion/septernionI.H b/src/foam/primitives/septernion/septernionI.H index 269883656..8a662a55e 100644 --- a/src/foam/primitives/septernion/septernionI.H +++ b/src/foam/primitives/septernion/septernionI.H @@ -87,12 +87,6 @@ inline Foam::vector Foam::septernion::invTransform(const vector& v) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::septernion::operator=(const septernion& tr) -{ - t_ = tr.t_; - r_ = tr.r_; -} - inline void Foam::septernion::operator*=(const septernion& tr) { t_ += r().transform(tr.t()); diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index 24a7e0ecf..d7fcd0fc0 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -171,23 +171,6 @@ Foam::phaseProperties::phaseProperties() {} -Foam::phaseProperties::phaseProperties(const phaseProperties& pp) -: - phase_(pp.phase_), - stateLabel_(pp.stateLabel_), - names_(pp.names_), - Y_(pp.Y_), - globalIds_(pp.globalIds_), - globalCarrierIds_(pp.globalCarrierIds_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseProperties::~phaseProperties() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::phaseProperties::initialiseGlobalIds diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H index b0e0c6a3b..7f4193a37 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -125,12 +125,9 @@ public: //- Construct from Istream phaseProperties(Istream&); - //- Construct as copy - phaseProperties(const phaseProperties&); - //- Destructor - ~phaseProperties(); + ~phaseProperties() = default; // Public member functions diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H index 14d54abb3..b349a9e31 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H @@ -117,9 +117,6 @@ public: const vector& v ); - //- Construct as copy - inline pointData(const pointData&); - // Member Functions diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H index 569543ac4..2efd628fd 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H @@ -160,16 +160,6 @@ inline Foam::pointData::pointData {} -// Construct as copy -inline Foam::pointData::pointData(const pointData& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()), - s_(wpt.s()), - v_(wpt.v()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::pointData::origin() const diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C index 1119aef20..95977d8fe 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C @@ -172,12 +172,6 @@ Foam::blockDescriptor::blockDescriptor } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::blockDescriptor::~blockDescriptor() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::pointField& Foam::blockDescriptor::blockPointField() const diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H index 2535d8266..dae158b70 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H @@ -79,7 +79,7 @@ class blockDescriptor Vector