Commit 50160baa authored by mattijs's avatar mattijs
Browse files

gamg on cyclics working again

parent 49fb39e8
......@@ -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
......
EXE_INC = \
-DFULLDEBUG -g -O0 \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
......
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......
......@@ -155,7 +155,7 @@ void cyclicPointPatchField<Type>::swapAddSeparated
}
}
addToInternalField(pField, pf, cyclicPatch_.separatedPoints());
addToInternalField(pField, pf);
}
......
......@@ -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());
// }
}
......
......@@ -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: