Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
1687a454
Commit
1687a454
authored
Dec 17, 2018
by
sergio
Browse files
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
parents
66ca352f
3f4289c2
Changes
138
Hide whitespace changes
Inline
Side-by-side
applications/test/argList/Test-argList.C
View file @
1687a454
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017
-2018
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -38,11 +38,13 @@ using namespace Foam;
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
noBanner
();
argList
::
noParallel
();
argList
::
noCheckProcessorDirectories
();
// parallel OK, but without checks
// argList::noFunctionObjects();
argList
::
addOption
(
"label"
,
"value"
,
"Test parsing of label"
);
argList
::
addOption
(
"scalar"
,
"value"
,
"Test parsing of scalar"
);
argList
::
addOption
(
"string"
,
"value"
,
"Test string lookup"
);
argList
::
addOption
(
"relative"
,
"PATH"
,
"Test relativePath"
);
// These are actually lies (never had -parseLabel, -parseScalar etc),
// but good for testing...
...
...
@@ -70,20 +72,27 @@ int main(int argc, char *argv[])
argList
::
addArgument
(
"label"
);
argList
::
noMandatoryArgs
();
argList
args
(
argc
,
argv
);
#include
"setRootCase.H"
Info
<<
"command-line ("
Pout
<<
"command-line ("
<<
args
.
options
().
size
()
<<
" options, "
<<
args
.
args
().
size
()
<<
" args)"
<<
nl
<<
" "
<<
args
.
commandLine
().
c_str
()
<<
nl
<<
nl
;
Info
<<
"rootPath: "
<<
args
.
rootPath
()
<<
nl
Pout
<<
"rootPath: "
<<
args
.
rootPath
()
<<
nl
<<
"globalCase: "
<<
args
.
globalCaseName
()
<<
nl
<<
"globalPath: "
<<
args
.
globalPath
()
<<
nl
<<
nl
;
Info
<<
"have: "
<<
args
.
count
({
"label"
,
"scalar"
})
<<
" options"
<<
nl
;
if
(
args
.
found
(
"relative"
))
{
Pout
<<
"input path: "
<<
args
[
"relative"
]
<<
nl
<<
"relative : "
<<
args
.
relativePath
(
args
[
"relative"
],
true
)
<<
nl
<<
nl
;
}
Info
<<
"have: "
<<
args
.
count
({
"label"
,
"scalar"
})
<<
" options"
<<
nl
;
label
ival
;
scalar
sval
;
...
...
applications/test/timeSelector/Test-timeSelector.C
View file @
1687a454
...
...
@@ -27,7 +27,7 @@ Description
#include
"argList.H"
#include
"IOstreams.H"
#include
"Time
Paths
.H"
#include
"Time.H"
#include
"timeSelector.H"
using
namespace
Foam
;
...
...
@@ -58,13 +58,31 @@ bool print(const instantList& instants)
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Test timeSelector"
);
argList
::
addNote
(
"Test timeSelector
and TimePaths
"
);
timeSelector
::
addOptions
(
true
,
true
);
argList
::
noLibs
();
argList
::
noFunctionObjects
();
argList
::
addOption
(
"relative"
,
"PATH"
,
"Test relativePath"
);
#include
"setRootCase.H"
#include
"createTime.H"
Pout
<<
"Time"
<<
nl
<<
"rootPath: "
<<
runTime
.
rootPath
()
<<
nl
<<
"path: "
<<
runTime
.
path
()
<<
nl
<<
"globalCase: "
<<
runTime
.
globalCaseName
()
<<
nl
<<
"globalPath: "
<<
runTime
.
globalPath
()
<<
nl
<<
nl
;
if
(
args
.
found
(
"relative"
))
{
Pout
<<
"input path: "
<<
args
[
"relative"
]
<<
nl
<<
"relative : "
<<
runTime
.
relativePath
(
args
[
"relative"
],
true
)
<<
nl
<<
nl
;
}
autoPtr
<
TimePaths
>
timePaths
;
...
...
applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C
View file @
1687a454
...
...
@@ -82,7 +82,8 @@ int main(int argc, char *argv[])
"Collapse faces that are in the supplied face set"
);
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative collapseDict"
);
#include
"addOverwriteOption.H"
argList
::
noFunctionObjects
();
// Never use function objects
...
...
applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
View file @
1687a454
...
...
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
"For example, moving points, splitting/collapsing edges etc."
);
#include
"addOverwriteOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative modifyMeshDict"
);
argList
::
noFunctionObjects
();
// Never use function objects
...
...
applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
View file @
1687a454
...
...
@@ -1469,7 +1469,12 @@ int main(int argc, char *argv[])
#include
"addRegionOption.H"
#include
"addOverwriteOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative extrudeToRegionMeshDict"
);
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createNamedMesh.H"
...
...
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
View file @
1687a454
...
...
@@ -684,6 +684,7 @@ int main(int argc, char *argv[])
#include
"addRegionOption.H"
#include
"addOverwriteOption.H"
#include
"addProfilingOption.H"
argList
::
addBoolOption
(
"checkGeometry"
,
...
...
@@ -707,8 +708,7 @@ int main(int argc, char *argv[])
"file"
,
"Name of the file to save the simplified surface to"
);
#include
"addProfilingOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative snappyHexMeshDict"
);
argList
::
noFunctionObjects
();
// Never use function objects
...
...
applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
View file @
1687a454
...
...
@@ -441,9 +441,8 @@ int main(int argc, char *argv[])
"Does not duplicate points."
);
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative createBafflesDict"
);
#include
"addOverwriteOption.H"
#include
"addDictOption.H"
#include
"addRegionOption.H"
argList
::
noFunctionObjects
();
// Never use function objects
...
...
applications/utilities/mesh/manipulation/createPatch/createPatch.C
View file @
1687a454
...
...
@@ -518,7 +518,7 @@ int main(int argc, char *argv[])
#include
"addOverwriteOption.H"
#include
"addRegionOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative createPatchDict"
);
argList
::
addBoolOption
(
"writeObj"
,
...
...
applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
View file @
1687a454
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017
-2018
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -31,24 +31,37 @@ License
Foam
::
mirrorFvMesh
::
mirrorFvMesh
(
const
IOobject
&
io
)
:
fvMesh
(
io
),
mirrorMeshDict_
mirrorFvMesh
(
IOobject
io
,
IOdictionary
(
"mirrorMeshDict"
,
time
().
system
(),
*
this
,
IOobject
::
MUST_READ_IF_MODIFIED
,
IOobject
::
NO_WRITE
IOobject
(
"mirrorMeshDict"
,
io
.
time
().
system
(),
io
.
time
(),
IOobject
::
MUST_READ_IF_MODIFIED
,
IOobject
::
NO_WRITE
)
)
)
{}
Foam
::
mirrorFvMesh
::
mirrorFvMesh
(
const
IOobject
&
io
,
const
IOdictionary
&
mirrorDict
)
:
fvMesh
(
io
)
{
plane
mirrorPlane
(
mirror
Mesh
Dict
_
);
plane
mirrorPlane
(
mirrorDict
);
const
scalar
planeTolerance
(
mirror
Mesh
Dict
_
.
get
<
scalar
>
(
"planeTolerance"
)
mirrorDict
.
get
<
scalar
>
(
"planeTolerance"
)
);
const
pointField
&
oldPoints
=
points
();
...
...
@@ -57,6 +70,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
const
label
nOldInternalFaces
=
nInternalFaces
();
const
polyPatchList
&
oldPatches
=
boundaryMesh
();
Info
<<
"Mirroring mesh at origin:"
<<
mirrorPlane
.
origin
()
<<
" normal:"
<<
mirrorPlane
.
normal
()
<<
nl
;
// Mirror the points
Info
<<
"Mirroring points. Old points: "
<<
oldPoints
.
size
();
...
...
@@ -66,15 +82,15 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
labelList
mirrorPointLookup
(
oldPoints
.
size
(),
-
1
);
// Grab the old points
for
All
(
oldPoints
,
p
oint
i
)
for
(
const
point
&
pt
:
oldP
oint
s
)
{
newPoints
[
nNewPoints
]
=
oldPoints
[
pointi
]
;
nNewPoints
++
;
newPoints
[
nNewPoints
]
=
pt
;
++
nNewPoints
;
}
forAll
(
oldPoints
,
pointi
)
{
scalar
alpha
=
const
scalar
alpha
=
mirrorPlane
.
normalIntersect
(
oldPoints
[
pointi
],
...
...
@@ -121,7 +137,6 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
}
Info
<<
"Mirroring faces. Old faces: "
<<
oldFaces
.
size
();
// Algorithm:
...
...
@@ -325,7 +340,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
Info
<<
"Mirroring patches. Old patches: "
<<
boundary
().
size
()
<<
" New patches: "
<<
boundary
().
size
()
<<
endl
;
Info
<<
"Mirroring cells.
Old cells: "
<<
oldCells
.
size
()
Info
<<
"Mirroring cells. Old cells: "
<<
oldCells
.
size
()
<<
" New cells: "
<<
2
*
oldCells
.
size
()
<<
endl
;
cellList
newCells
(
2
*
oldCells
.
size
());
...
...
applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.H
View file @
1687a454
...
...
@@ -51,9 +51,6 @@ class mirrorFvMesh
{
// Private data
//- Mirror dictionary
IOdictionary
mirrorMeshDict_
;
//- Mirrored mesh
autoPtr
<
fvMesh
>
mirrorMeshPtr_
;
...
...
@@ -77,8 +74,11 @@ public:
// Constructors
//- Construct from IOobject
mirrorFvMesh
(
const
IOobject
&
io
);
//- Construct from IOobject, using system mirrorMeshDict
explicit
mirrorFvMesh
(
const
IOobject
&
io
);
//- Construct from IOobject and specified mirrorMeshDict
mirrorFvMesh
(
const
IOobject
&
io
,
const
IOdictionary
&
mirrorDict
);
//- Destructor
...
...
applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C
View file @
1687a454
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -49,12 +49,23 @@ int main(int argc, char *argv[])
"Mirrors a mesh around a given plane."
);
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative mirrorMeshDict"
);
argList
::
setAdvanced
(
"decomposeParDict"
);
#include
"addOverwriteOption.H"
#include
"setRootCase.H"
#include
"createTime.H"
const
bool
overwrite
=
args
.
found
(
"overwrite"
);
const
word
dictName
(
"mirrorMeshDict"
);
#include
"setSystemRunTimeDictionaryIO.H"
Info
<<
"Reading "
<<
dictName
<<
"
\n
"
<<
endl
;
const
IOdictionary
mirrorDict
(
dictIO
);
mirrorFvMesh
mesh
(
IOobject
...
...
@@ -62,7 +73,8 @@ int main(int argc, char *argv[])
mirrorFvMesh
::
defaultRegion
,
runTime
.
constant
(),
runTime
)
),
mirrorDict
);
hexRef8Data
refData
...
...
applications/utilities/mesh/manipulation/refineMesh/refineMesh.C
View file @
1687a454
...
...
@@ -162,7 +162,8 @@ int main(int argc, char *argv[])
#include
"addOverwriteOption.H"
#include
"addRegionOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative refineMeshDict"
);
argList
::
addBoolOption
(
...
...
applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
View file @
1687a454
...
...
@@ -617,7 +617,8 @@ int main(int argc, char *argv[])
#include
"addRegionOption.H"
#include
"addOverwriteOption.H"
#include
"addTimeOptions.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative renumberMeshDict"
);
argList
::
addBoolOption
(
...
...
applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
View file @
1687a454
...
...
@@ -115,7 +115,8 @@ int main(int argc, char *argv[])
#include
"addOverwriteOption.H"
#include
"addRegionOption.H"
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative stitchMeshDict"
);
argList
::
addBoolOption
(
...
...
applications/utilities/mesh/manipulation/topoSet/topoSet.C
View file @
1687a454
...
...
@@ -207,7 +207,9 @@ int main(int argc, char *argv[])
);
timeSelector
::
addOptions
(
true
,
false
);
// constant(true), zero(false)
#include
"addDictOption.H"
argList
::
addOption
(
"dict"
,
"file"
,
"Use alternative topoSetDict"
);
#include
"addRegionOption.H"
argList
::
addBoolOption
(
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertLagrangian.H
View file @
1687a454
...
...
@@ -94,7 +94,7 @@ if (doLagrangian)
);
Info
<<
" Lagrangian: "
<<
writer
.
output
().
relative
(
runTime
.
globalPath
())
<<
nl
;
<<
runTime
.
relativePath
(
writer
.
output
())
<<
nl
;
writer
.
writeTimeValue
(
mesh
.
time
().
value
());
writer
.
writeGeometry
();
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertSurfaceFields.H
View file @
1687a454
...
...
@@ -107,7 +107,7 @@ Description
);
Info
<<
" Surface : "
<<
writer
.
output
().
relative
(
runTime
.
globalPath
())
<<
nl
;
<<
runTime
.
relativePath
(
writer
.
output
())
<<
nl
;
writer
.
writeTimeValue
(
timeValue
);
...
...
@@ -211,7 +211,7 @@ Description
);
Info
<<
" FaceZone : "
<<
writer
.
output
().
relative
(
runTime
.
globalPath
())
<<
nl
;
<<
runTime
.
relativePath
(
writer
.
output
())
<<
nl
;
writer
.
beginFile
(
fz
.
name
());
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertTopoSet.H
View file @
1687a454
...
...
@@ -42,7 +42,7 @@ if (faceSetName.size())
);
Info
<<
" faceSet : "
<<
outputNa
me
.
relative
(
runTime
.
globalPath
()
)
<<
nl
;
<<
runTi
me
.
relative
Path
(
outputName
)
<<
nl
;
vtk
::
writeFaceSet
(
...
...
@@ -70,7 +70,7 @@ if (pointSetName.size())
);
Info
<<
" pointSet : "
<<
outputNa
me
.
relative
(
runTime
.
globalPath
()
)
<<
nl
;
<<
runTi
me
.
relative
Path
(
outputName
)
<<
nl
;
vtk
::
writePointSet
(
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H
View file @
1687a454
...
...
@@ -113,7 +113,7 @@ Description
);
Info
<<
" Internal : "
<<
internalWriter
->
output
()
.
relative
(
runTime
.
globalPath
()
)
<<
nl
;
<<
runTime
.
relativePath
(
internalWriter
->
output
())
<<
nl
;
internalWriter
->
writeTimeValue
(
mesh
.
time
().
value
());
internalWriter
->
writeGeometry
();
...
...
@@ -163,7 +163,7 @@ Description
);
Info
<<
" Boundaries: "
<<
writer
->
output
().
relative
(
runTime
.
globalPath
())
<<
nl
;
<<
runTime
.
relativePath
(
writer
->
output
())
<<
nl
;
writer
->
writeTimeValue
(
timeValue
);
writer
->
writeGeometry
();
...
...
@@ -229,7 +229,7 @@ Description
);
Info
<<
" Boundary : "
<<
writer
->
output
().
relative
(
runTime
.
globalPath
())
<<
nl
;
<<
runTime
.
relativePath
(
writer
->
output
())
<<
nl
;
writer
->
writeTimeValue
(
timeValue
);
writer
->
writeGeometry
();
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
View file @
1687a454
...
...
@@ -650,7 +650,7 @@ int main(int argc, char *argv[])
if
(
args
.
found
(
"overwrite"
)
&&
isDir
(
regionDir
))
{
Info
<<
"Removing old directory "
<<
r
egionDir
.
relative
(
runTime
.
globalPath
()
)
<<
r
unTime
.
relative
Path
(
regionDir
)
<<
nl
<<
endl
;
rmDir
(
regionDir
);
}
...
...
Prev
1
2
3
4
5
…
7
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment