Merge commit 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2009-11-25 12:29:31 +01:00
87 changed files with 51704 additions and 987 deletions

View File

@ -117,45 +117,6 @@ void Foam::fieldValues::cellSource::initialise()
}
void Foam::fieldValues::cellSource::makeFile()
{
// Create the forces file if not already created
if (outputFilePtr_.empty())
{
if (debug)
{
Info<< "Creating output file." << endl;
}
// File update
if (Pstream::master())
{
fileName outputDir;
if (Pstream::parRun())
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
outputDir =
obr_.time().path()/".."/name_/obr_.time().timeName();
}
else
{
outputDir = obr_.time().path()/name_/obr_.time().timeName();
}
// Create directory if does not exist
mkDir(outputDir);
// Open new file at start up
outputFilePtr_.reset(new OFstream(outputDir/(type() + ".dat")));
// Add headers to output data
writeFileHeader();
}
}
}
void Foam::fieldValues::cellSource::writeFileHeader()
{
if (outputFilePtr_.valid())
@ -190,16 +151,9 @@ Foam::fieldValues::cellSource::cellSource
fieldValue(name, obr, dict, loadFromFiles),
source_(sourceTypeNames_.read(dict.lookup("source"))),
operation_(operationTypeNames_.read(dict.lookup("operation"))),
cellId_(),
outputFilePtr_(NULL)
cellId_()
{
initialise();
if (active_)
{
// Create the output file if not already created
makeFile();
}
read(dict);
}
@ -213,9 +167,11 @@ Foam::fieldValues::cellSource::~cellSource()
void Foam::fieldValues::cellSource::read(const dictionary& dict)
{
fieldValue::read(dict);
if (active_)
{
fieldValue::read(dict);
// no additional info to read
initialise();
}
}
@ -223,13 +179,10 @@ void Foam::fieldValues::cellSource::read(const dictionary& dict)
void Foam::fieldValues::cellSource::write()
{
fieldValue::write();
if (active_)
{
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl;
}
outputFilePtr_()
<< obr_.time().value() << tab
<< sum(filterField(mesh().V()));

View File

@ -58,7 +58,6 @@ SourceFiles
#include "NamedEnum.H"
#include "fieldValue.H"
#include "labelList.H"
#include "OFstream.H"
#include "volFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -114,9 +113,6 @@ private:
//- Set cells to evaluate based on a patch
void setPatchCells();
//- Create the output file if not already created
void makeFile();
protected:
@ -131,9 +127,6 @@ protected:
//- Local list of cell IDs
labelList cellId_;
//- Output file pointer
autoPtr<OFstream> outputFilePtr_;
// Protected member functions

View File

@ -258,45 +258,6 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
}
void Foam::fieldValues::faceSource::makeFile()
{
// Create the forces file if not already created
if (outputFilePtr_.empty())
{
if (debug)
{
Info<< "Creating output file." << endl;
}
// File update
if (Pstream::master())
{
fileName outputDir;
if (Pstream::parRun())
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
outputDir =
obr_.time().path()/".."/name_/obr_.time().timeName();
}
else
{
outputDir = obr_.time().path()/name_/obr_.time().timeName();
}
// Create directory if does not exist
mkDir(outputDir);
// Open new file at start up
outputFilePtr_.reset(new OFstream(outputDir/(type() + ".dat")));
// Add headers to output data
writeFileHeader();
}
}
}
void Foam::fieldValues::faceSource::writeFileHeader()
{
if (outputFilePtr_.valid())
@ -334,16 +295,9 @@ Foam::fieldValues::faceSource::faceSource
faceId_(),
facePatchId_(),
flipMap_(),
outputFilePtr_(NULL),
weightFieldName_("undefinedWeightedFieldName")
{
if (active_)
{
initialise(dict);
// Create the output file if not already created
makeFile();
}
read(dict);
}
@ -357,9 +311,10 @@ Foam::fieldValues::faceSource::~faceSource()
void Foam::fieldValues::faceSource::read(const dictionary& dict)
{
fieldValue::read(dict);
if (active_)
{
fieldValue::read(dict);
initialise(dict);
}
}
@ -367,13 +322,10 @@ void Foam::fieldValues::faceSource::read(const dictionary& dict)
void Foam::fieldValues::faceSource::write()
{
fieldValue::write();
if (active_)
{
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl;
}
outputFilePtr_()
<< obr_.time().value() << tab
<< sum(filterField(mesh().magSf()));

View File

@ -66,7 +66,6 @@ SourceFiles
#include "NamedEnum.H"
#include "fieldValue.H"
#include "labelList.H"
#include "OFstream.H"
#include "surfaceFieldsFwd.H"
#include "volFieldsFwd.H"
@ -125,9 +124,6 @@ private:
//- Set faces to evaluate based on a patch
void setPatchFaces();
//- Create the output file if not already created
void makeFile();
protected:
@ -148,9 +144,6 @@ protected:
//- List of +1/-1 representing face flip map
labelList flipMap_;
//- Output file pointer
autoPtr<OFstream> outputFilePtr_;
//- Weight field name - only used for opWeightedAverage mode
word weightFieldName_;

View File

@ -26,6 +26,7 @@ License
#include "fieldValue.H"
#include "fvMesh.H"
#include "Time.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -54,6 +55,73 @@ void Foam::fieldValue::movePoints(const Field<point>&)
}
void Foam::fieldValue::makeFile()
{
// Create the forces file if not already created
if (outputFilePtr_.empty())
{
if (debug)
{
Info<< "Creating output file." << endl;
}
// File update
if (Pstream::master())
{
fileName outputDir;
word startTimeName =
obr_.time().timeName(obr_.time().startTime().value());
if (Pstream::parRun())
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
outputDir =
obr_.time().path()/".."/name_/startTimeName;
}
else
{
outputDir = obr_.time().path()/name_/startTimeName;
}
// Create directory if does not exist
mkDir(outputDir);
// Open new file at start up
outputFilePtr_.reset(new OFstream(outputDir/(type() + ".dat")));
// Add headers to output data
writeFileHeader();
}
}
}
void Foam::fieldValue::read(const dictionary& dict)
{
if (active_)
{
log_ = dict.lookupOrDefault<Switch>("log", false);
dict.lookup("fields") >> fields_;
dict.lookup("valueOutput") >> valueOutput_;
}
}
void Foam::fieldValue::write()
{
if (active_)
{
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl;
}
makeFile();
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fieldValue::fieldValue
@ -70,7 +138,8 @@ Foam::fieldValue::fieldValue
log_(false),
sourceName_(dict.lookup("sourceName")),
fields_(dict.lookup("fields")),
valueOutput_(dict.lookup("valueOutput"))
valueOutput_(dict.lookup("valueOutput")),
outputFilePtr_(NULL)
{
// Only active if obr is an fvMesh
if (isA<fvMesh>(obr_))
@ -103,65 +172,6 @@ Foam::fieldValue::~fieldValue()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::word& Foam::fieldValue::name() const
{
return name_;
}
const Foam::objectRegistry& Foam::fieldValue::obr() const
{
return obr_;
}
bool Foam::fieldValue::active() const
{
return active_;
}
const Foam::Switch& Foam::fieldValue::log() const
{
return log_;
}
const Foam::word& Foam::fieldValue::sourceName() const
{
return sourceName_;
}
const Foam::wordList& Foam::fieldValue::fields() const
{
return fields_;
}
const Foam::Switch& Foam::fieldValue::valueOutput() const
{
return valueOutput_;
}
const Foam::fvMesh& Foam::fieldValue::mesh() const
{
return refCast<const fvMesh>(obr_);
}
void Foam::fieldValue::read(const dictionary& dict)
{
if (active_)
{
log_ = dict.lookupOrDefault<Switch>("log", false);
dict.lookup("fields") >> fields_;
dict.lookup("valueOutput") >> valueOutput_;
}
}
void Foam::fieldValue::execute()
{
// Do nothing

View File

@ -38,6 +38,7 @@ SourceFiles
#include "Switch.H"
#include "pointFieldFwd.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,9 +83,18 @@ protected:
//- Output field values flag
Switch valueOutput_;
//- Output file pointer
autoPtr<OFstream> outputFilePtr_;
// Functions to be over-ridden from IOoutputFilter class
//- Make the output file
virtual void makeFile();
//- Write the output file header
virtual void writeFileHeader() = 0;
//- Update mesh
virtual void updateMesh(const mapPolyMesh&);
@ -117,28 +127,28 @@ public:
// Access
//- Return the name of the geometric source
const word& name() const;
inline const word& name() const;
//- Return the reference to the object registry
const objectRegistry& obr() const;
inline const objectRegistry& obr() const;
//- Return the active flag
bool active() const;
inline bool active() const;
//- Return the switch to send output to Info as well as to file
const Switch& log() const;
inline const Switch& log() const;
//- Return the source name
const word& sourceName() const;
inline const word& sourceName() const;
//- Return the list of field names
const wordList& fields() const;
inline const wordList& fields() const;
//- Return the output field values flag
const Switch& valueOutput() const;
inline const Switch& valueOutput() const;
//- Helper function to return the reference to the mesh
const fvMesh& mesh() const;
inline const fvMesh& mesh() const;
// Function object functions
@ -146,6 +156,9 @@ public:
//- Read from dictionary
virtual void read(const dictionary& dict);
//- Write to screen/file
virtual void write();
//- Execute
virtual void execute();
@ -160,6 +173,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "fieldValueI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,79 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
\*---------------------------------------------------------------------------*/
#include "fieldValue.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const Foam::word& Foam::fieldValue::name() const
{
return name_;
}
inline const Foam::objectRegistry& Foam::fieldValue::obr() const
{
return obr_;
}
inline bool Foam::fieldValue::active() const
{
return active_;
}
inline const Foam::Switch& Foam::fieldValue::log() const
{
return log_;
}
inline const Foam::word& Foam::fieldValue::sourceName() const
{
return sourceName_;
}
inline const Foam::wordList& Foam::fieldValue::fields() const
{
return fields_;
}
inline const Foam::Switch& Foam::fieldValue::valueOutput() const
{
return valueOutput_;
}
inline const Foam::fvMesh& Foam::fieldValue::mesh() const
{
return refCast<const fvMesh>(obr_);
}
// ************************************************************************* //

View File

@ -160,6 +160,9 @@ protected:
//- If the forces file has not been created create it
void makeFile();
//- Output file header information
virtual void writeFileHeader();
//- Return the effective viscous stress (laminar + turbulent).
tmp<volSymmTensorField> devRhoReff() const;
@ -176,9 +179,6 @@ protected:
//- Disallow default bitwise assignment
void operator=(const forces&);
//- Output file header information
virtual void writeFileHeader();
public:

View File

@ -7,4 +7,7 @@ staticPressure/staticPressureFunctionObject.C
dsmcFields/dsmcFields.C
dsmcFields/dsmcFieldsFunctionObject.C
timeActivatedFileUpdate/timeActivatedFileUpdate.C
timeActivatedFileUpdate/timeActivatedFileUpdateFunctionObject.C
LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects

View File

@ -62,7 +62,12 @@ Foam::dsmcFields::dsmcFields
WarningIn
(
"dsmcFields::dsmcFields"
"(const objectRegistry&, const dictionary&)"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating." << nl
<< endl;
}

View File

@ -68,7 +68,12 @@ Foam::staticPressure::staticPressure
WarningIn
(
"staticPressure::staticPressure"
"(const objectRegistry&, const dictionary&)"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating." << nl
<< endl;
}
@ -81,7 +86,12 @@ Foam::staticPressure::staticPressure
WarningIn
(
"staticPressure::staticPressure"
"(const objectRegistry&, const dictionary&)"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "Pressure is not kinematic pressure, deactivating." << nl
<< endl;
}

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
Typedef
Foam::IOtimeActivatedFileUpdate
Description
Instance of the generic IOOutputFilter for timeActivatedFileUpdate.
\*---------------------------------------------------------------------------*/
#ifndef IOtimeActivatedFileUpdate_H
#define IOtimeActivatedFileUpdate_H
#include "timeActivatedFileUpdate.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<timeActivatedFileUpdate> IOtimeActivatedFileUpdate;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.5;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
functions
{
fileUpdate1
{
type timeActivatedFileUpdate;
functionObjectLibs ("libutilityFunctionObjects.so");
outputControl timeStep;
outputInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
timeVsFile
(
(-1 "$FOAM_CASE/system/fvSolution.0")
(0.10 "$FOAM_CASE/system/fvSolution.10")
(0.20 "$FOAM_CASE/system/fvSolution.20")
(0.35 "$FOAM_CASE/system/fvSolution.35")
);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,146 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
\*---------------------------------------------------------------------------*/
#include "timeActivatedFileUpdate.H"
#include "objectRegistry.H"
#include "Time.H"
#include "dictionary.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(timeActivatedFileUpdate, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::timeActivatedFileUpdate::updateFile()
{
label i = lastIndex_;
while
(
i < timeVsFile_.size()-1
&& timeVsFile_[i+1].first() < obr_.time().value()
)
{
i++;
}
if (i > lastIndex_)
{
Info<< nl << type() << ": copying file" << nl << timeVsFile_[i].second()
<< nl << "to:" << nl << fileToUpdate_ << nl << endl;
cp(timeVsFile_[i].second(), fileToUpdate_);
lastIndex_ = i;
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::timeActivatedFileUpdate::timeActivatedFileUpdate
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
const bool loadFromFiles
)
:
name_(name),
obr_(obr),
active_(true),
fileToUpdate_(dict.lookup("fileToUpdate")),
timeVsFile_(),
lastIndex_(-1)
{
read(dict);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::timeActivatedFileUpdate::~timeActivatedFileUpdate()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::timeActivatedFileUpdate::read(const dictionary& dict)
{
if (active_)
{
dict.lookup("fileToUpdate") >> fileToUpdate_;
dict.lookup("timeVsFile") >> timeVsFile_;
lastIndex_ = -1;
fileToUpdate_.expand();
Info<< type() << ": time vs file list:" << nl;
forAll(timeVsFile_, i)
{
timeVsFile_[i].second() = timeVsFile_[i].second().expand();
if (!isFile(timeVsFile_[i].second()))
{
FatalErrorIn("timeActivatedFileUpdate::read(const dictionary&)")
<< "File: " << timeVsFile_[i].second() << " not found"
<< nl << exit(FatalError);
}
Info<< " " << timeVsFile_[i].first() << tab
<< timeVsFile_[i].second() << endl;
}
Info<< endl;
updateFile();
}
}
void Foam::timeActivatedFileUpdate::execute()
{
if (active_)
{
updateFile();
}
}
void Foam::timeActivatedFileUpdate::end()
{
// Do nothing
}
void Foam::timeActivatedFileUpdate::write()
{
// Do nothing
}
// ************************************************************************* //

View File

@ -0,0 +1,173 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
Class
Foam::timeActivatedFileUpdate
Description
Performs a file copy/replacement once a specified time has been reached.
Example usage to update the fvSolution dictionary at various times
throughout the calculation:
fileUpdate1
{
type timeActivatedFileUpdate;
functionObjectLibs ("libutilityFunctionObjects.so");
outputControl timeStep;
outputInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
timeVsFile
(
(-1 "$FOAM_CASE/system/fvSolution.0")
(0.10 "$FOAM_CASE/system/fvSolution.10")
(0.20 "$FOAM_CASE/system/fvSolution.20")
(0.35 "$FOAM_CASE/system/fvSolution.35")
);
}
SourceFiles
timeActivatedFileUpdate.C
IOtimeActivatedFileUpdate.H
\*---------------------------------------------------------------------------*/
#ifndef timeActivatedFileUpdate_H
#define timeActivatedFileUpdate_H
#include "pointFieldFwd.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class objectRegistry;
class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class timeActivatedFileUpdate Declaration
\*---------------------------------------------------------------------------*/
class timeActivatedFileUpdate
{
// Private data
//- Name of this set of timeActivatedFileUpdate objects
word name_;
//- Owner database
const objectRegistry& obr_;
//- On/off switch
bool active_;
//- Name of file to update
fileName fileToUpdate_;
//- List of times vs filenames
List<Tuple2<scalar, fileName> > timeVsFile_;
//- Index of last file copied
label lastIndex_;
// Private Member Functions
//- Update file
void updateFile();
//- Disallow default bitwise copy construct
timeActivatedFileUpdate(const timeActivatedFileUpdate&);
//- Disallow default bitwise assignment
void operator=(const timeActivatedFileUpdate&);
public:
//- Runtime type information
TypeName("timeActivatedFileUpdate");
// Constructors
//- Construct for given objectRegistry and dictionary.
// Allow the possibility to load fields from files
timeActivatedFileUpdate
(
const word& name,
const objectRegistry&,
const dictionary&,
const bool loadFromFiles = false
);
//- Destructor
virtual ~timeActivatedFileUpdate();
// Member Functions
//- Return name of the set of timeActivatedFileUpdate
virtual const word& name() const
{
return name_;
}
//- Read the timeActivatedFileUpdate data
virtual void read(const dictionary&);
//- Execute, currently does nothing
virtual void execute();
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Calculate the timeActivatedFileUpdate and write
virtual void write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&)
{}
//- Update for changes of mesh
virtual void movePoints(const pointField&)
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
\*---------------------------------------------------------------------------*/
#include "timeActivatedFileUpdateFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineNamedTemplateTypeNameAndDebug
(
timeActivatedFileUpdateFunctionObject,
0
);
addToRunTimeSelectionTable
(
functionObject,
timeActivatedFileUpdateFunctionObject,
dictionary
);
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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
Typedef
Foam::timeActivatedFileUpdateFunctionObject
Description
FunctionObject wrapper around timeActivatedFileUpdate to allow it to be
created via the functions list within controlDict.
SourceFiles
timeActivatedFileUpdateFunctionObject.C
\*---------------------------------------------------------------------------*/
#ifndef timeActivatedFileUpdateFunctionObject_H
#define timeActivatedFileUpdateFunctionObject_H
#include "timeActivatedFileUpdate.H"
#include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef OutputFilterFunctionObject<timeActivatedFileUpdate>
timeActivatedFileUpdateFunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //