Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
34c3702f
Commit
34c3702f
authored
Jan 13, 2009
by
Andrew Heather
Browse files
Merge branch 'master' of
ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
parents
4b8e8e3e
30964be5
Changes
318
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C
View file @
34c3702f
...
...
@@ -26,7 +26,7 @@ Application
PDRFoam
Description
Compressible premixed/partially-premixed combustion solver with turbulence
Compressible premixed/partially-premixed combustion solver with turbulence
modelling.
Combusting RANS code using the b-Xi two-equation model.
...
...
@@ -121,7 +121,8 @@ scalar StCoNum = 0.0;
// Test : disable refinement for some cells
PackedList
<
1
>&
protectedCell
=
refCast
<
dynamicRefineFvMesh
>
(
mesh
).
protectedCell
();
if
(
protectedCell
.
size
()
==
0
)
if
(
protectedCell
.
empty
())
{
protectedCell
.
setSize
(
mesh
.
nCells
());
protectedCell
=
0
;
...
...
@@ -135,7 +136,7 @@ scalar StCoNum = 0.0;
}
}
//volScalarField pIndicator("pIndicator",
//volScalarField pIndicator("pIndicator",
// p*(fvc::laplacian(p))
// / (
// magSqr(fvc::grad(p))
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H
View file @
34c3702f
...
...
@@ -28,7 +28,7 @@ Class
Description
Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation
with a linear correction function to give a plausible profile for XiEq.
See
\
link SCOPELaminarFlameSpeed.H
\
endlink for details on the SCOPE
See
@
link SCOPELaminarFlameSpeed.H
@
endlink for details on the SCOPE
laminar flame speed model.
SourceFiles
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H
View file @
34c3702f
...
...
@@ -27,8 +27,8 @@ Class
Description
This is the equilibrium level of the flame wrinkling generated by
in
e
stability. It is a constant (default 2.5). It is used in
\
link XiModel.H
\
endlink.
instability. It is a constant (default 2.5). It is used in
@
link XiModel.H
@
endlink.
SourceFiles
instability.C
...
...
applications/test/HashSet/hashSetTest.C
View file @
34c3702f
...
...
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
wordHashSet
setA
(
0
);
HashTable
<
label
,
word
>
tableA
;
HashTable
<
empty
>
tableB
;
HashTable
<
nil
>
tableB
;
Map
<
label
>
mapA
;
setA
.
insert
(
"kjhk"
);
...
...
@@ -49,9 +49,9 @@ int main(int argc, char *argv[])
tableA
.
insert
(
"value2"
,
2
);
tableA
.
insert
(
"value3"
,
3
);
tableB
.
insert
(
"value4"
,
empty
());
tableB
.
insert
(
"value5"
,
empty
());
tableB
.
insert
(
"value6"
,
empty
());
tableB
.
insert
(
"value4"
,
nil
());
tableB
.
insert
(
"value5"
,
nil
());
tableB
.
insert
(
"value6"
,
nil
());
mapA
.
set
(
1
,
1
);
mapA
.
set
(
2
,
2
);
...
...
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
Info
<<
wordHashSet
(
setA
)
<<
endl
;
Info
<<
"create from HashTable<T>: "
;
Info
<<
wordHashSet
(
tableA
)
<<
endl
;
Info
<<
"create from HashTable<
empty
>: "
;
Info
<<
"create from HashTable<
nil
>: "
;
Info
<<
wordHashSet
(
tableB
)
<<
endl
;
Info
<<
"create from Map<label>: "
;
...
...
applications/test/HashTable/hashTableTest.C
View file @
34c3702f
...
...
@@ -100,12 +100,12 @@ int main()
<<
"
\n
table2"
<<
table1
<<
nl
<<
"
\n
table3"
<<
table3
<<
nl
;
Info
<<
"
\n
delet
e table2"
<<
nl
;
Info
<<
"
\n
eras
e table2
by iterator
"
<<
nl
;
forAllIter
(
HASHTABLE_CLASS
<
double
>
,
table2
,
iter
)
{
Info
<<
"
delet
ing "
<<
iter
.
key
()
<<
" => "
<<
iter
()
<<
" ... "
;
Info
<<
"
eras
ing "
<<
iter
.
key
()
<<
" => "
<<
iter
()
<<
" ... "
;
table2
.
erase
(
iter
);
Info
<<
"
delet
ed"
<<
endl
;
Info
<<
"
eras
ed"
<<
endl
;
}
Info
<<
"
\n
table1"
<<
table1
<<
nl
...
...
@@ -134,6 +134,24 @@ int main()
table1
.
erase
(
table1
.
begin
());
Info
<<
"removed an element - test table1 != table3 : "
<<
(
table1
!=
table3
)
<<
nl
;
// insert a few things into table2
table2
.
set
(
"ada"
,
14
.
0
);
table2
.
set
(
"aeq"
,
15
.
0
);
table2
.
set
(
"aaw"
,
16
.
0
);
table2
.
set
(
"abs"
,
17
.
0
);
table2
.
set
(
"adx"
,
20
.
0
);
Info
<<
"
\n
table1"
<<
table1
<<
nl
<<
"
\n
table2"
<<
table2
<<
nl
;
label
nErased
=
table1
.
erase
(
table2
);
Info
<<
"
\n
erase table2 keys from table1 (removed "
<<
nErased
<<
" elements)"
<<
nl
<<
"
\n
table1"
<<
table1
<<
nl
<<
"
\n
table2"
<<
table2
<<
nl
;
Info
<<
"
\n
clearStorage table3 ... "
;
table3
.
clearStorage
();
...
...
applications/test/StaticHashTable/staticHashTableTest.C
View file @
34c3702f
...
...
@@ -100,13 +100,13 @@ int main()
<<
"
\n
table2"
<<
table1
<<
nl
<<
"
\n
table3"
<<
table3
<<
nl
;
Info
<<
"
\n
delet
e table2"
<<
nl
;
forAllIter
(
HASHTABLE_CLASS
<
double
>
,
table2
,
iter
)
{
Info
<<
"
delet
ing "
<<
iter
.
key
()
<<
" => "
<<
iter
()
<<
" ... "
;
table2
.
erase
(
iter
);
Info
<<
"
delet
ed"
<<
endl
;
}
Info
<<
"
\n
eras
e table2
by iterator
"
<<
nl
;
forAllIter
(
HASHTABLE_CLASS
<
double
>
,
table2
,
iter
)
{
Info
<<
"
eras
ing "
<<
iter
.
key
()
<<
" => "
<<
iter
()
<<
" ... "
;
table2
.
erase
(
iter
);
Info
<<
"
eras
ed"
<<
endl
;
}
Info
<<
"
\n
table1"
<<
table1
<<
nl
<<
"
\n
table2"
<<
table2
<<
nl
...
...
@@ -134,6 +134,24 @@ int main()
table1
.
erase
(
table1
.
begin
());
Info
<<
"removed an element - test table1 != table3 : "
<<
(
table1
!=
table3
)
<<
nl
;
// insert a few things into table2
table2
.
set
(
"ada"
,
14
.
0
);
table2
.
set
(
"aeq"
,
15
.
0
);
table2
.
set
(
"aaw"
,
16
.
0
);
table2
.
set
(
"abs"
,
17
.
0
);
table2
.
set
(
"adx"
,
20
.
0
);
Info
<<
"
\n
table1"
<<
table1
<<
nl
<<
"
\n
table2"
<<
table2
<<
nl
;
label
nErased
=
table1
.
erase
(
table2
);
Info
<<
"
\n
erase table2 keys from table1 (removed "
<<
nErased
<<
" elements)"
<<
nl
<<
"
\n
table1"
<<
table1
<<
nl
<<
"
\n
table2"
<<
table2
<<
nl
;
Info
<<
"
\n
clearStorage table3 ... "
;
table3
.
clearStorage
();
...
...
@@ -144,5 +162,4 @@ int main()
return
0
;
}
// ************************************************************************* //
applications/test/foamVersion/Make/files
0 → 100644
View file @
34c3702f
foamVersionString.C
EXE = $(FOAM_USER_APPBIN)/foamVersionString
applications/test/foamVersion/Make/options
0 → 100644
View file @
34c3702f
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
/* EXE_LIBS = -lfiniteVolume */
applications/test/foamVersion/foamVersionString.C
0 → 100644
View file @
34c3702f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
foamVersionString.C
Description
Print the OpenFOAM version strings.
Simultaneously the smallest possible program to use a minimal bit of
the OpenFOAM library
\*---------------------------------------------------------------------------*/
#include <iostream>
#include "foamVersion.H"
int
main
()
{
std
::
cerr
<<
"build "
<<
Foam
::
FOAMbuild
<<
"
\n
"
<<
"version "
<<
Foam
::
FOAMversion
<<
"
\n
"
;
return
0
;
}
// ************************************************************************* //
applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C
View file @
34c3702f
...
...
@@ -413,7 +413,7 @@ bool limitRefinementLevel
}
}
if
(
addCutCells
.
size
()
>
0
)
if
(
addCutCells
.
size
())
{
// Add cells to cutCells.
...
...
@@ -479,7 +479,7 @@ void doRefinement
{
const
labelList
&
added
=
addedCells
[
oldCellI
];
if
(
added
.
size
()
>
0
)
if
(
added
.
size
())
{
// Give all cells resulting from split the refinement level
// of the master.
...
...
@@ -895,7 +895,7 @@ int main(int argc, char *argv[])
<<
" Selected for refinement :"
<<
cutCells
.
size
()
<<
nl
<<
endl
;
if
(
cutCells
.
size
()
==
0
)
if
(
cutCells
.
empty
()
)
{
Info
<<
"Stopping refining since 0 cells selected to be refined ..."
<<
nl
<<
endl
;
...
...
applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
View file @
34c3702f
...
...
@@ -358,18 +358,21 @@ int main(int argc, char *argv[])
(
dict
.
lookup
(
"facesToTriangulate"
)
);
bool
cutBoundary
=
pointsToMove
.
size
()
>
0
||
edgesToSplit
.
size
()
>
0
||
facesToTriangulate
.
size
()
>
0
;
(
pointsToMove
.
size
()
||
edgesToSplit
.
size
()
||
facesToTriangulate
.
size
()
);
List
<
Pair
<
point
>
>
edgesToCollapse
(
dict
.
lookup
(
"edgesToCollapse"
));
bool
collapseEdge
=
edgesToCollapse
.
size
()
>
0
;
bool
collapseEdge
=
edgesToCollapse
.
size
();
List
<
Pair
<
point
>
>
cellsToPyramidise
(
dict
.
lookup
(
"cellsToSplit"
));
bool
cellsToSplit
=
cellsToPyramidise
.
size
()
>
0
;
bool
cellsToSplit
=
cellsToPyramidise
.
size
();
//List<Tuple<pointField,point> >
// cellsToCreate(dict.lookup("cellsToCreate"));
...
...
@@ -523,7 +526,7 @@ int main(int argc, char *argv[])
Info
<<
nl
<<
"There was a problem in one of the inputs in the"
<<
" dictionary. Not modifying mesh."
<<
endl
;
}
else
if
(
cellToPyrCentre
.
size
()
>
0
)
else
if
(
cellToPyrCentre
.
size
())
{
Info
<<
nl
<<
"All input cells located. Modifying mesh."
<<
endl
;
...
...
@@ -555,7 +558,7 @@ int main(int argc, char *argv[])
Info
<<
"Writing modified mesh to time "
<<
runTime
.
value
()
<<
endl
;
mesh
.
write
();
}
else
if
(
edgeToPos
.
size
()
>
0
)
else
if
(
edgeToPos
.
size
())
{
Info
<<
nl
<<
"All input edges located. Modifying mesh."
<<
endl
;
...
...
applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
View file @
34c3702f
...
...
@@ -336,7 +336,7 @@ int main(int argc, char *argv[])
)
{}
if
(
refCells
.
size
()
>
0
)
if
(
refCells
.
size
())
{
Info
<<
"Collected "
<<
refCells
.
size
()
<<
" cells that need to be"
<<
" refined to get closer to overall 2:1 refinement level limit"
...
...
applications/utilities/mesh/advanced/splitCells/splitCells.C
View file @
34c3702f
...
...
@@ -652,7 +652,7 @@ int main(int argc, char *argv[])
// Remove cut cells from cellsToCut (Note:only relevant if -readSet)
forAll
(
cuts
.
cellLoops
(),
cellI
)
{
if
(
cuts
.
cellLoops
()[
cellI
].
size
()
>
0
)
if
(
cuts
.
cellLoops
()[
cellI
].
size
())
{
//Info<< "Removing cut cell " << cellI << " from wishlist"
// << endl;
...
...
applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C
View file @
34c3702f
...
...
@@ -584,7 +584,7 @@ int main(int argc, char *argv[])
forAll
(
rawPatches
,
patchI
)
{
if
(
rawPatches
[
patchI
].
size
()
>
0
&&
cfxPatchTypes
[
patchI
]
!=
"BLKBDY"
)
if
(
rawPatches
[
patchI
].
size
()
&&
cfxPatchTypes
[
patchI
]
!=
"BLKBDY"
)
{
// Check if this name has been already created
label
existingPatch
=
-
1
;
...
...
applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
View file @
34c3702f
/*--------------------------------
---------
----------------------------------*\
/*--------------------------------
*- C++ -*
----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
...
...
@@ -1486,7 +1486,7 @@ int main(int argc, char *argv[])
}
defaultBoundaryFaces.shrink();
if(defaultBoundaryFaces.size()
!= 0
)
if
(defaultBoundaryFaces.size())
{
Warning << " fluent mesh has " << defaultBoundaryFaces.size()
<< " undefined boundary faces." << endl
...
...
@@ -1695,7 +1695,7 @@ int main(int argc, char *argv[])
// soon negating the need for double output
if (writeSets)
{
if (cellGroupZoneID.size() > 1
)
if (cellGroupZoneID.size() > 1)
{
Info<< "Writing cell sets" << endl;
...
...
applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
View file @
34c3702f
...
...
@@ -667,7 +667,7 @@ void readCells
const
labelList
&
zCells
=
zoneCells
[
zoneI
];
if
(
zCells
.
size
()
>
0
)
if
(
zCells
.
size
())
{
Info
<<
" "
<<
zoneI
<<
'\t'
<<
zCells
.
size
()
<<
endl
;
}
...
...
@@ -778,7 +778,7 @@ int main(int argc, char *argv[])
forAll
(
zoneCells
,
zoneI
)
{
if
(
zoneCells
[
zoneI
].
size
()
>
0
)
if
(
zoneCells
[
zoneI
].
size
())
{
nValidCellZones
++
;
}
...
...
@@ -910,7 +910,7 @@ int main(int argc, char *argv[])
const
labelList
&
zFaces
=
zoneFaces
[
zoneI
];
if
(
zFaces
.
size
()
>
0
)
if
(
zFaces
.
size
())
{
nValidFaceZones
++
;
...
...
@@ -940,7 +940,7 @@ int main(int argc, char *argv[])
forAll
(
zoneCells
,
zoneI
)
{
if
(
zoneCells
[
zoneI
].
size
()
>
0
)
if
(
zoneCells
[
zoneI
].
size
())
{
label
physReg
=
zoneToPhys
[
zoneI
];
...
...
@@ -979,7 +979,7 @@ int main(int argc, char *argv[])
forAll
(
zoneFaces
,
zoneI
)
{
if
(
zoneFaces
[
zoneI
].
size
()
>
0
)
if
(
zoneFaces
[
zoneI
].
size
())
{
label
physReg
=
zoneToPhys
[
zoneI
];
...
...
@@ -1011,7 +1011,7 @@ int main(int argc, char *argv[])
}
}
if
(
cz
.
size
()
>
0
||
fz
.
size
()
>
0
)
if
(
cz
.
size
()
||
fz
.
size
())
{
mesh
.
addZones
(
List
<
pointZone
*>
(
0
),
fz
,
cz
);
}
...
...
applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
View file @
34c3702f
...
...
@@ -752,7 +752,7 @@ int main(int argc, char *argv[])
List
<
faceList
>
patchFaceVerts
;
if
(
dofVertIndices
.
size
()
>
0
)
if
(
dofVertIndices
.
size
())
{
// Use the vertex constraints to patch. Is of course bit dodgy since
// face goes on patch if all its vertices are on a constraint.
...
...
applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
View file @
34c3702f
...
...
@@ -242,7 +242,7 @@ int main(int argc, char *argv[])
}
if
(
vertsToBoundary
.
size
()
>
0
)
if
(
vertsToBoundary
.
size
())
{
// Didn't find cells connected to boundary faces.
WarningIn
(
args
.
executable
())
...
...
applications/utilities/mesh/conversion/polyDualMesh/makePolyDualMesh.C
View file @
34c3702f
...
...
@@ -229,7 +229,7 @@ void simpleMarkFeatures
if
(
doNotPreserveFaceZones
)
{
if
(
faceZones
.
size
()
>
0
)
if
(
faceZones
.
size
())
{
WarningIn
(
"simpleMarkFeatures(..)"
)
<<
"Detected "
<<
faceZones
.
size
()
...
...
@@ -239,7 +239,7 @@ void simpleMarkFeatures
}
else
{
if
(
faceZones
.
size
()
>
0
)
if
(
faceZones
.
size
())
{
Info
<<
"Detected "
<<
faceZones
.
size
()
<<
" faceZones. Preserving these by marking their"
...
...
applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C
View file @
34c3702f
...
...
@@ -38,10 +38,7 @@ Class
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
defineTypeNameAndDebug
(
meshDualiser
,
0
);
}
defineTypeNameAndDebug
(
Foam
::
meshDualiser
,
0
);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...
...
@@ -735,7 +732,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
)
<<
"Walked from face on patch:"
<<
patchI
<<
" to face:"
<<
faceI
<<
" fc:"
<<
mesh_
.
faceCentres
()[
faceI
]
<<
" on patch:"
<<
patches
.
whichPatch
(
faceI
)
<<
" on patch:"
<<
patches
.
whichPatch
(
faceI
)
<<
abort
(
FatalError
);
}
...
...
@@ -886,7 +883,7 @@ Foam::meshDualiser::meshDualiser(const polyMesh& mesh)
faceToDualPoint_
(
mesh_
.
nFaces
(),
-
1
),
edgeToDualPoint_
(
mesh_
.
nEdges
(),
-
1
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
...
...
@@ -1083,7 +1080,7 @@ void Foam::meshDualiser::setRefinement
{
label
pointI
=
multiCellFeaturePoints
[
i
];
if
(
pointToDualCells_
[
pointI
].
size
()
>
0
)
if
(
pointToDualCells_
[
pointI
].
size
())
{
FatalErrorIn
(
...
...
@@ -1133,7 +1130,7 @@ void Foam::meshDualiser::setRefinement
// Normal points
forAll
(
mesh_
.
points
(),
pointI
)
{
if
(
pointToDualCells_
[
pointI
].
size
()
==
0
)
if
(
pointToDualCells_
[
pointI
].
empty
()
)
{
pointToDualCells_
[
pointI
].
setSize
(
1
);
pointToDualCells_
[
pointI
][
0
]
=
meshMod
.
addCell
...
...
@@ -1241,7 +1238,7 @@ void Foam::meshDualiser::setRefinement
const
edge
&
e
=
mesh_
.
edges
()[
edgeI
];
// We need a point on the edge if not all cells on both sides
// are the same.
// are the same.
const
labelList
&
eCells
=
mesh_
.
edgeCells
()[
edgeI
];
...
...
Prev
1
2
3
4
5
…
16
Next
Write
Preview
Markdown
is supported
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