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
fbb371dd
Commit
fbb371dd
authored
Feb 13, 2020
by
Mark OLESEN
Browse files
STYLE: avoid extraneous c_str() for OFstream construct
parent
0e1c9b0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/updateMethod/updateMethod.C
View file @
fbb371dd
...
...
@@ -355,8 +355,8 @@ void Foam::updateMethod::writeCorrection()
correctionFolder_
/
"cumulativeCorrection"
+
mesh_
.
time
().
timeName
()
);
OFstream
corFile
(
correctionFile
.
c_str
()
);
OFstream
cumulCorFile
(
cumulativeCorrectionFile
.
c_str
()
);
OFstream
corFile
(
correctionFile
);
OFstream
cumulCorFile
(
cumulativeCorrectionFile
);
forAll
(
correction_
,
cI
)
{
corFile
...
...
src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.C
View file @
fbb371dd
...
...
@@ -1831,7 +1831,7 @@ Foam::label Foam::NURBS3DVolume::nWSymmetry() const
}
void
Foam
::
NURBS3DVolume
::
writeCps
(
const
string
fil
eName
)
const
void
Foam
::
NURBS3DVolume
::
writeCps
(
const
fileName
&
bas
eName
)
const
{
const
label
nCPsU
=
basisU_
.
nCPs
();
const
label
nCPsV
=
basisV_
.
nCPs
();
...
...
@@ -1846,12 +1846,13 @@ void Foam::NURBS3DVolume::writeCps(const string fileName) const
if
(
Pstream
::
master
())
{
OFstream
cpsFile
(
(
"optimisation"
/
cpsFolder_
/
name_
+
fil
eName
+
".csv"
)
.
c_str
())
;
OFstream
cpsFile
(
"optimisation"
/
cpsFolder_
/
name_
+
bas
eName
+
".csv"
);
// Write header
cpsFile
<<
"
\"
Points : 0
\"
,
\"
Points : 1
\"
,
\"
Points : 2
\"
,"
<<
"
\"
u
\"
,
\"
v
\"
,
\"
w
\"
,"
<<
"
\"
active : 0
\"
,
\"
active : 1
\"
,
\"
active : 2
\"
"
<<
endl
;
forAll
(
cpsInCartesian
,
cpI
)
{
const
label
iCPw
=
cpI
/
label
(
nCPsU
*
nCPsV
);
...
...
src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.H
View file @
fbb371dd
...
...
@@ -468,7 +468,7 @@ public:
//- Write control points on a cartesian coordinates system for
//- visualization
void
writeCps
(
const
string
=
"cpsFile"
)
const
;
void
writeCps
(
const
fileName
&
baseName
=
"cpsFile"
)
const
;
//- Write control points on the local coordinate system.
// For continuation
...
...
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