diff --git a/TODO b/TODO index 09132f1213feaefa702941f92308e3d0832ed468..c2fd049c26a999459bda8593d79455723946018a 100644 --- a/TODO +++ b/TODO @@ -20,7 +20,10 @@ OK - parallel finite volume with processorCyclic: channelFoam OK - preProcessing/foamUpgradeCyclics -- amg +OK - amg. +Tested on unitTestCases/singleCyclic/ + +- initTransfer in GAMGprocessorInterfaces using nonblocking+tags - test createPatch pointSync - pointFields on cyclics. volPointInterpolation. - jumpCyclics diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/Make/options b/applications/utilities/preProcessing/foamUpgradeCyclics/Make/options index ac444f6f838c177186962799b3aed4c318a1df3f..93ae287538b0547faa2570f8f832561d6e06c149 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/Make/options +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/Make/options @@ -1,5 +1,4 @@ EXE_INC = \ - -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/etc/apps/ensight/cshrc b/etc/apps/ensight/cshrc index 0126a8ea500e969ba42f80b422308347e5bd94af..36f4dac0760299ef13f29556d14cf14b88b5b8b3 100644 --- a/etc/apps/ensight/cshrc +++ b/etc/apps/ensight/cshrc @@ -22,7 +22,7 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # ensight/cshrc # # Description @@ -40,11 +40,11 @@ if ( -r $CEI_HOME ) then # special treatment for 32bit OpenFOAM and 64bit Ensight if ($WM_ARCH == linux && `uname -m` == x86_64) then - setenv CEI_ARCH linux_2.6_32 + setenv CEI_ARCH linux_2.6_32 endif # add to path - set path=($CEI_HOME/bin $path) + setenv PATH ${CEI_HOME}/bin:${PATH} setenv ENSIGHT9_INPUT dummy setenv ENSIGHT9_READER $FOAM_LIBBIN diff --git a/etc/cshrc b/etc/cshrc index 9ef6fb2d068da7d25cee0f81ef369b6521958d1f..fd3e7d68344cbae91dce9075a028a69932baccf8 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -22,7 +22,7 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # etc/cshrc # # Description @@ -35,13 +35,13 @@ setenv WM_PROJECT OpenFOAM if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION 1.6 ################################################################################ -# USER EDITABLE PART +# USER EDITABLE PART. Note changes made here may be lost with the next upgrade # # either setenv FOAM_INST_DIR before sourcing this file or set # foamInstall below to where OpenFOAM is installed # -# Location of FOAM installation -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Location of the OpenFOAM installation +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set foamInstall = $HOME/$WM_PROJECT # set foamInstall = ~$WM_PROJECT # set foamInstall = /usr/local/$WM_PROJECT @@ -64,12 +64,22 @@ setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION - # Location of third-party software # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION +# Source files, possibly with some verbosity +alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; source \!*' + +# Add in preset user or site preferences: +set foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` +if ( $status == 0 ) then + _foamSource $foamPrefs +endif +unset foamPrefs + + # Operating System/Platform # ~~~~~~~~~~~~~~~~~~~~~~~~~ # WM_OSTYPE = POSIX | ???? @@ -199,68 +209,63 @@ default: endsw -# Clean standard environment variables (path/PATH, LD_LIBRARY_PATH, MANPATH) +# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -set cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath +set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath -if (! $?LD_LIBRARY_PATH ) then - setenv LD_LIBRARY_PATH '' -endif -if (! $?MANPATH) then - setenv MANPATH '' -endif +if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH '' +if (! $?MANPATH) setenv MANPATH '' -#- Clean path/PATH -set colonPath=`echo "$path" | sed -e 's/ /:/g'` -set cleanEnv=`$cleanProg "$colonPath" "$foamOldDirs"` +#- Clean PATH (path) +set cleaned=`$foamClean "$PATH" "$foamOldDirs"` if ( $status == 0 ) then - set path=`echo "$cleanEnv" | sed -e 's/:/ /g'` + unset PATH + setenv PATH $cleaned endif #- Clean LD_LIBRARY_PATH -setenv LD_LIBRARY_PATH `$cleanProg "$LD_LIBRARY_PATH" "$foamOldDirs"` +set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` +if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned #- Clean MANPATH -setenv MANPATH `$cleanProg "$MANPATH" "$foamOldDirs"` +set cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` +if ( $status == 0 ) setenv MANPATH $cleaned # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ -alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*' - _foamSource $WM_PROJECT_DIR/etc/settings.csh _foamSource $WM_PROJECT_DIR/etc/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc # _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc # Clean environment paths again. Only remove duplicates # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#- Clean path/PATH -set colonPath=`echo "$path" | sed -e 's/ /:/g'` -set cleanEnv=`$cleanProg "$colonPath"` -if ( $status == 0 ) then - set path=`echo "$cleanEnv" | sed -e 's/:/ /g'` -endif +#- Clean PATH (path) +set cleaned=`$foamClean "$PATH"` +if ( $status == 0 ) setenv PATH $cleaned #- Clean LD_LIBRARY_PATH -setenv LD_LIBRARY_PATH `$cleanProg "$LD_LIBRARY_PATH"` +set cleaned=`$foamClean "$LD_LIBRARY_PATH"` +if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned -#- Clean MANPATH -setenv MANPATH `$cleanProg "$MANPATH"`: +#- Clean MANPATH (trailing ':' to find system pages) +set cleaned=`$foamClean "$MANPATH"`: +if ( $status == 0 ) setenv MANPATH "$cleaned" #- Clean LD_PRELOAD if ( $?LD_PRELOAD ) then - setenv LD_PRELOAD `$cleanProg "$LD_PRELOAD"` + set cleaned=`$foamClean "$LD_PRELOAD"` + if ( $status == 0 ) setenv LD_PRELOAD $cleaned endif # cleanup environment: # ~~~~~~~~~~~~~~~~~~~~ -unset cleanEnv cleanProg colonPath foamInstall foamOldDirs +unset cleaned foamClean foamInstall foamOldDirs unalias _foamSource -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------- end-of-file diff --git a/etc/settings.csh b/etc/settings.csh index 78fd05490f24f722d6fe4e7fb6869a35ac1faf70..5d2950662c71b5fde615e0b1dfc3f59f71fe4a54 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -22,7 +22,7 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # etc/settings.csh # # Description @@ -32,11 +32,11 @@ #------------------------------------------------------------------------------ # prefix to PATH -alias _foamAddPath 'set path=(\!* $path)' +alias _foamAddPath 'setenv PATH \!*\:${PATH}' # prefix to LD_LIBRARY_PATH alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' # prefix to MANPATH -alias _foamAddManPath 'setenv MANPATH \!*\:${MANPATH}' +alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}' # location of the jobControl directory setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl @@ -68,41 +68,35 @@ setenv FOAM_SOLVERS $FOAM_APP/solvers setenv FOAM_RUN $WM_PROJECT_USER_DIR/run # add OpenFOAM scripts and wmake to the path -set path=($WM_DIR $WM_PROJECT_DIR/bin $path) +setenv PATH ${WM_DIR}:${WM_PROJECT_DIR}/bin:${PATH} -_foamAddPath $FOAM_APPBIN -_foamAddPath $FOAM_SITE_APPBIN -_foamAddPath $FOAM_USER_APPBIN -_foamAddLib $FOAM_LIBBIN -_foamAddLib $FOAM_SITE_LIBBIN -_foamAddLib $FOAM_USER_LIBBIN +_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN} + # Make sure to pick up dummy versions of external libraries last +_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBIN}/dummy # Select compiler installation # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# compilerInstall = OpenFOAM | System -set compilerInstall=OpenFOAM +# compilerInstall = OpenFOAM | system +if ( ! $?compilerInstall ) set compilerInstall=OpenFOAM switch ("$compilerInstall") case OpenFOAM: switch ("$WM_COMPILER") case Gcc: - setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.4.3/platforms/$WM_ARCH$WM_COMPILER_ARCH - _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.2/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib - _foamAddLib $WM_THIRD_PARTY_DIR/gmp-5.0.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.3 + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.2/lib + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-5.0.1/lib breaksw case Gcc442: - setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.4.2/platforms/$WM_ARCH$WM_COMPILER_ARCH - _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib - _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.4.2 + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.1/lib + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-4.2.4/lib breaksw case Gcc43: - setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH - _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib - _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib - breaksw - case Gcc42: - setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH + setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.3.3 + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/mpfr-2.4.1/lib + _foamAddLib $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gmp-4.2.4/lib breaksw endsw @@ -112,14 +106,13 @@ case OpenFOAM: echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" echo " Cannot find $WM_COMPILER_DIR 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 " change the 'compilerInstall' setting to 'system' in this file" echo endif _foamAddPath ${WM_COMPILER_DIR}/bin - _foamAddLib ${WM_COMPILER_DIR}/lib${WM_COMPILER_LIB_ARCH} - _foamAddLib ${WM_COMPILER_DIR}/lib - _foamAddManPath ${WM_COMPILER_DIR}/man + _foamAddLib ${WM_COMPILER_DIR}/lib${WM_COMPILER_LIB_ARCH}:${WM_COMPILER_DIR}/lib + _foamAddMan ${WM_COMPILER_DIR}/man breaksw endsw @@ -128,33 +121,30 @@ endsw # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ -unset MPI_ARCH_PATH +unsetenv MPI_ARCH_PATH MPI_HOME switch ("$WM_MPLIB") case OPENMPI: set mpi_version=openmpi-1.4.1 - setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version - setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS + setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version # Tell OpenMPI where to find its install directory setenv OPAL_PREFIX $MPI_ARCH_PATH _foamAddPath $MPI_ARCH_PATH/bin _foamAddLib $MPI_ARCH_PATH/lib - _foamAddManPath $MPI_ARCH_PATH/man + _foamAddMan $MPI_ARCH_PATH/man setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version unset mpi_version breaksw case SYSTEMOPENMPI: - # This uses the installed openmpi. It needs mpicc installed! - set mpi_version=openmpi-system # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI - setenv PINC `mpicc --showme:compile` + setenv PINC `mpicc --showme:compile` setenv PLIBS `mpicc --showme:link` set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'` @@ -165,7 +155,7 @@ case SYSTEMOPENMPI: echo " libmpi dir : $libDir" endif - _foamAddLib $libDir + _foamAddLib $libDir setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version unset mpi_version libDir @@ -174,11 +164,11 @@ case SYSTEMOPENMPI: case MPICH: set mpi_version=mpich2-1.1.1p1 setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version - setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS + setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version _foamAddPath $MPI_ARCH_PATH/bin _foamAddLib $MPI_ARCH_PATH/lib - _foamAddManPath $MPI_ARCH_PATH/share/man + _foamAddMan $MPI_ARCH_PATH/share/man setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version unset mpi_version @@ -189,9 +179,9 @@ case MPICH-GM: setenv MPICH_PATH $MPI_ARCH_PATH setenv GM_LIB_PATH /opt/gm/lib64 - _foamAddPath $MPI_ARCH_PATH/bin - _foamAddLib $MPI_ARCH_PATH/lib - _foamAddLib $GM_LIB_PATH + _foamAddPath $MPI_ARCH_PATH/bin + _foamAddLib $MPI_ARCH_PATH/lib + _foamAddLib $GM_LIB_PATH setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm breaksw @@ -233,18 +223,18 @@ case MPI: case FJMPI: setenv MPI_ARCH_PATH /opt/FJSVmpi2 setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi - _foamAddPath $MPI_ARCH_PATH/bin - _foamAddLib $MPI_ARCH_PATH/lib/sparcv9 - _foamAddLib /opt/FSUNf90/lib/sparcv9 - _foamAddLib /opt/FJSVpnidt/lib + _foamAddPath $MPI_ARCH_PATH/bin + _foamAddLib $MPI_ARCH_PATH/lib/sparcv9 + _foamAddLib /opt/FSUNf90/lib/sparcv9 + _foamAddLib /opt/FJSVpnidt/lib breaksw case QSMPI: setenv MPI_ARCH_PATH /usr/lib/mpi setenv FOAM_MPI_LIBBIN FOAM_LIBBIN/qsmpi - _foamAddPath $MPI_ARCH_PATH/bin - _foamAddLib $MPI_ARCH_PATH/lib + _foamAddPath $MPI_ARCH_PATH/bin + _foamAddLib $MPI_ARCH_PATH/lib breaksw @@ -258,7 +248,7 @@ _foamAddLib $FOAM_MPI_LIBBIN # Set the minimum MPI buffer size (used by all platforms except SGI MPI) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -set minBufferSize=20000000 +if ( ! $?minBufferSize ) set minBufferSize=20000000 if ( $?MPI_BUFFER_SIZE ) then if ( $MPI_BUFFER_SIZE < $minBufferSize ) then @@ -276,8 +266,8 @@ if ( $?CGAL_LIB_DIR ) then endif -# Switch on the hoard memory allocator if available -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Enable the hoard memory allocator if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #if ( -f $FOAM_LIBBIN/libhoard.so ) then # setenv LD_PRELOAD $FOAM_LIBBIN/libhoard.so:${LD_PRELOAD} #endif @@ -285,8 +275,7 @@ endif # cleanup environment: # ~~~~~~~~~~~~~~~~~~~~ -unalias _foamAddPath -unalias _foamAddLib -unset minBufferSize +unalias _foamAddPath _foamAddLib _foamAddMan +unset compilerInstall minBufferSize -# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------- end-of-file diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 7aa89c629fba677251948e75dc1cf7616d7f2a7e..26dd4cd6774b360840ebb87b1a03066bc4a6ed7f 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -252,19 +252,18 @@ $(lduInterfaceFields)/lduInterfaceField/lduInterfaceField.C $(lduInterfaceFields)/processorLduInterfaceField/processorLduInterfaceField.C $(lduInterfaceFields)/cyclicLduInterfaceField/cyclicLduInterfaceField.C -/* GAMG = $(lduMatrix)/solvers/GAMG +/* +*/ $(GAMG)/GAMGSolver.C $(GAMG)/GAMGSolverAgglomerateMatrix.C $(GAMG)/GAMGSolverScalingFactor.C $(GAMG)/GAMGSolverSolve.C - GAMGInterfaces = $(GAMG)/interfaces $(GAMGInterfaces)/GAMGInterface/GAMGInterface.C $(GAMGInterfaces)/GAMGInterface/newGAMGInterface.C $(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C $(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C - GAMGInterfaceFields = $(GAMG)/interfaceFields $(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C $(GAMGInterfaceFields)/GAMGInterfaceField/newGAMGInterfaceField.C @@ -284,7 +283,6 @@ $(pairGAMGAgglomeration)/pairGAMGAgglomerationCombineLevels.C algebraicPairGAMGAgglomeration = $(GAMGAgglomerations)/algebraicPairGAMGAgglomeration $(algebraicPairGAMGAgglomeration)/algebraicPairGAMGAgglomeration.C -*/ meshes/lduMesh/lduMesh.C diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C index 0bacb3779848b8a9ebd37556ee4a35d7d4620196..e0724eceefebcbd0aaed32d24a8cbf39cfc32122 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C @@ -155,7 +155,7 @@ void cyclicPointPatchField<Type>::swapAddSeparated } } - addToInternalField(pField, pf, cyclicPatch_.separatedPoints()); + addToInternalField(pField, pf); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C index f6d8444e56a7459f8ead2fe288dfd91b27c2a360..6030e48040e386047977a013a902e7d20422ee0e 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C @@ -103,27 +103,27 @@ void processorPointPatchField<Type>::initSwapAddSeparated ) const { - if (Pstream::parRun()) - { - // Get internal field into correct order for opposite side - Field<Type> pf - ( - this->patchInternalField - ( - pField, - procPatch_.reverseMeshPoints() - ) - ); - - OPstream::write - ( - commsType, - procPatch_.neighbProcNo(), - reinterpret_cast<const char*>(pf.begin()), - pf.byteSize(), - procPatch_.tag() - ); - } +// if (Pstream::parRun()) +// { +// // Get internal field into correct order for opposite side +// Field<Type> pf +// ( +// this->patchInternalField +// ( +// pField, +// procPatch_.reverseMeshPoints() +// ) +// ); +// +// OPstream::write +// ( +// commsType, +// procPatch_.neighbProcNo(), +// reinterpret_cast<const char*>(pf.begin()), +// pf.byteSize(), +// procPatch_.tag() +// ); +// } } @@ -134,29 +134,29 @@ void processorPointPatchField<Type>::swapAddSeparated Field<Type>& pField ) const { - if (Pstream::parRun()) - { - Field<Type> pnf(this->size()); - - IPstream::read - ( - commsType, - procPatch_.neighbProcNo(), - reinterpret_cast<char*>(pnf.begin()), - pnf.byteSize(), - procPatch_.tag() - ); - - if (doTransform()) - { - const processorPolyPatch& ppp = procPatch_.procPolyPatch(); - const tensor& forwardT = ppp.forwardT(); - - transform(pnf, forwardT, pnf); - } - - addToInternalField(pField, pnf, procPatch_.separatedPoints()); - } +// if (Pstream::parRun()) +// { +// Field<Type> pnf(this->size()); +// +// IPstream::read +// ( +// commsType, +// procPatch_.neighbProcNo(), +// reinterpret_cast<char*>(pnf.begin()), +// pnf.byteSize(), +// procPatch_.tag() +// ); +// +// if (doTransform()) +// { +// const processorPolyPatch& ppp = procPatch_.procPolyPatch(); +// const tensor& forwardT = ppp.forwardT(); +// +// transform(pnf, forwardT, pnf); +// } +// +// addToInternalField(pField, pnf, procPatch_.separatedPoints()); +// } } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C index 3034a595f1f37ab1ff87cef5e494ee741aa8f039..4a6e93db2bb197ca09271a40d6e6d633dd2b2f97 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C @@ -96,17 +96,27 @@ processorCyclicPointPatchField<Type>::~processorCyclicPointPatchField() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> -void processorCyclicPointPatchField<Type>::initSwapAdd(Field<Type>& pField) -const +void processorCyclicPointPatchField<Type>::initSwapAddSeparated +( + const Pstream::commsTypes commsType, + Field<Type>& pField +) const { if (Pstream::parRun()) { - // Get internal field into my point order - Field<Type> pf(this->patchInternalField(pField)); + // Get internal field into correct order for opposite side + Field<Type> pf + ( + this->patchInternalField + ( + pField, + procPatch_.reverseMeshPoints() + ) + ); OPstream::write ( - Pstream::blocking, + commsType, procPatch_.neighbProcNo(), reinterpret_cast<const char*>(pf.begin()), pf.byteSize(), @@ -117,7 +127,11 @@ const template<class Type> -void processorCyclicPointPatchField<Type>::swapAdd(Field<Type>& pField) const +void processorCyclicPointPatchField<Type>::swapAddSeparated +( + const Pstream::commsTypes commsType, + Field<Type>& pField +) const { if (Pstream::parRun()) { @@ -125,7 +139,7 @@ void processorCyclicPointPatchField<Type>::swapAdd(Field<Type>& pField) const IPstream::read ( - Pstream::blocking, + commsType, procPatch_.neighbProcNo(), reinterpret_cast<char*>(pnf.begin()), pnf.byteSize(), @@ -134,129 +148,14 @@ void processorCyclicPointPatchField<Type>::swapAdd(Field<Type>& pField) const if (doTransform()) { - procPatch_.procPolyPatch().transform(pnf); - - //const processorPolyPatch& ppp = procPatch_.procPolyPatch(); - //const labelList& nonGlobalPatchPoints = - // procPatch_.nonGlobalPatchPoints(); - // - //// Mark patch that transformed point: - //// -3 : global patch point so handled in different patch - //// -2 : nonGlobalPatchPoints, initial value - //// -1 : originating from internal face, no transform necessary - //// >=0 : originating from coupled patch - //labelList hasTransformed(ppp.nPoints(), -3); - //forAll(nonGlobalPatchPoints, i) - //{ - // hasTransformed[nonGlobalPatchPoints[i]] = -2; - //} - // - //forAll(ppp.patchIDs(), subI) - //{ - // label patchI = ppp.patchIDs()[subI]; - // - // if (patchI == -1) - // { - // for - // ( - // label faceI = ppp.starts()[subI]; - // faceI < ppp.starts()[subI+1]; - // faceI++ - // ) - // { - // const face& f = ppp.localFaces()[faceI]; - // - // forAll(f, fp) - // { - // label pointI = f[fp]; - // - // if (hasTransformed[pointI] == -3) - // { - // // special point, handled elsewhere - // } - // else if (hasTransformed[pointI] == -2) - // { - // // first visit. Just mark. - // hasTransformed[pointI] = patchI; - // } - // else if (hasTransformed[pointI] == patchI) - // { - // // already done - // } - // else - // { - // FatalErrorIn - // ( - // "processorCyclicPointPatchField<Type>::" - // "swapAdd(Field<Type>& pField) const" - // ) << "Point " << pointI - // << " on patch " << ppp.name() - // << " already transformed by patch " - // << hasTransformed[pointI] - // << abort(FatalError); - // } - // } - // } - // } - // else if - // ( - // !refCast<const coupledPolyPatch> - // ( - // ppp.boundaryMesh()[patchI] - // ).parallel() - // ) - // { - // const tensor& T = refCast<const coupledPolyPatch> - // ( - // ppp.boundaryMesh()[patchI] - // ).forwardT(); - // - // for - // ( - // label faceI = ppp.starts()[subI]; - // faceI < ppp.starts()[subI+1]; - // faceI++ - // ) - // { - // const face& f = ppp.localFaces()[faceI]; - // - // forAll(f, fp) - // { - // label pointI = f[fp]; - // - // if (hasTransformed[pointI] == -3) - // { - // // special point, handled elsewhere - // } - // else if (hasTransformed[pointI] == -2) - // { - // pnf[pointI] = transform(T, pnf[pointI]); - // - // hasTransformed[pointI] = patchI; - // } - // else if (hasTransformed[pointI] == patchI) - // { - // // already done - // } - // else - // { - // FatalErrorIn - // ( - // "processorCyclicPointPatchField<Type>::" - // "swapAdd(Field<Type>& pField) const" - // ) << "Point " << pointI - // << " on patch " << ppp.name() - // << " subPatch " << patchI - // << " already transformed by patch " - // << hasTransformed[pointI] - // << abort(FatalError); - // } - // } - // } - // } - //} + const processorCyclicPolyPatch& ppp = + procPatch_.procCyclicPolyPatch(); + const tensor& forwardT = ppp.forwardT(); + + transform(pnf, forwardT, pnf); } + // All points are separated addToInternalField(pField, pnf); } } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H index d0ece8d33ac910d13ee090e3d38ddfcfe749e729..6b5f9b3377f49f84d72ef440198b87397944ed36 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H @@ -169,11 +169,19 @@ public: ) {} - //- Initialise swap of patch point values - virtual void initSwapAdd(Field<Type>&) const; + //- Initialise swap of non-collocated patch point values + virtual void initSwapAddSeparated + ( + const Pstream::commsTypes commsType, + Field<Type>& + ) const; //- Complete swap of patch point values and add to local values - virtual void swapAdd(Field<Type>&) const; + virtual void swapAddSeparated + ( + const Pstream::commsTypes commsType, + Field<Type>& + ) const; }; diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C index 11716ab844bd573edc1bbab684950a542f922e89..4d601781106b22c291e8c1ebef34624c9af9e625 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C @@ -37,9 +37,11 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cyclicLduInterface::cyclicLduInterface(const label neighbPatchID) -: - neighbPatchID_(neighbPatchID) +//Foam::cyclicLduInterface::cyclicLduInterface(const label neighbPatchID) +//: +// neighbPatchID_(neighbPatchID) +//{} +Foam::cyclicLduInterface::cyclicLduInterface() {} diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.H index 21b70b59bed7d0c48a395f8e95860cd917809687..26e104e3a08113f9538392213992e6498b6ff83e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.H +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.H @@ -52,8 +52,8 @@ class cyclicLduInterface { // Private data - //- Coupled patch - const label neighbPatchID_; +// //- Coupled patch +// const label neighbPatchID_; // const cyclicLduInterface* neighbPatch_; @@ -64,8 +64,11 @@ public: // Constructors - //- Construct from components - cyclicLduInterface(const label neighbPatchID); +// //- Construct from components +// cyclicLduInterface(const label neighbPatchID); + + //- Construct null + cyclicLduInterface(); // Destructor @@ -76,22 +79,13 @@ public: // Access + //- Return neighbour + virtual label neighbPatchID() const = 0; + + virtual bool owner() const = 0; + //- Return processor number - label neighbPatchID() const - { - return neighbPatchID_; - } - -// //- Return processor number -// const cyclicLduInterface& neighbPatch() const -// { -// if (!neighbPatch_) -// { -// FatalErrorIn("cyclicLduInterface::neighbPatch() const") -// << "Not owner." << abort(FatalError); -// } -// return neighbPatchID_; -// } + virtual const cyclicLduInterface& neighbPatch() const = 0; //- Return face transformation tensor virtual const tensor& forwardT() const = 0; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index 8530c936ff9bd6f4226441cf512b5766e44b7279..c132994ec718afce9de68fd796f3f7ef004a08c9 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -246,6 +246,8 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing inti, GAMGInterface::New ( + inti, + coarseInterfaces, fineInterfaces[inti], fineInterfaces[inti].interfaceInternalField(restrictMap), fineInterfaces[inti].internalFieldTransfer diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H index f316be43b191bedb468525ed0b0556a2de509ca4..6cd8dd0dda6a51a58de803dd5d8b9cfba04d8d7d 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H @@ -130,13 +130,13 @@ public: } //- Return face transformation tensor - virtual const tensorField& forwardT() const + virtual const tensor& forwardT() const { return cyclicInterface_.forwardT(); } //- Return neighbour-cell transformation tensor - virtual const tensorField& reverseT() const + virtual const tensor& reverseT() const { return cyclicInterface_.reverseT(); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H index a39de1c764b1312e94fae5ba59f00d1f58f49d4d..6027f5f36e8f8b770fab1bbf62495c5f8f23b563 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H @@ -153,7 +153,7 @@ public: } //- Return face transformation tensor - virtual const tensorField& forwardT() const + virtual const tensor& forwardT() const { return procInterface_.forwardT(); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H index 0e701d157d7e6f0d56280d10b7aec2756ded1e13..3f4cafffb3650cbe1945415f76d5fe79a3f920e1 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H @@ -37,8 +37,9 @@ SourceFiles #ifndef GAMGInterface_H #define GAMGInterface_H -#include "lduInterface.H" +//#include "lduInterface.H" #include "autoPtr.H" +#include "lduInterfacePtrsList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,6 +59,12 @@ protected: // Protected data + //- My index in coarseInterfaces + const label index_; + + //- All interfaces + const lduInterfacePtrsList& coarseInterfaces_; + //- Face-cell addressing labelField faceCells_; @@ -90,11 +97,15 @@ public: GAMGInterface, lduInterface, ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing ), ( + index, + coarseInterfaces, fineInterface, localRestrictAddressing, neighbourRestrictAddressing @@ -108,6 +119,8 @@ public: // the fine interface static autoPtr<GAMGInterface> New ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing @@ -120,10 +133,15 @@ public: // local and neighbour restrict addressing GAMGInterface ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface&, const labelField&, const labelField& ) + : + index_(index), + coarseInterfaces_(coarseInterfaces) {} @@ -137,6 +155,16 @@ public: return faceCells_.size(); } + virtual label index() const + { + return index_; + } + + virtual const lduInterfacePtrsList& coarseInterfaces() const + { + return coarseInterfaces_; + } + //- Return faceCell addressing virtual const unallocLabelList& faceCells() const { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C index 7cb1ecf147b5be5760270b537cdc23fe24e649a0..1c2cc33de6b7ff4b911043177c3593137fd14df4 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C @@ -32,6 +32,8 @@ License Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing @@ -60,6 +62,8 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New ( cstrIter() ( + index, + coarseInterfaces, fineInterface, localRestrictAddressing, neighbourRestrictAddressing diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C index a7ef01306c7671838f78c5b49f3b04d7e568a82f..8b2b66ec046b8313dbac58e5a6bfd7b3ebc888ef 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C @@ -46,23 +46,37 @@ namespace Foam Foam::cyclicGAMGInterface::cyclicGAMGInterface ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing ) : - cyclicLduInterface - ( - refCast<const cyclicLduInterface>(fineInterface).neighbPatchID() - ), GAMGInterface ( + index, + coarseInterfaces, fineInterface, localRestrictAddressing, neighbourRestrictAddressing ), fineCyclicInterface_(refCast<const cyclicLduInterface>(fineInterface)) { +// //if (debug) +// { +// Pout<< "On fineInterface " << index << " with faceCells:" +// << fineInterface.faceCells() << endl; +// forAll(localRestrictAddressing, ffi) +// { +// Pout<< " local face " << ffi +// << " is on agglom cell " << localRestrictAddressing[ffi] +// << " nbr face on agglom cell " +// << neighbourRestrictAddressing[ffi] +// << endl; +// } +// } + // Make a lookup table of entries for owner/neighbour Map<SLList<label> > neighboursTable ( @@ -77,20 +91,32 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface label nCoarseFaces = 0; - label sizeBy2 = localRestrictAddressing.size()/2; - - for (label ffi=0; ffi<sizeBy2; ffi++) + forAll (localRestrictAddressing, ffi) { - label curMaster = localRestrictAddressing[ffi]; - label curSlave = localRestrictAddressing[ffi + sizeBy2]; + label curMaster = -1; + label curSlave = -1; + + // Do switching on master/slave indexes based on the owner/neighbour of + // the processor index such that both sides get the same answer. + if (owner()) + { + // Master side + curMaster = localRestrictAddressing[ffi]; + curSlave = neighbourRestrictAddressing[ffi]; + } + else + { + // Slave side + curMaster = neighbourRestrictAddressing[ffi]; + curSlave = localRestrictAddressing[ffi]; + } // Look for the master cell. If it has already got a face, - // add the coefficient to the face. If not, create a new - // face. + // add the coefficient to the face. If not, create a new face. if (neighboursTable.found(curMaster)) { - // Check all current neighbours to see if the current - // slave already exists. If so, add the coefficient. + // Check all current neighbours to see if the current slave already + // exists and if so, add the fine face to the agglomeration. SLList<label>& curNbrs = neighboursTable.find(curMaster)(); @@ -141,81 +167,110 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface } // end for all fine faces - faceCells_.setSize(2*nCoarseFaces, -1); - faceRestrictAddressing_.setSize(localRestrictAddressing.size(), -1); + + //faceCells_.setSize(nCoarseFaces, -1); + faceCells_.setSize(2*nCoarseFaces); + faceRestrictAddressing_.setSize(localRestrictAddressing.size()); labelList contents = neighboursTable.toc(); // Reset face counter for re-use nCoarseFaces = 0; - // On master side, the owner addressing is stored in table of contents - forAll (contents, masterI) +// if (owner()) { - SLList<label>& curNbrs = neighboursTable.find(contents[masterI])(); + // On master side, the owner addressing is stored in table of contents + forAll (contents, masterI) + { + SLList<label>& curNbrs = neighboursTable.find(contents[masterI])(); - SLList<SLList<label> >& curFaceFaces = - faceFaceTable.find(contents[masterI])(); + SLList<SLList<label> >& curFaceFaces = + faceFaceTable.find(contents[masterI])(); - SLList<label>::iterator nbrsIter = curNbrs.begin(); - SLList<SLList<label> >::iterator faceFacesIter = curFaceFaces.begin(); + SLList<label>::iterator nbrsIter = curNbrs.begin(); - for - ( - ; - nbrsIter != curNbrs.end(), faceFacesIter != curFaceFaces.end(); - ++nbrsIter, ++faceFacesIter - ) - { - faceCells_[nCoarseFaces] = contents[masterI]; + SLList<SLList<label> >::iterator faceFacesIter = + curFaceFaces.begin(); for ( - SLList<label>::iterator facesIter = faceFacesIter().begin(); - facesIter != faceFacesIter().end(); - ++facesIter + ; + nbrsIter != curNbrs.end(), faceFacesIter != curFaceFaces.end(); + ++nbrsIter, ++faceFacesIter ) { - faceRestrictAddressing_[facesIter()] = nCoarseFaces; - } + faceCells_[nCoarseFaces] = contents[masterI]; + + for + ( + SLList<label>::iterator facesIter = faceFacesIter().begin(); + facesIter != faceFacesIter().end(); + ++facesIter + ) + { + faceRestrictAddressing_[facesIter()] = nCoarseFaces; + } - nCoarseFaces++; + nCoarseFaces++; + } } } - - // On slave side, the owner addressing is stored in linked lists - forAll (contents, masterI) +// else { - SLList<label>& curNbrs = neighboursTable.find(contents[masterI])(); + // On slave side, the owner addressing is stored in linked lists + forAll (contents, masterI) + { + SLList<label>& curNbrs = neighboursTable.find(contents[masterI])(); - SLList<SLList<label> >& curFaceFaces = - faceFaceTable.find(contents[masterI])(); + SLList<SLList<label> >& curFaceFaces = + faceFaceTable.find(contents[masterI])(); - SLList<label>::iterator nbrsIter = curNbrs.begin(); - SLList<SLList<label> >::iterator faceFacesIter = curFaceFaces.begin(); + SLList<label>::iterator nbrsIter = curNbrs.begin(); - for - ( - ; - nbrsIter != curNbrs.end(), faceFacesIter != curFaceFaces.end(); - ++nbrsIter, ++faceFacesIter - ) - { - faceCells_[nCoarseFaces] = nbrsIter(); + SLList<SLList<label> >::iterator faceFacesIter = + curFaceFaces.begin(); for ( - SLList<label>::iterator facesIter = faceFacesIter().begin(); - facesIter != faceFacesIter().end(); - ++facesIter + ; + nbrsIter != curNbrs.end(), faceFacesIter != curFaceFaces.end(); + ++nbrsIter, ++faceFacesIter ) { - faceRestrictAddressing_[facesIter() + sizeBy2] = nCoarseFaces; - } + faceCells_[nCoarseFaces] = nbrsIter(); + + for + ( + SLList<label>::iterator facesIter = faceFacesIter().begin(); + facesIter != faceFacesIter().end(); + ++facesIter + ) + { + faceRestrictAddressing_[facesIter()] = nCoarseFaces; + } - nCoarseFaces++; + nCoarseFaces++; + } } } + + +// //if (debug) +// { +// Pout<< "On fineInterface " << index << " with faceCells:" +// << fineInterface.faceCells() << endl; +// forAll(faceRestrictAddressing_, ffi) +// { +// Pout<< " local face " << ffi +// << " gets agglomerated into coarse local face " +// << faceRestrictAddressing_[ffi] +// << " with coarse cells:" << endl; +// forAll(faceCells_, i) +// { +// Pout<< " " << faceCells_[i] << endl; +// } +// } +// } } @@ -227,28 +282,28 @@ Foam::cyclicGAMGInterface::~cyclicGAMGInterface() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::transfer -( - const Pstream::commsTypes, - const unallocLabelList& interfaceData -) const -{ - notImplemented("cyclicGAMGInterface::transfer(..)"); - -//XXXXX to be done - tmp<labelField> tpnf(new labelField(size())); - labelField& pnf = tpnf(); - - label sizeby2 = size()/2; - - for (label facei=0; facei<sizeby2; facei++) - { - pnf[facei] = interfaceData[facei + sizeby2]; - pnf[facei + sizeby2] = interfaceData[facei]; - } - - return tpnf; -} +//Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::transfer +//( +// const Pstream::commsTypes, +// const unallocLabelList& interfaceData +//) const +//{ +// notImplemented("cyclicGAMGInterface::transfer(..)"); +// +////XXXXX to be done +// tmp<labelField> tpnf(new labelField(size())); +// labelField& pnf = tpnf(); +// +// label sizeby2 = size()/2; +// +// for (label facei=0; facei<sizeby2; facei++) +// { +// pnf[facei] = interfaceData[facei + sizeby2]; +// pnf[facei + sizeby2] = interfaceData[facei]; +// } +// +// return tpnf; +//} Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer @@ -257,16 +312,18 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer const unallocLabelList& iF ) const { - notImplemented("cyclicGAMGInterface::internalFieldTransfer(..)"); + const cyclicGAMGInterface& nbr = dynamic_cast<const cyclicGAMGInterface&> + ( + neighbPatch() + ); + const unallocLabelList& nbrFaceCells = nbr.faceCells(); -//XXXXX to be done tmp<labelField> tpnf(new labelField(size())); labelField& pnf = tpnf(); forAll(pnf, facei) { - pnf[facei] = iF[faceCells_[facei + sizeby2]]; - pnf[facei + sizeby2] = iF[faceCells_[facei]]; + pnf[facei] = iF[nbrFaceCells[facei]]; } return tpnf; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H index 3bdeab73382915f295579f56066c8726e7a599d7..3b12da74f96baea27101330799eb32f5823f1248 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H @@ -81,6 +81,8 @@ public: // local and neighbour restrict addressing cyclicGAMGInterface ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& restrictAddressing, const labelField& neighbourRestrictAddressing @@ -96,12 +98,12 @@ public: // Interface transfer functions - //- Transfer and return neighbour field - virtual tmp<labelField> transfer - ( - const Pstream::commsTypes commsType, - const unallocLabelList& interfaceData - ) const; +// //- Transfer and return neighbour field +// virtual tmp<labelField> transfer +// ( +// const Pstream::commsTypes commsType, +// const unallocLabelList& interfaceData +// ) const; //- Transfer and return internal field adjacent to the interface virtual tmp<labelField> internalFieldTransfer @@ -113,6 +115,31 @@ public: //- Cyclic interface functions +// //- Return my index +// virtual label patchID() const +// { +// return fineCyclicInterface_.patchID(); +// } + + //- Return neigbour processor number + virtual label neighbPatchID() const + { + return fineCyclicInterface_.neighbPatchID(); + } + + virtual bool owner() const + { + return fineCyclicInterface_.owner(); + } + + virtual const cyclicLduInterface& neighbPatch() const + { + return dynamic_cast<const cyclicLduInterface&> + ( + coarseInterfaces_[neighbPatchID()] + ); + } + //- Return face transformation tensor virtual const tensor& forwardT() const { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C index cd0857925b7077430e106554beb1638c52bc760e..e822992798c030fc6d7094ad2b66aca24e6d8ee1 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C @@ -26,6 +26,7 @@ License #include "processorGAMGInterface.H" #include "addToRunTimeSelectionTable.H" +#include "Map.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -45,6 +46,8 @@ namespace Foam Foam::processorGAMGInterface::processorGAMGInterface ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing @@ -52,6 +55,8 @@ Foam::processorGAMGInterface::processorGAMGInterface : GAMGInterface ( + index, + coarseInterfaces, fineInterface, localRestrictAddressing, neighbourRestrictAddressing @@ -59,13 +64,13 @@ Foam::processorGAMGInterface::processorGAMGInterface fineProcInterface_(refCast<const processorLduInterface>(fineInterface)) { // Make a lookup table of entries for owner/neighbour - HashTable<SLList<label>, label, Hash<label> > neighboursTable + Map<SLList<label> > neighboursTable ( localRestrictAddressing.size() ); // Table of face-sets to be agglomerated - HashTable<SLList<SLList<label> >, label, Hash<label> > faceFaceTable + Map<SLList<SLList<label> > > faceFaceTable ( localRestrictAddressing.size() ); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H index fd885ed9bd28a8c66186ccd8ddcd4d02dd4f1978..7f97c51e17ee36ffccd1c0163ac5464ffc61894e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.H @@ -81,6 +81,8 @@ public: // local and neighbour restrict addressing processorGAMGInterface ( + const label index, + const lduInterfacePtrsList& coarseInterfaces, const lduInterface& fineInterface, const labelField& restrictAddressing, const labelField& neighbourRestrictAddressing @@ -140,10 +142,16 @@ public: } //- Return face transformation tensor - virtual const tensorField& forwardT() const + virtual const tensor& forwardT() const { return fineProcInterface_.forwardT(); } + + //- Return message tag used for sending + virtual int tag() const + { + return fineProcInterface_.tag(); + } }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C index e25244da12c60a6198f34273afc9fded56ca9708..ac4b79159fc6170536cca9182d6892dbfebfd27b 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C @@ -54,28 +54,7 @@ void Foam::cyclicPointPatch::initGeometry(PstreamBuffers&) void Foam::cyclicPointPatch::calcGeometry(PstreamBuffers&) -{ - const edgeList& cp = cyclicPolyPatch_.coupledPoints(); - const labelList& mp = cyclicPolyPatch_.meshPoints(); - - DynamicList<label> separated; - forAll(cp, i) - { - const edge& coupledSet = cp[i]; - - // Assume all points are separated. - separated.append(coupledSet[0]); - separated.append(coupledSet[1]); - } - separatedPoints_.transfer(separated); - - if (debug) - { - Pout<< "cyclic:" << cyclicPolyPatch_.name() - << " separated:" << separatedPoints_.size() - << " out of points:" << mp.size() << endl; - } -} +{} void cyclicPointPatch::initMovePoints(PstreamBuffers&, const pointField&) @@ -127,10 +106,10 @@ const edgeList& cyclicPointPatch::transformPairs() const } -const labelList& cyclicPointPatch::separatedPoints() const -{ - return separatedPoints_; -} +//const labelList& cyclicPointPatch::separatedPoints() const +//{ +// return separatedPoints_; +//} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H index 6677c7de6cd6d92bc81aa059102d9d105c048d26..1642d81f06b221be4f12a433c002538e9d81d1ab 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H @@ -58,8 +58,8 @@ class cyclicPointPatch //- Local reference cast into the cyclic patch const cyclicPolyPatch& cyclicPolyPatch_; - //- List of local points that are not collocated - mutable labelList separatedPoints_; +// //- List of local points that are not collocated +// mutable labelList separatedPoints_; // Private Member Functions @@ -156,8 +156,8 @@ public: // neighbour patch. virtual const edgeList& transformPairs() const; - //- List of separated coupled points - virtual const labelList& separatedPoints() const; +// //- List of separated coupled points +// virtual const labelList& separatedPoints() const; }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C index 7f6c3f571fb03007653a0585bf682a78e57fc08c..e1c081a5a56e8391e774a1d664067505ea093b7b 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C @@ -77,51 +77,7 @@ void Foam::processorPointPatch::initGeometry(PstreamBuffers& pBufs) void Foam::processorPointPatch::calcGeometry(PstreamBuffers& pBufs) -{ - if (Pstream::parRun()) - { - const boolList& collocated = procPolyPatch_.collocated(); - - if (collocated.size() == 0) - { - separatedPoints_.setSize(0); - } - else if (collocated.size() == 1) - { - // Uniformly - if (collocated[0]) - { - separatedPoints_.setSize(0); - } - else - { - separatedPoints_ = identity(size()); - } - } - else - { - // Per face collocated or not. - const labelListList& pointFaces = procPolyPatch_.pointFaces(); - - DynamicList<label> separated; - forAll(pointFaces, pfi) - { - if (!collocated[pointFaces[pfi][0]]) - { - separated.append(pfi); - } - } - separatedPoints_.transfer(separated); - } - } - - if (debug) - { - Pout<< "processor:" << name() - << " separated:" << separatedPoints_.size() - << " out of points:" << size() << endl; - } -} +{} void processorPointPatch::initMovePoints(PstreamBuffers&, const pointField&) @@ -173,12 +129,6 @@ const labelList& processorPointPatch::reverseMeshPoints() const } -const labelList& processorPointPatch::separatedPoints() const -{ - return separatedPoints_; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H index 0bfdbafe55592832323f716c92717d4a05ea04f6..e0a4c31aae81013441b987e60c9426dc9fa27d6c 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H @@ -66,7 +66,7 @@ class processorPointPatch mutable labelList reverseMeshPoints_; - mutable labelList separatedPoints_; +// mutable labelList separatedPoints_; // Private Member Functions @@ -170,8 +170,8 @@ public: //- Return mesh points in the correct order for the receiving side const labelList& reverseMeshPoints() const; - //- List of separated coupled points - virtual const labelList& separatedPoints() const; +// //- List of separated coupled points +// virtual const labelList& separatedPoints() const; }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processorCyclic/processorCyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processorCyclic/processorCyclicPointPatch.H index 71f8bbc50cbada62842480628d2c30d6795aa1f7..9363e5096c94406d9b00d068e276be4cb3439f38 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processorCyclic/processorCyclicPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processorCyclic/processorCyclicPointPatch.H @@ -137,11 +137,11 @@ public: // return !isMaster(); // } // -// //- Return the underlying processorPolyPatch -// const processorPolyPatch& procPolyPatch() const -// { -// return procPolyPatch_; -// } + //- Return the underlying processorCyclicPolyPatch + const processorCyclicPolyPatch& procCyclicPolyPatch() const + { + return procCycPolyPatch_; + } }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.H index 5b37f6a3adaff46b270ef01eb46ba9c3b74cb16b..ef6f67035deb77896e474b917ac1e2e38c2f0903 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.H @@ -110,8 +110,8 @@ public: return true; } - //- List of separated coupled points - virtual const labelList& separatedPoints() const = 0; + ////- List of separated coupled points + //virtual const labelList& separatedPoints() const = 0; }; diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 00577cdbbfc7215543a7e00be1b68c3bcd1d8158..96a97707cf983f12e21731c9662988c8fac215a2 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -26,6 +26,7 @@ License #include "globalPoints.H" #include "processorPolyPatch.H" +#include "processorCyclicPolyPatch.H" #include "cyclicPolyPatch.H" #include "polyMesh.H" diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H index 43c0d179408620890c84d57a7df7e4989f03d98c..f050a4368a25cb219af71cb88bea0cb0671fcf43 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H @@ -159,10 +159,6 @@ class globalPoints // Private Member Functions - //- Return per point collocated status - static PackedBoolList collocatedPoints(const coupledPolyPatch&); - - // Wrappers around global point numbering to add collocated bit //- Convert into globalIndices and add collocated bit diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H index ce8f3e1982c6f3227d0ecdb9104cf3e5a66ec9a3..a81546ee57232307d4b037c38acf6369fe3bfacf 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H @@ -325,7 +325,7 @@ public: } //- Neighbour patchID. - label neighbPatchID() const + virtual label neighbPatchID() const { if (neighbPatchID_ == -1) { @@ -345,12 +345,12 @@ public: return neighbPatchID_; } - bool owner() const + virtual bool owner() const { return index() < neighbPatchID(); } - bool neighbour() const + virtual bool neighbour() const { return !owner(); } diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 668e6b6e7283b58cc4f5cfe436d3b9b776398f23..1747695bf529dfe4fec597bcd87ac9cf911e617d 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -178,10 +178,8 @@ fields/surfaceFields/surfaceFields.C fvMatrices/fvMatrices.C fvMatrices/fvScalarMatrix/fvScalarMatrix.C -/* fvMatrices/solvers/MULES/MULES.C fvMatrices/solvers/GAMGSymSolver/GAMGAgglomerations/faceAreaPairGAMGAgglomeration/faceAreaPairGAMGAgglomeration.C -*/ interpolation = interpolation/interpolation $(interpolation)/interpolation/interpolations.C @@ -218,7 +216,6 @@ $(schemes)/localBlended/localBlended.C $(schemes)/localMax/localMax.C $(schemes)/localMin/localMin.C -/* $(schemes)/linearFit/linearFit.C $(schemes)/biLinearFit/biLinearFit.C $(schemes)/quadraticLinearFit/quadraticLinearFit.C @@ -227,9 +224,10 @@ $(schemes)/quadraticFit/quadraticFit.C $(schemes)/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C $(schemes)/quadraticUpwindFit/quadraticUpwindFit.C $(schemes)/cubicUpwindFit/cubicUpwindFit.C +/* $(schemes)/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C -$(schemes)/linearPureUpwindFit/linearPureUpwindFit.C */ +$(schemes)/linearPureUpwindFit/linearPureUpwindFit.C limitedSchemes = $(surfaceInterpolation)/limitedSchemes $(limitedSchemes)/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C @@ -260,7 +258,6 @@ multivariateSchemes = $(surfaceInterpolation)/multivariateSchemes $(multivariateSchemes)/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationSchemes.C $(multivariateSchemes)/multivariateSelectionScheme/multivariateSelectionSchemes.C $(multivariateSchemes)/upwind/multivariateUpwind.C -/* $(multivariateSchemes)/Gamma/multivariateGamma.C $(multivariateSchemes)/vanLeer/multivariateVanLeer.C $(multivariateSchemes)/Minmod/multivariateMinmod.C @@ -268,7 +265,6 @@ $(multivariateSchemes)/SuperBee/multivariateSuperBee.C $(multivariateSchemes)/MUSCL/multivariateMUSCL.C $(multivariateSchemes)/limitedLinear/multivariateLimitedLinear.C $(multivariateSchemes)/limitedCubic/multivariateLimitedCubic.C -*/ finiteVolume/fv/fv.C finiteVolume/fvSchemes/fvSchemes.C @@ -297,21 +293,17 @@ gradSchemes = finiteVolume/gradSchemes $(gradSchemes)/gradScheme/gradSchemes.C $(gradSchemes)/gaussGrad/gaussGrads.C -/* $(gradSchemes)/leastSquaresGrad/leastSquaresVectors.C $(gradSchemes)/leastSquaresGrad/leastSquaresGrads.C $(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C $(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresGrads.C $(gradSchemes)/fourthGrad/fourthGrads.C -*/ limitedGradSchemes = $(gradSchemes)/limitedGradSchemes -/* $(limitedGradSchemes)/faceLimitedGrad/faceLimitedGrads.C $(limitedGradSchemes)/cellLimitedGrad/cellLimitedGrads.C $(limitedGradSchemes)/faceMDLimitedGrad/faceMDLimitedGrads.C $(limitedGradSchemes)/cellMDLimitedGrad/cellMDLimitedGrads.C -*/ snGradSchemes = finiteVolume/snGradSchemes $(snGradSchemes)/snGradScheme/snGradSchemes.C diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H index c096563b2ee4885e5135499322cae8eff334573e..0bf2d5d4f43d0c27937b263792e24ad8cacfb365 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.H @@ -83,10 +83,6 @@ public: cyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm) : coupledFvPatch(patch, bm), - cyclicLduInterface - ( - refCast<const cyclicPolyPatch>(patch).neighbPatchID() - ), cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch)) {} @@ -101,6 +97,26 @@ public: return cyclicPolyPatch_; } + //- Return neighbour + virtual label neighbPatchID() const + { + return cyclicPolyPatch_.neighbPatchID(); + } + + virtual bool owner() const + { + return cyclicPolyPatch_.owner(); + } + + //- Return processor number + virtual const cyclicLduInterface& neighbPatch() const + { + return refCast<const cyclicFvPatch> + ( + this->boundaryMesh()[cyclicPolyPatch_.neighbPatchID()] + ); + } + //- Are the cyclic planes parallel virtual bool parallel() const {