diff --git a/ThirdParty/mingwBuild/clean.sh b/ThirdParty/mingwBuild/clean.sh index c9f3f6bef..dade71657 100644 --- a/ThirdParty/mingwBuild/clean.sh +++ b/ThirdParty/mingwBuild/clean.sh @@ -23,10 +23,11 @@ # along with foam-extend. If not, see . # # Script -# build.sh +# clean.sh # # Description -# Removes previous thirdy-party dependencies build directories (does not remove installed packages directory) +# Removes previous thirdy-party dependencies build directories +# (does not remove installed packages directory) # # Author: # Cesare Guardino, Alstom Power Ltd., (2015) diff --git a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index 4fb6e2572..cf821dbc4 100644 --- a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -85,9 +85,9 @@ int main(int argc, char *argv[]) // Mesh motion update if (meshChanged) { - T = max(T, TMin); - p = max(p, pMin); - e = max(e, thermo.Cv()*TMin); + T.max(TMin); + p.max(pMin); + e == max(e, thermo.Cv()*TMin); thermo.correct(); rho = thermo.rho(); diff --git a/bin/createWindowsBinaryPackage b/bin/createWindowsBinaryPackage index 0ea2fd269..43cb0b94d 100755 --- a/bin/createWindowsBinaryPackage +++ b/bin/createWindowsBinaryPackage @@ -23,7 +23,7 @@ # along with foam-extend. If not, see . # # Script -# createReleasePackage.mingw +# createWindowsBinaryPackage # # Description # Creates stand-alone .zip packages for MinGW-based builds on Windows. @@ -36,13 +36,19 @@ cd ${0%/*} || exit 1 # run from this directory create_package() { - RELEASE_DIR=$1 + PACKAGE_DIR=$1 TYPE=$2 - PACKAGE_FILE=$RELEASE_DIR.$TYPE echo "" + + PACKAGE_FILE=$PACKAGE_DIR.$TYPE + if [ -f $PACKAGE_FILE ] ; then + echo "Removing previous $PACKAGE_FILE ..." + rm -f $PACKAGE_FILE + fi + echo "Creating $PACKAGE_FILE ..." - 7z -t$TYPE a $PACKAGE_FILE $RELEASE_DIR + 7z -t$TYPE a $PACKAGE_FILE $PACKAGE_DIR if [ -f $PACKAGE_FILE ] ; then echo "Successfully created $PACKAGE_FILE" @@ -52,7 +58,7 @@ create_package() { } echo -echo "=========== FOAM-EXTEND WINDOWS STAND-ALONE PACKAGE CREATION SCRIPT ===========" +echo "=========== FOAM-EXTEND STAND-ALONE PACKAGE CREATION SCRIPT FOR WINDOWS ===========" if [ "$PWD" != "$WM_PROJECT_DIR/bin" ] then @@ -62,36 +68,43 @@ then exit 1 fi -RELEASE_DIR=$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64 -MPI_VERSION=`basename $FOAM_MPI_LIBBIN` -if [ -d $RELEASE_DIR ] ; then - echo "Removing previous $RELEASE_DIR" - rm -rf $RELEASE_DIR +RELEASE_DIR=$WM_PROJECT_DIR/releasePackages +if [ ! -d $RELEASE_DIR ] ; then + echo "Creating $RELEASE_DIR ..." + mkdir $RELEASE_DIR fi -mkdir $RELEASE_DIR + +PACKAGE_DIR=$RELEASE_DIR/$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64 +if [ -d $PACKAGE_DIR ] ; then + echo "Removing previous $PACKAGE_DIR ..." + rm -rf $PACKAGE_DIR +fi +echo "Creating $PACKAGE_DIR ..." +mkdir $PACKAGE_DIR echo "Copying bin directory ..." -cp -rp $FOAM_APPBIN $RELEASE_DIR/bin +cp -rp $FOAM_APPBIN $PACKAGE_DIR/bin echo "Copying DLLs from lib directory ..." -mkdir $RELEASE_DIR/lib -cp -p $FOAM_LIBBIN/*.dll $RELEASE_DIR/lib -mkdir $RELEASE_DIR/lib/$MPI_VERSION -cp -p $FOAM_MPI_LIBBIN/*.dll $RELEASE_DIR/lib/$MPI_VERSION +mkdir $PACKAGE_DIR/lib +cp -p $FOAM_LIBBIN/*.dll $PACKAGE_DIR/lib + +echo "Copying extra files from bin directory ..." +cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $PACKAGE_DIR/ +cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $PACKAGE_DIR/ +cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $PACKAGE_DIR/bin echo "Copying extra files from etc directory ..." -mkdir $RELEASE_DIR/etc -cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $RELEASE_DIR/ -cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $RELEASE_DIR/ -cp -p $WM_PROJECT_DIR/etc/controlDict-EXAMPLE $RELEASE_DIR/etc -cp -p $WM_PROJECT_DIR/etc/cellModels $RELEASE_DIR/etc -cp -rp $WM_PROJECT_DIR/etc/thermoData $RELEASE_DIR/etc -cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $RELEASE_DIR/ -cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $RELEASE_DIR/bin -cp -p $WM_PROJECT_DIR/COPYING $RELEASE_DIR/LICENSE.txt -unix2dos $RELEASE_DIR/LICENSE.txt +mkdir $PACKAGE_DIR/etc +cp -p $WM_PROJECT_DIR/etc/cellModels $PACKAGE_DIR/etc +cp -rp $WM_PROJECT_DIR/etc/thermoData $PACKAGE_DIR/etc -create_package $RELEASE_DIR zip -#create_package $RELEASE_DIR 7z +echo "Copying doc and license files ..." +cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $PACKAGE_DIR/ +cp -p $WM_PROJECT_DIR/COPYING $PACKAGE_DIR/LICENSE.txt +unix2dos $PACKAGE_DIR/LICENSE.txt -rm -rf $RELEASE_DIR +create_package $PACKAGE_DIR zip +create_package $PACKAGE_DIR 7z + +rm -rf $PACKAGE_DIR diff --git a/doc/buildInstructions/Windows/README.txt b/doc/buildInstructions/Windows/README.txt index d76ad1332..a620d5ac9 100644 --- a/doc/buildInstructions/Windows/README.txt +++ b/doc/buildInstructions/Windows/README.txt @@ -37,7 +37,7 @@ It is strongly recommended to install all required systems tools and utilities in a directory with no embedded white spaces. You can skip some steps if you -already have some of these system tools. +already have the correct tools installed on your system. 2. INSTRUCTIONS FOR BUILDING ON WINDOWS @@ -46,22 +46,32 @@ already have some of these system tools. 1) Download and install 7-Zip (see reference list below). This is necessary to be able to unzip the rest of the required packages mentioned in later steps. -2) Download and install wget, CMake, Git, MinGW-w64, ParaView and PExports (see - reference list below). Note that some components (example PExports and GMake) - may already be available in other packages (such as Strawberry Perl), although - you need to be careful of the version numbers. +2) Download and install wget, CMake, Git, MinGW-w64, ParaView, PExports, Java, + Subversion, Python (see reference list below). Note that some components + (for example PExports and GMake) may already be available in other packages + (such as Strawberry Perl), although you need to be careful of the + version numbers. 3) Download and install MSYS (see reference list below). If this is your first - use of MSYS, create a file fstab in cMinGW/1.0/etc with single-line contents: + use of MSYS, create a file fstab in c/MinGW/msys/1.0/etc with single-line + contents: - c/mingw /mingw + c:/mingw /mingw - to mount your home directory. From Windows, you will find your home directory - under c:/MinGW/msys/1.0/home/ + to mount your home directory (this assumes you have installed MSYS to the default + c:/MinGW directory). + From Windows, you will find your home directory under + c:/MinGW/msys/1.0/home/ -4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/ +4) Download the foam-extend source code from -5) Open a new MSYS shell and chdir to your foam-extend-3.1 source directory. + http://sourceforge.net/projects/openfoam-extend/ + + using the command: + + git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.2 + +5) Open a new MSYS shell and chdir to your foam-extend-3.2 source directory. 6) Edit the user-modifiable entries in etc/bashrc.mingw to point to the locations where you have installed the required system tools in the first two @@ -92,9 +102,9 @@ already have some of these system tools. approach for developers. (b). From a standard Windows CMD.exe command prompt using the created - foam-extend-3.1-win-x64.zip stand-alone package. This can be used on any - Windows machine without access to MSYS shells or compilers. See the README.txt - contained within the package for further details. + foam-extend-3.2-win-x64.zip stand-alone package. This can be used on any + Windows machine without access to MSYS shells or compilers. See the + READMEBinaryPackage.txt contained within the package for further details. 3. EXTERNAL PACKAGE REFERENCE @@ -115,6 +125,11 @@ Version: 1.9.5 URL : https://git-scm.com/download/win For : Version control system. Choose "Use Git from the Windows command prompt" and "Check out as-is. Commit as-is" in installer. +Name : Java +Version: Version 8 Update 60 +URL : http://www.java.com +For : Not essential + Name : Microsoft Visual C++ 2010 Redistributable Package (x64) Version: 2010 URL : http://www.microsoft.com/en-us/download/details.aspx?id=14632 @@ -147,11 +162,21 @@ Version: 0.44 (or above) URL : http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/pexports-0.46/pexports-0.46-mingw32-bin.tar.xz/download For : Extracting symbols from OpenMPI DLLs to pass to dlltool.exe (supplied in MinGW-w64 package). Move directory "bin" to "pexports-0.46" after unpacking. +Name : Pyhton +Version: 2.7 +URL : https://www.python.org/download/releases/2.7/ +For : Not essential + Name : Strawberry Perl Version: 5.20.2.1 (or above) URL : http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit.msi For : Running Perl scripts, "pexports.exe" and "gmake.exe" utilities +Name : Subversion +Version: 1.8.13 +URL : http://sourceforge.net/projects/win32svn/files/1.8.13/ +For : ?????????? + Name : wget Version: 1.11.4-1 (or above) URL : http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip @@ -160,22 +185,22 @@ For : Automatically downloading files from internet (eg. for use in automated git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 -4. EXAMPLE OUTPUT FROM SOUCING etc/bashrc.mingw -=============================================== +4. EXAMPLE OUTPUT FROM SOURCING etc/bashrc.mingw +================================================ $ . etc/bashrc.mingw Setting environment variables for user-defined installed system tools and utilities ... -Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/bashrc -Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/prefs.sh.mingw -Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh - MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/mesquite-2.1.2 - METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/metis-5.1.0 - PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/parmetis-4.0.3 - PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/ParMGridGen-1.0 +Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/bashrc +Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/prefs.sh.mingw +Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/settings.sh + MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/mesquite-2.1.2 + METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/metis-5.1.0 + PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/parmetis-4.0.3 + PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/ParMGridGen-1.0 LIBCCMIO_DIR is initialized to: - SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0 - SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0 + SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/scotch_6.0.0 + SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/scotch_6.0.0 CMAKE_DIR is initialized to: M4_DIR is initialized to: BISON_DIR is initialized to: @@ -183,13 +208,13 @@ Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh ZOLTAN_DIR is initialized to: PYTHON_DIR is initialized to: PYFOAM_DIR is initialized to: - PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/PyFoamSiteScripts + PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/PyFoamSiteScripts HWLOC_DIR is initialized to: QT_DIR is initialized to: PARAVIEW_DIR is initialized to: LLVM_DIR is initialized to: MESA_DIR is initialized to: -Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/aliases.sh +Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/aliases.sh Adding user-defined installed system tools to PATH ... Setting OpenMPI environment settings ... @@ -218,6 +243,6 @@ Wget: /c/Programs/wget-1.11.4-1/bin/wget.exe [GNU Wget 1.11.4 Copyright ( FOAM_INST_DIR=/c/Users/UserName/Git -WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.1 +WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.2 WM_OSTYPE=MSWindows ENVIRONMENT SETUP COMPLETE. diff --git a/doc/buildInstructions/Windows/READMEBinaryPackage.txt b/doc/buildInstructions/Windows/READMEBinaryPackage.txt index 33bfa3160..ecf9af4ab 100644 --- a/doc/buildInstructions/Windows/READMEBinaryPackage.txt +++ b/doc/buildInstructions/Windows/READMEBinaryPackage.txt @@ -22,7 +22,7 @@ # along with foam-extend. If not, see . # # File -# README_Windows.txt +# READMEBinaryPackage.txt # # Description # Installation and usage instructions for stand-alone Windows builds. diff --git a/etc/prefs.sh.mingw b/etc/prefs.sh.mingw index 67f196672..acafa9304 100644 --- a/etc/prefs.sh.mingw +++ b/etc/prefs.sh.mingw @@ -22,10 +22,11 @@ # along with foam-extend. If not, see . # # File -# etc/prefs.sh +# etc/prefs.sh.mingw # # Description -# Preset variables for the FOAM configuration - POSIX shell syntax. +# Preset variables for the FOAM configuration - POSIX shell syntax +# for MS Windows # # The prefs.sh file will be sourced by the FOAM etc/bashrc when it is # found diff --git a/src/ODE/sixDOF/finiteRotation/finiteRotation.C b/src/ODE/sixDOF/finiteRotation/finiteRotation.C index 534799de6..501687de9 100644 --- a/src/ODE/sixDOF/finiteRotation/finiteRotation.C +++ b/src/ODE/sixDOF/finiteRotation/finiteRotation.C @@ -70,6 +70,33 @@ Foam::scalar Foam::finiteRotation::rotAngle(const tensor& rotT) } +Foam::vector Foam::finiteRotation::eulerAngles(const tensor& rotT) +{ + // Define a vector containing euler angles (x = roll, y = pitch, z = yaw) + vector eulerAngles; + + scalar& rollAngle = eulerAngles.x(); + scalar& pitchAngle = eulerAngles.y(); + scalar& yawAngle = eulerAngles.z(); + + // Calculate roll angle + rollAngle = atan2(rotT.yz(), rotT.zz()); + + const scalar c2 = sqrt(rotT.xx() + rotT.xy()); + + // Calculate pitch angle + pitchAngle = atan2(-rotT.xz(), c2); + + const scalar s1 = sin(rollAngle); + const scalar c1 = cos(rollAngle); + + // Calculate yaw angle + yawAngle = atan2(s1*rotT.zx() - c1*rotT.yx(), c1*rotT.yy() - s1*rotT.zy()); + + return eulerAngles; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::finiteRotation::finiteRotation(const HamiltonRodriguezRot& rot) @@ -139,6 +166,12 @@ Foam::scalar Foam::finiteRotation::rotAngle() const } +Foam::vector Foam::finiteRotation::eulerAngles() const +{ + return eulerAngles(rotTensor_); +} + + const Foam::tensor& Foam::finiteRotation::rotIncrementTensor() const { return rotIncrementTensor_; diff --git a/src/ODE/sixDOF/finiteRotation/finiteRotation.H b/src/ODE/sixDOF/finiteRotation/finiteRotation.H index 28f76849b..9b46b0191 100644 --- a/src/ODE/sixDOF/finiteRotation/finiteRotation.H +++ b/src/ODE/sixDOF/finiteRotation/finiteRotation.H @@ -69,6 +69,11 @@ class finiteRotation //- Calculate rotation angle from given rotation tensor static scalar rotAngle(const tensor& rotT); + //- Calculate Euler angles (x-y-z (roll-pitch-yaw) convenction) from + // given rotation tensor. Reference: Mike Day, Insomniac Games, + // Extracting Euler Angles from a Rotation Matrix. + static vector eulerAngles(const tensor& rotT); + public: @@ -110,6 +115,9 @@ public: //- Return rotation angle scalar rotAngle() const; + //- Return Euler angles (see static function eulerAngles for convention) + vector eulerAngles() const; + // Transformations between new and previous rotation const tensor& rotIncrementTensor() const; diff --git a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H index 38a0ab108..89023e608 100644 --- a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H +++ b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H @@ -236,6 +236,9 @@ public: //- Return average velocity of origin for the previous time-step inline const dimensionedVector& Uaverage() const; + //- Return finite rotation + inline const finiteRotation& rotation() const; + //- Return acceleration of origin inline dimensionedVector A() const; @@ -246,7 +249,7 @@ public: inline dimensionedScalar rotAngle() const; - // Non-constant access to + // Non-constant access //- Set position of origin inline void setXrel(const vector& x); diff --git a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODEI.H b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODEI.H index 4247263ab..75e878040 100644 --- a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODEI.H +++ b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODEI.H @@ -172,6 +172,12 @@ const Foam::dimensionedVector& Foam::sixDOFqODE::Uaverage() const } +const Foam::finiteRotation& Foam::sixDOFqODE::rotation() const +{ + return rotation_; +} + + Foam::vector Foam::sixDOFqODE::rotVectorAverage() const { return rotation_.rotVectorAverage(); diff --git a/src/dbns/Make/options b/src/dbns/Make/options index c15372eed..7dda1a13e 100644 --- a/src/dbns/Make/options +++ b/src/dbns/Make/options @@ -9,6 +9,7 @@ EXE_INC = \ LIB_LIBS = \ -lfiniteVolume \ + -lmeshTools \ -L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lmgrid #else @@ -23,6 +24,8 @@ EXE_INC = \ LIB_LIBS = \ -lfiniteVolume \ + -lmeshTools \ -L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lMGridGen -#endif \ No newline at end of file +#endif + diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C index 3fb6d398a..b40e7e713 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C @@ -51,7 +51,8 @@ void basicSymmetryFvPatchField::evaluate(const Pstream::commsTypes) // Local typedefs typedef scalar Type; typedef outerProduct::type gradType; - typedef GeometricField gradFieldType; + typedef GeometricField + gradFieldType; if (!updated()) { @@ -141,7 +142,8 @@ tmp basicSymmetryFvPatchField::snGrad() const // Local typedefs typedef vector Type; typedef outerProduct::type gradType; - typedef GeometricField gradFieldType; + typedef GeometricField + gradFieldType; vectorField nHat = this->patch().nf(); @@ -214,7 +216,8 @@ void basicSymmetryFvPatchField::evaluate(const Pstream::commsTypes) // Local typedefs typedef vector Type; typedef outerProduct::type gradType; - typedef GeometricField gradFieldType; + typedef GeometricField + gradFieldType; if (!updated()) { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H index d6b164635..1c66c4bba 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H @@ -38,6 +38,7 @@ SourceFiles #include "coupledFvPatchField.H" #include "cyclicLduInterfaceField.H" #include "cyclicFvPatch.H" +#include "transformField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -159,11 +160,41 @@ public: //- Transform neighbour field virtual void transformCoupleField ( - scalarField& f, + scalarField& pnf, const direction cmpt ) const { - cyclicLduInterfaceField::transformCoupleField(f, cmpt); + // See comments in cyclicLduInterfaceField + // HJ, 3/Sep/2015 +// cyclicLduInterfaceField::transformCoupleField(pnf, cmpt); + if (doTransform()) + { + label sizeby2 = pnf.size()/2; + + Type powFwdTransform = transform + ( + this->forwardT()[0], + pTraits::one + ); + + scalar forwardScale = + pow(component(powFwdTransform, cmpt), rank()); + + Type powRevTransform = transform + ( + this->reverseT()[0], + pTraits::one + ); + + scalar reverseScale = + pow(component(powRevTransform, cmpt), rank()); + + for (label facei = 0; facei < sizeby2; facei++) + { + pnf[facei] *= forwardScale; + pnf[facei + sizeby2] *= reverseScale; + } + } } //- Update result field based on interface functionality diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index 91578d12c..f212163db 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -172,7 +172,10 @@ template tmp advectiveFvPatchField::advectionSpeed() const { const surfaceScalarField& phi = - this->db().objectRegistry::template lookupObject(phiName_); + this->db().objectRegistry::template lookupObject + ( + phiName_ + ); fvsPatchField phip = this->lookupPatchField ( diff --git a/src/finiteVolume/fvMatrices/fvBlockMatrix/fvBlockMatrix.C b/src/finiteVolume/fvMatrices/fvBlockMatrix/fvBlockMatrix.C index b7cc5bf30..294935d87 100644 --- a/src/finiteVolume/fvMatrices/fvBlockMatrix/fvBlockMatrix.C +++ b/src/finiteVolume/fvMatrices/fvBlockMatrix/fvBlockMatrix.C @@ -26,11 +26,16 @@ License #include "fvBlockMatrix.H" #include "IOstreams.H" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template template -void Foam::fvBlockMatrix::insertSolutionVector +void fvBlockMatrix::insertSolutionVector ( const direction dir, const Field& xSingle @@ -59,7 +64,7 @@ void Foam::fvBlockMatrix::insertSolutionVector template template -void Foam::fvBlockMatrix::insertDiagSource +void fvBlockMatrix::insertDiagSource ( const direction dir, fvMatrix& matrix @@ -162,7 +167,7 @@ void Foam::fvBlockMatrix::insertDiagSource template template -void Foam::fvBlockMatrix::insertUpperLower +void fvBlockMatrix::insertUpperLower ( const direction dir, const fvMatrix& matrix @@ -290,7 +295,7 @@ void Foam::fvBlockMatrix::insertUpperLower template template -void Foam::fvBlockMatrix::updateCouplingCoeffs +void fvBlockMatrix::updateCouplingCoeffs ( const direction dir, const fvMatrix& matrix @@ -563,7 +568,7 @@ void Foam::fvBlockMatrix::insertBoundaryContributions template -void Foam::fvBlockMatrix::insertCouplingDiag +void fvBlockMatrix::insertCouplingDiag ( const direction dirI, const direction dirJ, @@ -586,7 +591,7 @@ void Foam::fvBlockMatrix::insertCouplingDiag template -void Foam::fvBlockMatrix::insertCouplingUpperLower +void fvBlockMatrix::insertCouplingUpperLower ( const direction dirI, const direction dirJ, @@ -673,7 +678,7 @@ void Foam::fvBlockMatrix::insertCouplingUpperLower // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::fvBlockMatrix::fvBlockMatrix +fvBlockMatrix::fvBlockMatrix ( GeometricField& psi ) @@ -686,7 +691,7 @@ Foam::fvBlockMatrix::fvBlockMatrix template -Foam::fvBlockMatrix::fvBlockMatrix +fvBlockMatrix::fvBlockMatrix ( const fvBlockMatrix& bxs ) @@ -700,7 +705,7 @@ Foam::fvBlockMatrix::fvBlockMatrix template template -void Foam::fvBlockMatrix::retrieveSolution +void fvBlockMatrix::retrieveSolution ( const direction dir, Field& xSingle @@ -729,7 +734,7 @@ void Foam::fvBlockMatrix::retrieveSolution template template -void Foam::fvBlockMatrix::insertEquation +void fvBlockMatrix::insertEquation ( const direction dir, fvMatrix& matrix @@ -744,7 +749,7 @@ void Foam::fvBlockMatrix::insertEquation template template -void Foam::fvBlockMatrix::insertBlockCoupling +void fvBlockMatrix::insertBlockCoupling ( const direction dirI, const direction dirJ, @@ -773,7 +778,7 @@ void Foam::fvBlockMatrix::insertEquationCoupling template -void Foam::fvBlockMatrix::blockAdd +void fvBlockMatrix::blockAdd ( const direction dir, const scalarField& xSingle, @@ -822,7 +827,7 @@ void Foam::fvBlockMatrix::updateSourceCoupling() template -Foam::BlockSolverPerformance Foam::fvBlockMatrix::solve +BlockSolverPerformance fvBlockMatrix::solve ( const dictionary& solverControls ) @@ -844,7 +849,7 @@ Foam::BlockSolverPerformance Foam::fvBlockMatrix::solve template -Foam::BlockSolverPerformance Foam::fvBlockMatrix::solve() +BlockSolverPerformance fvBlockMatrix::solve() { return solve(psi_.mesh().solutionDict().solverDict(psi_.name())); } @@ -853,7 +858,7 @@ Foam::BlockSolverPerformance Foam::fvBlockMatrix::solve() // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template -Foam::Ostream& Foam::operator<< +Ostream& operator<< ( Ostream& os, const fvBlockMatrix& bxs @@ -866,4 +871,8 @@ Foam::Ostream& Foam::operator<< } +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + // ************************************************************************* // diff --git a/src/foam/algorithms/polygon/clipping/SutherlandHodgman.C b/src/foam/algorithms/polygon/clipping/SutherlandHodgman.C index 18934eb97..caa37636f 100644 --- a/src/foam/algorithms/polygon/clipping/SutherlandHodgman.C +++ b/src/foam/algorithms/polygon/clipping/SutherlandHodgman.C @@ -24,7 +24,7 @@ License Author Martin Beaudoin, Hydro-Quebec, (2008) -\*----------------------------------------------------------------------------*/ +\*---------------------------------------------------------------------------*/ #include "SutherlandHodgman.H" @@ -157,8 +157,8 @@ Foam::SutherlandHodgman::SutherlandHodgman Foam::List Foam::SutherlandHodgman::evaluate() { - DynamicList clippedPolygon(0); - DynamicList clippedVertexInside(0); + DynamicList clippedPolygon(0); + DynamicList clippedVertexInside(0); point2D interSectPt; label S = subjectPolygon_.size() - 1; @@ -249,7 +249,7 @@ Foam::List Foam::SutherlandHodgman::evaluate() // Are we done? if (currentClipEdgeP2_ < clippingPolygon_.size()) { - //clip against next edge, re-entrant. + // Clip against next edge, re-entrant. evaluate(); } diff --git a/src/foam/interpolations/GGIInterpolation/GGIInterpolationWeights.C b/src/foam/interpolations/GGIInterpolation/GGIInterpolationWeights.C index 796cb304b..3a39d0223 100644 --- a/src/foam/interpolations/GGIInterpolation/GGIInterpolationWeights.C +++ b/src/foam/interpolations/GGIInterpolation/GGIInterpolationWeights.C @@ -270,11 +270,6 @@ void GGIInterpolation::calcAddressing() const << "This is strange..." << endl; } - // The master face neighbours polygons projected in the plane UV - // We will only keep the ones with some area overlap - DynamicList > masterNeighFace2DPolygonInUV; - DynamicList masterNeighFace2DPolygonInUVErrorProjection; - // Next, project the candidate master neighbours faces points // onto the same plane using the new orthonormal basis const labelList& curCMN = candidateMasterNeighbors[faceMi]; @@ -614,7 +609,7 @@ GGIInterpolation::findNonOverlappingFaces tmp tpatchFaceNonOverlapAddr(new labelField()); labelField& patchFaceNonOverlapAddr = tpatchFaceNonOverlapAddr(); - DynamicList