ENH: function obejct updates

This commit is contained in:
andy
2013-10-04 16:44:58 +01:00
parent 184a4c7c67
commit 837ca32397
35 changed files with 261 additions and 195 deletions

View File

@ -128,7 +128,7 @@ void Foam::streamLine::track()
label nSeeds = returnReduce(particles.size(), sumOp<label>());
Info<< type() << " : seeded " << nSeeds << " particles." << endl;
Info << " seeded " << nSeeds << " particles." << endl;
// Read or lookup fields
PtrList<volScalarField> vsFlds;
@ -194,10 +194,10 @@ void Foam::streamLine::track()
}
else
{
FatalErrorIn("streamLine::execute()")
<< "Cannot find field " << fields_[i] << endl
FatalErrorIn("streamLine::track()")
<< "Cannot find field " << fields_[i] << nl
<< "Valid scalar fields are:"
<< mesh.names(volScalarField::typeName) << endl
<< mesh.names(volScalarField::typeName) << nl
<< "Valid vector fields are:"
<< mesh.names(volVectorField::typeName)
<< exit(FatalError);
@ -267,12 +267,10 @@ void Foam::streamLine::track()
if (UIndex == -1)
{
FatalErrorIn("streamLine::execute()")
<< "Cannot find field to move particles with : " << UName_
<< endl
<< "This field has to be present in the sampled fields "
<< fields_
<< " and in the objectRegistry." << endl
FatalErrorIn("streamLine::track()")
<< "Cannot find field to move particles with : " << UName_ << nl
<< "This field has to be present in the sampled fields " << fields_
<< " and in the objectRegistry."
<< exit(FatalError);
}
@ -374,6 +372,8 @@ void Foam::streamLine::read(const dictionary& dict)
{
if (active_)
{
Info<< type() << " " << name_ << ":" << nl;
//dict_ = dict;
dict.lookup("fields") >> fields_;
if (dict.found("UName"))
@ -433,14 +433,14 @@ void Foam::streamLine::read(const dictionary& dict)
{
nSubCycle_ = 1;
}
Info<< type() << " : automatic track length specified through"
Info<< " automatic track length specified through"
<< " number of sub cycles : " << nSubCycle_ << nl << endl;
}
else
{
dict.lookup("trackLength") >> trackLength_;
Info<< type() << " : fixed track length specified : "
Info<< " fixed track length specified : "
<< trackLength_ << nl << endl;
}
@ -451,7 +451,7 @@ void Foam::streamLine::read(const dictionary& dict)
interpolationCellPoint<scalar>::typeName
);
//Info<< typeName << " using interpolation " << interpolationScheme_
//Info<< " using interpolation " << interpolationScheme_
// << endl;
cloudName_ = dict.lookupOrDefault<word>("cloudName", "streamLine");
@ -525,6 +525,8 @@ void Foam::streamLine::write()
{
if (active_)
{
Info<< type() << " " << name_ << " output:" << nl;
const Time& runTime = obr_.time();
const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);
@ -623,8 +625,8 @@ void Foam::streamLine::write()
n += allTracks_[trackI].size();
}
Info<< "Tracks:" << allTracks_.size()
<< " total samples:" << n << endl;
Info<< " Tracks:" << allTracks_.size() << " total samples:" << n
<< endl;
// Massage into form suitable for writers
@ -694,7 +696,7 @@ void Foam::streamLine::write()
)
);
Info<< "Writing data to " << vtkFile.path() << endl;
Info<< " Writing data to " << vtkFile.path() << endl;
scalarFormatterPtr_().write
(
@ -735,7 +737,7 @@ void Foam::streamLine::write()
)
);
//Info<< "Writing vector data to " << vtkFile << endl;
//Info<< " Writing vector data to " << vtkFile << endl;
vectorFormatterPtr_().write
(