diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md index 3f93464adbfb860efa26f3a7901a48107e829671..1423a4aa00846121070997778dca4f30766bb216 100644 --- a/.gitlab/issue_templates/bug.md +++ b/.gitlab/issue_templates/bug.md @@ -1,52 +1,71 @@ -<!--- -Please read this! +<!-- + *** Please read this first! *** -Before opening a new issue, make sure to search for keywords in the issues -filtered by the "bug" label and check to see if it has already been reported ----> + Before opening a new issue, make sure to search for keywords in the issues + filtered by the "bug" label and check to see if it has already been reported +--> + +<!-- + All text between these markers are comments and will not be present in the + report +--> ### Summary -(Summarize the bug encountered concisely) +<!-- Summarize the bug encountered concisely --> ### Steps to reproduce -(How one can reproduce the issue - this is very important) +<!-- How one can reproduce the issue - this is very important --> ### Example case -(If possible, please create a SMALL example case and attach it to your bug report) +<!-- + If possible, please create a SMALL example and attach it to your report -(If you are using an older version of OpenFOAM this will also determine whether the bug has been fixed in a more recent version) + If you are using an older version of OpenFOAM this will also determine + whether the bug has been fixed in a more recent version +--> ### What is the current *bug* behaviour? -(What actually happens) +<!-- What actually happens --> ### What is the expected *correct* behavior? -(What you should see instead) +<!-- What you should see instead --> ### Relevant logs and/or images -(Paste any relevant logs - please use code blocks (```) to format console output, -logs, and code as it's very hard to read otherwise.) +<!-- + Paste any relevant logs - please use code blocks (```) to format console + output, logs, and code as it's very hard to read otherwise. +--> ### Environment information -(OpenFOAM version : XXX) -(Operating system : XXX) -(Hardware info : XXX) - +<!-- + Providing details of your set-up can help us identify any issues, e.g. + OpenFOAM version : v1806|v1812|v1906 etc + Operating system : ubuntu|openSUSE|centos etc + Hardware info : any info that may help? + Compiler : gcc|intel|clang etc + --> +OpenFOAM version : +Operating system : +Compiler : ### Possible fixes -(If you can, link to the line of code that might be responsible for the problem) +<!-- + If you can, link to the line of code that might be responsible for the + problem +--> /label ~bug diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H index 2719ccc85a4442365ea886b13af5f6159f13ce6e..07341e6dad46dcf0c543e8afced3b35d7b989799 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H @@ -94,7 +94,7 @@ if (doLagrangian) ); Info<< " Lagrangian: " - << runTime.relativePath(writer.output()) << nl; + << args.relativePath(writer.output()) << nl; writer.writeTimeValue(mesh.time().value()); writer.writeGeometry(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertSurfaceFields.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertSurfaceFields.H index 5ab48ff99d95b685f0dd41c44dc71e77bfbc72de..a35a3de15e4ee889ac3390eb2603b8a122ffde41 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertSurfaceFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertSurfaceFields.H @@ -107,7 +107,7 @@ Description ); Info<< " Surface : " - << runTime.relativePath(writer.output()) << nl; + << args.relativePath(writer.output()) << nl; writer.writeTimeValue(timeValue); @@ -211,7 +211,7 @@ Description ); Info<< " FaceZone : " - << runTime.relativePath(writer.output()) << nl; + << args.relativePath(writer.output()) << nl; writer.beginFile(fz.name()); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertTopoSet.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertTopoSet.H index e2a96e898f7a2f9dd11169b4cba419d5dd0406bc..270843cf7f1ac446b0b9a1d93351d3f2fa522782 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertTopoSet.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertTopoSet.H @@ -42,7 +42,7 @@ if (faceSetName.size()) ); Info<< " faceSet : " - << runTime.relativePath(outputName) << nl; + << args.relativePath(outputName) << nl; vtk::writeFaceSet ( @@ -70,7 +70,7 @@ if (pointSetName.size()) ); Info<< " pointSet : " - << runTime.relativePath(outputName) << nl; + << args.relativePath(outputName) << nl; vtk::writePointSet ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H index 6765c12d651cc02fe9bacac214ee69134b94d662..9f5127a32739dbff5bc6fe0592d6ca9434c019f5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H @@ -113,7 +113,7 @@ Description ); Info<< " Internal : " - << runTime.relativePath(internalWriter->output()) << nl; + << args.relativePath(internalWriter->output()) << nl; internalWriter->writeTimeValue(mesh.time().value()); internalWriter->writeGeometry(); @@ -163,7 +163,7 @@ Description ); Info<< " Boundaries: " - << runTime.relativePath(writer->output()) << nl; + << args.relativePath(writer->output()) << nl; writer->writeTimeValue(timeValue); writer->writeGeometry(); @@ -229,7 +229,7 @@ Description ); Info<< " Boundary : " - << runTime.relativePath(writer->output()) << nl; + << args.relativePath(writer->output()) << nl; writer->writeTimeValue(timeValue); writer->writeGeometry(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 3e608dbcb7f041647a00e42b48b3b5ad920f8225..119e69b87453914b49cc0c9769e77b43d72d558a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -647,7 +647,7 @@ int main(int argc, char *argv[]) fvMeshSubsetProxy::subsetType cellSubsetType = fvMeshSubsetProxy::NONE; - string vtkName = runTime.globalCaseName(); + string vtkName = args.globalCaseName(); if (regionNames.size() == 1) { @@ -700,7 +700,7 @@ int main(int argc, char *argv[]) // Sub-directory for output const word vtkDirName = args.opt<word>("name", "VTK"); - const fileName outputDir(runTime.globalPath()/vtkDirName); + const fileName outputDir(args.globalPath()/vtkDirName); if (Pstream::master()) { @@ -722,7 +722,7 @@ int main(int argc, char *argv[]) if (args.found("overwrite") && isDir(regionDir)) { Info<< "Removing old directory " - << runTime.relativePath(regionDir) + << args.relativePath(regionDir) << nl << endl; rmDir(regionDir); } diff --git a/bin/tools/foamCreateModuleInclude b/bin/tools/foamCreateModuleInclude index 5af35790289ba6f9523b6f7605d6f2735b8204da..f81615c63c4fc235f50d61c60673a443d6655094 100755 --- a/bin/tools/foamCreateModuleInclude +++ b/bin/tools/foamCreateModuleInclude @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2016-2017 CINECA @@ -29,8 +29,10 @@ # # Description # Script to create module settings. +# # This is still incomplete, but can be a useful basis when using a module # system. +# #------------------------------------------------------------------------------ usage() { exec 1>&2 @@ -40,7 +42,8 @@ usage() { usage: ${0##*/} [OPTION] projectDir options: -output=file The output name (default: ModuleInclude.tcl) - -preload=file Specify (module) file to preload. Can use multiple times + -prefs=file A preferences file (OpenFOAM) to load. + -preload=file Specify a shell file to preload. Can use multiple times -tmpdir=file The tmp directory to use. -help Print the usage @@ -65,7 +68,7 @@ die() #------------------------------------------------------------------------------ -unset optBackend optDebug preload projectDir +unset optBackend optDebug optPrefs preloads projectDir unset moduleOutput moduleTmpDir # Parse some options @@ -81,8 +84,11 @@ do -debug) optDebug=true ;; + -prefs=*) + optPrefs="${1#*=}" + ;; -preload=*) - preload="$preload${preload:+ }${1#*=}" + preloads="$preloads${preloads:+ }${1#*=}" ;; --recursive-backend--) optBackend=true @@ -132,7 +138,7 @@ then die "Incorrect projectDir? $projectDir" # Check preloads - for file in $preloads + for file in "$preloads" do [ -f "$file" ] || echo "No such file to preload: $file" 1>&2 done @@ -148,7 +154,8 @@ then $0 \ --recursive-backend-- \ "${optDebug:+-debug}" \ - "${output:+-output=$moduleOutput}" \ + "${optPrefs:+-prefs=$optPrefs}" \ + "${moduleOutput:+-output=$moduleOutput}" \ "${preloads:+-preload=$preloads}" \ "${moduleTmpDir:+-tmpdir=$moduleTmpDir}" \ $projectDir @@ -166,7 +173,7 @@ fi : ${moduleTmpDir:=${TMPDIR:-/tmp}} # Preload any/all modules -for file in $preloads +for file in "$preloads" do [ -f "$file" ] && . "$file" '' done @@ -215,7 +222,7 @@ printEnv > $tmpFiles.env.pre.log printAlias > $tmpFiles.alias.pre.log # OpenFOAM settings -. $projectDir/etc/bashrc '' +. $projectDir/etc/bashrc "$optPrefs" echo "Using openfoam: $WM_PROJECT_DIR" 1>&2 echo "==> $moduleOutput" 1>&2 @@ -229,7 +236,9 @@ unset SCOTCH_VERSION # Also remove user directories as being unreliable -foamOldDirs="$CEI_HOME $BOOST_ARCH_PATH $CGAL_ARCH_PATH $FFTW_ARCH_PATH $MPI_ARCH_PATH $SCOTCH_ARCH_PATH \ +foamOldDirs="$BOOST_ARCH_PATH $CGAL_ARCH_PATH $FFTW_ARCH_PATH \ +$MESA_ARCH_PATH $LLVM_ARCH_PATH \ +$MPI_ARCH_PATH $SCOTCH_ARCH_PATH \ $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN $WM_PROJECT_SITE \ $FOAM_USER_APPBIN $FOAM_USER_LIBBIN" foamClean=$WM_PROJECT_DIR/bin/foamCleanPath @@ -247,9 +256,6 @@ then unset FOAM_EXT_LIBBIN fi fi -unset CEI_HOME -unset ENSIGHT9_INPUT ENSIGHT9_READER -unset ENSIGHT10_INPUT ENSIGHT10_READER # Always consider site to be bogus. If needed, should be done elsewhere. unset FOAM_SITE_APPBIN FOAM_SITE_LIBBIN WM_PROJECT_SITE diff --git a/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg b/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg index 9ac24c7073313befaddae56b5d85b7425bbc2928..4f652d2ab623fb7990e8f87ea63c88aad86fb95f 100644 --- a/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg +++ b/etc/caseDicts/postProcessing/pressure/pressureDifference.cfg @@ -12,7 +12,7 @@ libs ("libfieldFunctionObjects.so"); operation subtract; writeControl timeStep; -writeInterval 1 +writeInterval 1; log false; region1 diff --git a/etc/config.csh/settings b/etc/config.csh/settings index 47aa3ede7214d6605b1a903dae7a9d01c86763c6..84ba7742bdb24caa2f1544e585dd60fc570fd3cb 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -162,8 +162,8 @@ else endif # Shared site (group) executables/libraries -setenv FOAM_SITE_APPBIN "$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin" -setenv FOAM_SITE_LIBBIN "$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib" +setenv FOAM_SITE_APPBIN "$siteDir/$FOAM_API/platforms/$WM_OPTIONS/bin" +setenv FOAM_SITE_LIBBIN "$siteDir/$FOAM_API/platforms/$WM_OPTIONS/lib" # User executables/libraries setenv FOAM_USER_APPBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin" diff --git a/etc/config.sh/settings b/etc/config.sh/settings index 149a2d9f10a5f1e8c9d2e94e0472cbbbea9b1c45..bc3b2608ed594b23c46f300f1088ae2a1724bb6e 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -157,8 +157,8 @@ else fi # Shared site (group) executables/libraries -export FOAM_SITE_APPBIN="$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin" -export FOAM_SITE_LIBBIN="$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib" +export FOAM_SITE_APPBIN="$siteDir/$FOAM_API/platforms/$WM_OPTIONS/bin" +export FOAM_SITE_LIBBIN="$siteDir/$FOAM_API/platforms/$WM_OPTIONS/lib" # User executables/libraries export FOAM_USER_APPBIN="$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin" diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C index bc904e8e27c5e668982ca883606d399fa91e532f..53dda11eacb2ce5d976c1e9388ac2add88c76d87 100644 --- a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C +++ b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 Wikki Ltd @@ -173,6 +173,12 @@ Foam::faBoundaryMesh::faBoundaryMesh void Foam::faBoundaryMesh::calcGeometry() { + // processorFaPatch geometry triggers calculation of pointNormals. + // This uses parallel comms and hence will not be trigggered + // on processors that do not have a processorFaPatch so instead + // force construction. + (void)mesh_.pointAreaNormals(); + forAll(*this, patchi) { operator[](patchi).initGeometry(); @@ -377,6 +383,12 @@ bool Foam::faBoundaryMesh::checkDefinition(const bool report) const void Foam::faBoundaryMesh::movePoints(const pointField& p) { + // processorFaPatch geometry triggers calculation of pointNormals. + // This uses parallel comms and hence will not be trigggered + // on processors that do not have a processorFaPatch so instead + // force construction. + (void)mesh_.pointAreaNormals(); + faPatchList& patches = *this; forAll(patches, patchi) diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C index 2fa3fc0bec799085832530c096c9ad6ca84f7f99..4452e1f79e9ce34f364c467eaadf3da6274976c2 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -28,11 +28,10 @@ License #include "faceShading.H" #include "fvMesh.H" #include "boundaryRadiationProperties.H" -#include "OFstream.H" #include "cyclicAMIPolyPatch.H" #include "volFields.H" #include "distributedTriSurfaceMesh.H" - +#include "OBJstream.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -51,25 +50,14 @@ void Foam::faceShading::writeRays const pointField& myFc ) { - OFstream str(fName); - label vertI = 0; + OBJstream os(fName); - Pout<< "Dumping rays to " << str.name() << endl; + Pout<< "Dumping rays to " << os.name() << endl; forAll(myFc, faceI) { - meshTools::writeOBJ(str, myFc[faceI]); - vertI++; - meshTools::writeOBJ(str, endCf[faceI]); - vertI++; - str << "l " << vertI-1 << ' ' << vertI << nl; + os.write(linePointRef(myFc[faceI], endCf[faceI])); } - str.flush(); - - Pout<< "cmd: objToVTK " << fName.c_str() << endl; - - stringList cmd({"objToVTK", fName, fName.lessExt().ext("vtk")}); - Foam::system(cmd); } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean index 9e53e2850bd3a22ece2b0d3df4fff63f6795dd65..d4a9953c5116d9aff95672ff9f7541de5fb9ea56 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean @@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf VTK rm -rf constant/cellToRegion rm -rf constant/*/polyMesh # region meshes