Skip to content
GitLab
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
03b287ed
Commit
03b287ed
authored
Feb 20, 2018
by
Mark OLESEN
Browse files
COMP: adjust tests to compile with current code base
parent
87b1bbac
Changes
11
Hide whitespace changes
Inline
Side-by-side
applications/test/DynamicField/Test-DynamicField.C
View file @
03b287ed
...
...
@@ -36,8 +36,8 @@ using namespace Foam;
int
main
(
int
argc
,
char
*
argv
[])
{
DynamicField
<
point
,
0
,
10
,
11
>
testField
;
DynamicField
<
point
,
0
,
10
,
11
>
testField2
;
DynamicField
<
point
>
testField
;
DynamicField
<
point
>
testField2
;
testField
.
setSize
(
5
);
testField2
.
setSize
(
5
);
...
...
applications/test/HashTable1/Test-HashTable1.C
View file @
03b287ed
...
...
@@ -99,7 +99,7 @@ int main()
HashTable
<
scalar
>
table2
(
table1
);
HashTable
<
scalar
>
table3
(
table1
.
xfer
(
));
HashTable
<
scalar
>
table3
(
std
::
move
(
table1
));
Info
<<
"
\n
copy table1 -> table2"
<<
nl
<<
"transfer table1 -> table3 via the xfer() method"
<<
nl
;
...
...
applications/test/HashTable2/Test-HashTable2.C
View file @
03b287ed
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
Info
<<
"table3: "
<<
table3
<<
nl
<<
"toc: "
<<
table3
.
toc
()
<<
endl
;
Map
<
label
>
table4
(
table3
.
xfer
(
));
Map
<
label
>
table4
(
std
::
move
(
table3
));
Info
<<
"table3: "
<<
table3
<<
nl
<<
"toc: "
<<
table3
.
toc
()
<<
endl
;
...
...
applications/test/IOField/Test-IOField.C
View file @
03b287ed
...
...
@@ -76,7 +76,7 @@ void writeAndRead
Pout
<<
"** Writing:"
<<
writeType
<<
" Reading:"
<<
readType
<<
endl
;
autoPtr
<
fileOperation
>
writeHandler
(
fileOperation
::
New
(
writeType
));
autoPtr
<
fileOperation
>
writeHandler
(
fileOperation
::
New
(
writeType
,
true
));
fileHandler
(
writeHandler
);
// Delete
...
...
@@ -84,20 +84,21 @@ void writeAndRead
fileHandler
().
rm
(
fileHandler
().
filePath
(
io
.
objectPath
()));
// Write
Pout
<<
"Writing:"
<<
fileHandler
().
objectPath
(
io
)
<<
endl
;
Pout
<<
"Writing:"
<<
fileHandler
().
objectPath
(
io
,
io
.
name
()
)
<<
endl
;
write
(
io
,
sz
);
autoPtr
<
fileOperation
>
readHandler
(
fileOperation
::
New
(
readType
));
autoPtr
<
fileOperation
>
readHandler
(
fileOperation
::
New
(
readType
,
true
));
fileHandler
(
readHandler
);
// Read
IOobject
readIO
(
io
);
readIO
.
readOpt
()
=
readOpt
;
Pout
<<
"Reading:"
<<
fileHandler
().
filePath
(
readIO
.
objectPath
())
<<
endl
;
Pout
<<
"Reading:"
<<
fileHandler
().
filePath
(
readIO
.
objectPath
())
<<
endl
;
read
(
readIO
,
sz
);
Pout
<<
"** Done writing:"
<<
writeType
<<
" Reading:"
<<
readType
<<
end
l
<<
end
l
<<
endl
;
<<
" Reading:"
<<
readType
<<
n
l
<<
n
l
<<
endl
;
}
...
...
@@ -108,7 +109,7 @@ void readIfPresent
const
word
&
readType
)
{
autoPtr
<
fileOperation
>
readHandler
(
fileOperation
::
New
(
readType
));
autoPtr
<
fileOperation
>
readHandler
(
fileOperation
::
New
(
readType
,
true
));
fileHandler
(
readHandler
);
// Read
...
...
applications/test/fieldMapping/Test-fieldMapping.C
View file @
03b287ed
...
...
@@ -163,7 +163,9 @@ int main(int argc, char *argv[])
}
// Remove face
label
candidateFacei
=
rndGen
.
integer
(
0
,
mesh
.
nInternalFaces
()
-
1
);
label
candidateFacei
=
rndGen
.
position
<
label
>
(
0
,
mesh
.
nInternalFaces
()
-
1
);
Info
<<
"Wanting to delete face "
<<
mesh
.
faceCentres
()[
candidateFacei
]
<<
nl
<<
endl
;
...
...
applications/test/hexRef8/Test-hexRef8.C
View file @
03b287ed
...
...
@@ -194,9 +194,7 @@ int main(int argc, char *argv[])
mesh
.
moving
(
false
);
mesh
.
topoChanging
(
false
);
label
action
=
rndGen
.
integer
(
0
,
5
);
label
action
=
rndGen
.
position
<
label
>
(
0
,
5
);
if
(
action
==
0
)
{
...
...
@@ -216,7 +214,10 @@ int main(int argc, char *argv[])
for
(
label
i
=
0
;
i
<
nRefine
;
i
++
)
{
refineCandidates
.
append
(
rndGen
.
integer
(
0
,
mesh
.
nCells
()
-
1
));
refineCandidates
.
append
(
rndGen
.
position
<
label
>
(
0
,
mesh
.
nCells
()
-
1
)
);
}
labelList
cellsToRefine
...
...
@@ -245,7 +246,9 @@ int main(int argc, char *argv[])
for
(
label
i
=
0
;
i
<
nUnrefine
;
i
++
)
{
label
index
=
rndGen
.
integer
(
0
,
allSplitPoints
.
size
()
-
1
);
const
label
index
=
rndGen
.
position
<
label
>
(
0
,
allSplitPoints
.
size
()
-
1
);
candidates
.
insert
(
allSplitPoints
[
index
]);
}
...
...
applications/test/liquid/Make/options
View file @
03b287ed
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude
EXE_LIBS = \
-lthermophysicalProperties
applications/test/speed/scalarSpeed/Test-scalarSpeed.C
View file @
03b287ed
...
...
@@ -15,7 +15,7 @@ int main()
const
label
rndAddrSkip
=
40
;
const
label
redFac
=
6
;
const
label
redSize
=
size
/
redFac
;
Random
genAddr
(
100
);
Random
rndGen
(
100
);
double
*
f1
=
new
double
[
size
];
double
*
f2
=
new
double
[
size
];
...
...
@@ -38,7 +38,7 @@ int main()
for
(
label
i
=
0
;
i
<
size
;
i
+=
rndAddrSkip
)
{
addr
[
i
]
=
genAddr
.
integer
(
0
,
size
-
1
);
addr
[
i
]
=
rndGen
.
position
<
label
>
(
0
,
size
-
1
);
}
for
(
label
i
=
0
;
i
<
redSize
;
i
++
)
...
...
applications/test/syncTools/Test-syncTools.C
View file @
03b287ed
...
...
@@ -48,7 +48,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
PackedList
<
3
>
bits
(
mesh
.
nEdges
());
forAll
(
bits
,
i
)
{
bits
.
set
(
i
,
rndGen
.
integer
(
0
,
3
));
bits
.
set
(
i
,
rndGen
.
position
<
label
>
(
0
,
3
));
}
labelList
edgeValues
(
mesh
.
nEdges
());
...
...
@@ -95,7 +95,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
PackedList
<
3
>
bits
(
mesh
.
nPoints
());
forAll
(
bits
,
i
)
{
bits
.
set
(
i
,
rndGen
.
integer
(
0
,
3
));
bits
.
set
(
i
,
rndGen
.
position
<
label
>
(
0
,
3
));
}
labelList
pointValues
(
mesh
.
nPoints
());
...
...
@@ -143,7 +143,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
PackedList
<
3
>
bits
(
mesh
.
nFaces
());
forAll
(
bits
,
facei
)
{
bits
.
set
(
facei
,
rndGen
.
integer
(
0
,
3
));
bits
.
set
(
facei
,
rndGen
.
position
<
label
>
(
0
,
3
));
}
labelList
faceValues
(
mesh
.
nFaces
());
...
...
@@ -213,7 +213,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
forAll
(
localPoints
,
i
)
{
const
point
pt
=
localPoints
[
i
]
+
1e-4
*
rndGen
.
vector
01
();
const
point
pt
=
localPoints
[
i
]
+
1e-4
*
rndGen
.
sample01
<
vector
>
();
label
meshPointi
=
allBoundary
.
meshPoints
()[
i
];
...
...
@@ -298,7 +298,8 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
{
const
edge
&
e
=
edges
[
i
];
const
point
pt
=
e
.
centre
(
localPoints
)
+
1e-4
*
rndGen
.
vector01
();
const
point
pt
=
e
.
centre
(
localPoints
)
+
1e-4
*
rndGen
.
sample01
<
vector
>
();
label
meshEdgeI
=
meshEdges
[
i
];
...
...
applications/test/tensor/Test-tensor.C
View file @
03b287ed
...
...
@@ -35,9 +35,10 @@ int main()
Info
<<
"Check determinant "
<<
e
.
x
()
*
e
.
y
()
*
e
.
z
()
<<
" "
<<
det
(
t6
)
<<
endl
;
Info
<<
"Check eigenvectors "
<<
(
eigenVector
(
t6
,
e
[
0
])
&
t6
)
<<
e
[
0
]
*
eigenVector
(
t6
,
e
[
0
])
<<
" "
<<
(
eigenVector
(
t6
,
e
[
1
])
&
t6
)
<<
e
[
1
]
*
eigenVector
(
t6
,
e
[
1
])
<<
" "
<<
(
eigenVector
(
t6
,
e
[
2
])
&
t6
)
<<
e
[
2
]
*
eigenVector
(
t6
,
e
[
2
])
<<
(
eigenVectors
(
t6
,
e
)
&
t6
)
<<
" "
<<
(
e
.
x
()
*
eigenVectors
(
t6
,
e
)).
x
()
<<
(
e
.
x
()
*
eigenVectors
(
t6
,
e
)).
y
()
<<
(
e
.
z
()
*
eigenVectors
(
t6
,
e
)).
z
()
<<
endl
;
Info
<<
"Check eigenvalues for symmTensor "
...
...
src/OpenFOAM/db/IOstreams/memory/OCountStream.H
View file @
03b287ed
...
...
@@ -121,6 +121,10 @@ public:
std
::
ostream
(
static_cast
<
countstreambuf
*>
(
this
))
{}
//- \return The number of bytes counted
using
countstreambuf
::
size
;
//- Rewind the stream, reset the count
void
rewind
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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