/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ 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 3 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, see .
Class
Foam::fv::codedSource
Description
Constructs on-the-fly source
\heading Source usage
Example usage:
\verbatim
vectorCodedSourceCoeffs
{
fieldNames (U);
redirectType ramp;
codeCorrect
#{
Pout<< "**codeCorrect**" << endl;
#};
codeAddSup
#{
Pout<< "**codeAddSup**" << endl;
#};
codeSetValue
#{
Pout<< "**codeSetValue**" << endl;
#};
// Dummy entry. Make dependent on above to trigger recompilation
code
#{
$codeCorrect
$codeAddSup
$codeSetValue
#};
}
// Dummy entry
rampCoeffs
{}
\endverbatim
SourceFiles
codedSource.C
\*---------------------------------------------------------------------------*/
#ifndef CodedSource_H
#define CodedSource_H
#include "fvOption.H"
#include "codedBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace fv
{
/*---------------------------------------------------------------------------*\
Class codedSource Declaration
\*---------------------------------------------------------------------------*/
template
class CodedSource
:
public option,
public codedBase
{
protected:
// Protected data
word redirectType_;
string codeCorrect_;
string codeAddSup_;
string codeSetValue_;
//- Underlying functionObject
mutable autoPtr