STYLE: avoid extraneous c_str() for OFstream construct
This commit is contained in:
parent
0e1c9b0af7
commit
fbb371dda4
@ -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
|
||||
|
@ -1831,7 +1831,7 @@ Foam::label Foam::NURBS3DVolume::nWSymmetry() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::NURBS3DVolume::writeCps(const string fileName) const
|
||||
void Foam::NURBS3DVolume::writeCps(const fileName& baseName) 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_ + fileName + ".csv").c_str());
|
||||
OFstream cpsFile("optimisation"/cpsFolder_/name_ + baseName + ".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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user