diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md index 3f93464adb..1423a4aa00 100644 --- a/.gitlab/issue_templates/bug.md +++ b/.gitlab/issue_templates/bug.md @@ -1,52 +1,71 @@ - + 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 +--> + + ### Summary -(Summarize the bug encountered concisely) + ### Steps to reproduce -(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) + ### What is the current *bug* behaviour? -(What actually happens) + ### What is the expected *correct* behavior? -(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.) + ### Environment information -(OpenFOAM version : XXX) -(Operating system : XXX) -(Hardware info : XXX) - + +OpenFOAM version : +Operating system : +Compiler : ### Possible fixes -(If you can, link to the line of code that might be responsible for the problem) + /label ~bug diff --git a/META-INFO/api-info b/META-INFO/api-info index 55c6b27605..0bbf85a510 100644 --- a/META-INFO/api-info +++ b/META-INFO/api-info @@ -1,2 +1,2 @@ -api=1902 -patch=0 +api=1812 +patch=190403 diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H index 2719ccc85a..07341e6dad 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 5ab48ff99d..a35a3de15e 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 e2a96e898f..270843cf7f 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 6765c12d65..9f5127a327 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 afa99cb198..3667812e36 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("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 5af3579028..7074ad5c96 100755 --- a/bin/tools/foamCreateModuleInclude +++ b/bin/tools/foamCreateModuleInclude @@ -3,10 +3,8 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. -# \\/ M anipulation | -#------------------------------------------------------------------------------ -# | Copyright (C) 2016-2017 CINECA +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2017 CINECA #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -29,8 +27,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 +40,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 +66,7 @@ die() #------------------------------------------------------------------------------ -unset optBackend optDebug preload projectDir +unset optBackend optDebug optPrefs preloads projectDir unset moduleOutput moduleTmpDir # Parse some options @@ -81,8 +82,11 @@ do -debug) optDebug=true ;; + -prefs=*) + optPrefs="${1#*=}" + ;; -preload=*) - preload="$preload${preload:+ }${1#*=}" + preloads="$preloads${preloads:+ }${1#*=}" ;; --recursive-backend--) optBackend=true @@ -132,7 +136,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 +152,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 +171,7 @@ fi : ${moduleTmpDir:=${TMPDIR:-/tmp}} # Preload any/all modules -for file in $preloads +for file in "$preloads" do [ -f "$file" ] && . "$file" '' done @@ -215,7 +220,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 +234,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 +254,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 9ac24c7073..4f652d2ab6 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 47aa3ede72..84ba7742bd 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 149a2d9f10..bc3b2608ed 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 bc904e8e27..53dda11eac 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 2fa3fc0bec..da762b641d 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C @@ -2,10 +2,8 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- - | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,11 +26,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 +48,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 9e53e2850b..d4a9953c51 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 diff --git a/wmake/rules/linuxARM7Gcc/c b/wmake/rules/linuxARM7Gcc/c index 47425f974b..2cff6a24d7 100644 --- a/wmake/rules/linuxARM7Gcc/c +++ b/wmake/rules/linuxARM7Gcc/c @@ -1,7 +1,9 @@ -include $(GENERAL_RULES)/Gcc/c +SUFFIXES += .c cc = gcc -mcpu=cortex-a9 +cWARN = -Wall + include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC