Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Mark Olesen
2019-04-08 12:05:24 +02:00
committed by Andrew Heather
15 changed files with 96 additions and 74 deletions

View File

@ -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 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 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 ### Summary
(Summarize the bug encountered concisely) <!-- Summarize the bug encountered concisely -->
### Steps to reproduce ### 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 ### 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 is the current *bug* behaviour?
(What actually happens) <!-- What actually happens -->
### What is the expected *correct* behavior? ### What is the expected *correct* behavior?
(What you should see instead) <!-- What you should see instead -->
### Relevant logs and/or images ### 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 ### Environment information
(OpenFOAM version : XXX) <!--
(Operating system : XXX) Providing details of your set-up can help us identify any issues, e.g.
(Hardware info : XXX) 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 ### 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 /label ~bug

View File

@ -1,2 +1,2 @@
api=1902 api=1812
patch=0 patch=190403

View File

@ -94,7 +94,7 @@ if (doLagrangian)
); );
Info<< " Lagrangian: " Info<< " Lagrangian: "
<< runTime.relativePath(writer.output()) << nl; << args.relativePath(writer.output()) << nl;
writer.writeTimeValue(mesh.time().value()); writer.writeTimeValue(mesh.time().value());
writer.writeGeometry(); writer.writeGeometry();

View File

@ -107,7 +107,7 @@ Description
); );
Info<< " Surface : " Info<< " Surface : "
<< runTime.relativePath(writer.output()) << nl; << args.relativePath(writer.output()) << nl;
writer.writeTimeValue(timeValue); writer.writeTimeValue(timeValue);
@ -211,7 +211,7 @@ Description
); );
Info<< " FaceZone : " Info<< " FaceZone : "
<< runTime.relativePath(writer.output()) << nl; << args.relativePath(writer.output()) << nl;
writer.beginFile(fz.name()); writer.beginFile(fz.name());

View File

@ -42,7 +42,7 @@ if (faceSetName.size())
); );
Info<< " faceSet : " Info<< " faceSet : "
<< runTime.relativePath(outputName) << nl; << args.relativePath(outputName) << nl;
vtk::writeFaceSet vtk::writeFaceSet
( (
@ -70,7 +70,7 @@ if (pointSetName.size())
); );
Info<< " pointSet : " Info<< " pointSet : "
<< runTime.relativePath(outputName) << nl; << args.relativePath(outputName) << nl;
vtk::writePointSet vtk::writePointSet
( (

View File

@ -113,7 +113,7 @@ Description
); );
Info<< " Internal : " Info<< " Internal : "
<< runTime.relativePath(internalWriter->output()) << nl; << args.relativePath(internalWriter->output()) << nl;
internalWriter->writeTimeValue(mesh.time().value()); internalWriter->writeTimeValue(mesh.time().value());
internalWriter->writeGeometry(); internalWriter->writeGeometry();
@ -163,7 +163,7 @@ Description
); );
Info<< " Boundaries: " Info<< " Boundaries: "
<< runTime.relativePath(writer->output()) << nl; << args.relativePath(writer->output()) << nl;
writer->writeTimeValue(timeValue); writer->writeTimeValue(timeValue);
writer->writeGeometry(); writer->writeGeometry();
@ -229,7 +229,7 @@ Description
); );
Info<< " Boundary : " Info<< " Boundary : "
<< runTime.relativePath(writer->output()) << nl; << args.relativePath(writer->output()) << nl;
writer->writeTimeValue(timeValue); writer->writeTimeValue(timeValue);
writer->writeGeometry(); writer->writeGeometry();

View File

@ -647,7 +647,7 @@ int main(int argc, char *argv[])
fvMeshSubsetProxy::subsetType cellSubsetType = fvMeshSubsetProxy::NONE; fvMeshSubsetProxy::subsetType cellSubsetType = fvMeshSubsetProxy::NONE;
string vtkName = runTime.globalCaseName(); string vtkName = args.globalCaseName();
if (regionNames.size() == 1) if (regionNames.size() == 1)
{ {
@ -700,7 +700,7 @@ int main(int argc, char *argv[])
// Sub-directory for output // Sub-directory for output
const word vtkDirName = args.opt<word>("name", "VTK"); const word vtkDirName = args.opt<word>("name", "VTK");
const fileName outputDir(runTime.globalPath()/vtkDirName); const fileName outputDir(args.globalPath()/vtkDirName);
if (Pstream::master()) if (Pstream::master())
{ {
@ -722,7 +722,7 @@ int main(int argc, char *argv[])
if (args.found("overwrite") && isDir(regionDir)) if (args.found("overwrite") && isDir(regionDir))
{ {
Info<< "Removing old directory " Info<< "Removing old directory "
<< runTime.relativePath(regionDir) << args.relativePath(regionDir)
<< nl << endl; << nl << endl;
rmDir(regionDir); rmDir(regionDir);
} }

View File

@ -3,10 +3,8 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2016-2017 CINECA
#------------------------------------------------------------------------------
# | Copyright (C) 2016-2017 CINECA
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -29,8 +27,10 @@
# #
# Description # Description
# Script to create module settings. # Script to create module settings.
#
# This is still incomplete, but can be a useful basis when using a module # This is still incomplete, but can be a useful basis when using a module
# system. # system.
#
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
usage() { usage() {
exec 1>&2 exec 1>&2
@ -40,7 +40,8 @@ usage() {
usage: ${0##*/} [OPTION] projectDir usage: ${0##*/} [OPTION] projectDir
options: options:
-output=file The output name (default: ModuleInclude.tcl) -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. -tmpdir=file The tmp directory to use.
-help Print the usage -help Print the usage
@ -65,7 +66,7 @@ die()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
unset optBackend optDebug preload projectDir unset optBackend optDebug optPrefs preloads projectDir
unset moduleOutput moduleTmpDir unset moduleOutput moduleTmpDir
# Parse some options # Parse some options
@ -81,8 +82,11 @@ do
-debug) -debug)
optDebug=true optDebug=true
;; ;;
-prefs=*)
optPrefs="${1#*=}"
;;
-preload=*) -preload=*)
preload="$preload${preload:+ }${1#*=}" preloads="$preloads${preloads:+ }${1#*=}"
;; ;;
--recursive-backend--) --recursive-backend--)
optBackend=true optBackend=true
@ -132,7 +136,7 @@ then
die "Incorrect projectDir? $projectDir" die "Incorrect projectDir? $projectDir"
# Check preloads # Check preloads
for file in $preloads for file in "$preloads"
do do
[ -f "$file" ] || echo "No such file to preload: $file" 1>&2 [ -f "$file" ] || echo "No such file to preload: $file" 1>&2
done done
@ -148,7 +152,8 @@ then
$0 \ $0 \
--recursive-backend-- \ --recursive-backend-- \
"${optDebug:+-debug}" \ "${optDebug:+-debug}" \
"${output:+-output=$moduleOutput}" \ "${optPrefs:+-prefs=$optPrefs}" \
"${moduleOutput:+-output=$moduleOutput}" \
"${preloads:+-preload=$preloads}" \ "${preloads:+-preload=$preloads}" \
"${moduleTmpDir:+-tmpdir=$moduleTmpDir}" \ "${moduleTmpDir:+-tmpdir=$moduleTmpDir}" \
$projectDir $projectDir
@ -166,7 +171,7 @@ fi
: ${moduleTmpDir:=${TMPDIR:-/tmp}} : ${moduleTmpDir:=${TMPDIR:-/tmp}}
# Preload any/all modules # Preload any/all modules
for file in $preloads for file in "$preloads"
do do
[ -f "$file" ] && . "$file" '' [ -f "$file" ] && . "$file" ''
done done
@ -215,7 +220,7 @@ printEnv > $tmpFiles.env.pre.log
printAlias > $tmpFiles.alias.pre.log printAlias > $tmpFiles.alias.pre.log
# OpenFOAM settings # OpenFOAM settings
. $projectDir/etc/bashrc '' . $projectDir/etc/bashrc "$optPrefs"
echo "Using openfoam: $WM_PROJECT_DIR" 1>&2 echo "Using openfoam: $WM_PROJECT_DIR" 1>&2
echo "==> $moduleOutput" 1>&2 echo "==> $moduleOutput" 1>&2
@ -229,7 +234,9 @@ unset SCOTCH_VERSION
# Also remove user directories as being unreliable # 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_SITE_APPBIN $FOAM_SITE_LIBBIN $WM_PROJECT_SITE \
$FOAM_USER_APPBIN $FOAM_USER_LIBBIN" $FOAM_USER_APPBIN $FOAM_USER_LIBBIN"
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
@ -247,9 +254,6 @@ then
unset FOAM_EXT_LIBBIN unset FOAM_EXT_LIBBIN
fi fi
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. # Always consider site to be bogus. If needed, should be done elsewhere.
unset FOAM_SITE_APPBIN FOAM_SITE_LIBBIN WM_PROJECT_SITE unset FOAM_SITE_APPBIN FOAM_SITE_LIBBIN WM_PROJECT_SITE

View File

@ -12,7 +12,7 @@ libs ("libfieldFunctionObjects.so");
operation subtract; operation subtract;
writeControl timeStep; writeControl timeStep;
writeInterval 1 writeInterval 1;
log false; log false;
region1 region1

View File

@ -162,8 +162,8 @@ else
endif endif
# Shared site (group) executables/libraries # Shared site (group) executables/libraries
setenv FOAM_SITE_APPBIN "$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin" setenv FOAM_SITE_APPBIN "$siteDir/$FOAM_API/platforms/$WM_OPTIONS/bin"
setenv FOAM_SITE_LIBBIN "$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib" setenv FOAM_SITE_LIBBIN "$siteDir/$FOAM_API/platforms/$WM_OPTIONS/lib"
# User executables/libraries # User executables/libraries
setenv FOAM_USER_APPBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin" setenv FOAM_USER_APPBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin"

View File

@ -157,8 +157,8 @@ else
fi fi
# Shared site (group) executables/libraries # Shared site (group) executables/libraries
export FOAM_SITE_APPBIN="$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin" export FOAM_SITE_APPBIN="$siteDir/$FOAM_API/platforms/$WM_OPTIONS/bin"
export FOAM_SITE_LIBBIN="$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib" export FOAM_SITE_LIBBIN="$siteDir/$FOAM_API/platforms/$WM_OPTIONS/lib"
# User executables/libraries # User executables/libraries
export FOAM_USER_APPBIN="$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin" export FOAM_USER_APPBIN="$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2016-2017 Wikki Ltd | Copyright (C) 2016-2017 Wikki Ltd
@ -173,6 +173,12 @@ Foam::faBoundaryMesh::faBoundaryMesh
void Foam::faBoundaryMesh::calcGeometry() 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) forAll(*this, patchi)
{ {
operator[](patchi).initGeometry(); operator[](patchi).initGeometry();
@ -377,6 +383,12 @@ bool Foam::faBoundaryMesh::checkDefinition(const bool report) const
void Foam::faBoundaryMesh::movePoints(const pointField& p) 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; faPatchList& patches = *this;
forAll(patches, patchi) forAll(patches, patchi)

View File

@ -2,10 +2,8 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
| Copyright (C) 2015 OpenFOAM Foundation
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -28,11 +26,10 @@ License
#include "faceShading.H" #include "faceShading.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "boundaryRadiationProperties.H" #include "boundaryRadiationProperties.H"
#include "OFstream.H"
#include "cyclicAMIPolyPatch.H" #include "cyclicAMIPolyPatch.H"
#include "volFields.H" #include "volFields.H"
#include "distributedTriSurfaceMesh.H" #include "distributedTriSurfaceMesh.H"
#include "OBJstream.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -51,25 +48,14 @@ void Foam::faceShading::writeRays
const pointField& myFc const pointField& myFc
) )
{ {
OFstream str(fName); OBJstream os(fName);
label vertI = 0;
Pout<< "Dumping rays to " << str.name() << endl; Pout<< "Dumping rays to " << os.name() << endl;
forAll(myFc, faceI) forAll(myFc, faceI)
{ {
meshTools::writeOBJ(str, myFc[faceI]); os.write(linePointRef(myFc[faceI], endCf[faceI]));
vertI++;
meshTools::writeOBJ(str, endCf[faceI]);
vertI++;
str << "l " << vertI-1 << ' ' << vertI << nl;
} }
str.flush();
Pout<< "cmd: objToVTK " << fName.c_str() << endl;
stringList cmd({"objToVTK", fName, fName.lessExt().ext("vtk")});
Foam::system(cmd);
} }

View File

@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0 cleanCase0
rm -rf VTK
rm -rf constant/cellToRegion rm -rf constant/cellToRegion
rm -rf constant/*/polyMesh # region meshes rm -rf constant/*/polyMesh # region meshes

View File

@ -1,7 +1,9 @@
include $(GENERAL_RULES)/Gcc/c SUFFIXES += .c
cc = gcc -mcpu=cortex-a9 cc = gcc -mcpu=cortex-a9
cWARN = -Wall
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC