Commit f0f4af16 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

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

parents 45e716f7 8ab09daa
<!---
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
api=1902
patch=0
api=1812
patch=190403
......@@ -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();
......
......@@ -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());
......
......@@ -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
(
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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
......
......@@ -12,7 +12,7 @@ libs ("libfieldFunctionObjects.so");
operation subtract;
writeControl timeStep;
writeInterval 1
writeInterval 1;
log false;
region1
......
......@@ -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"
......
......@@ -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"
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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
......
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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment