codedFvOption: Added cellSet support

Patch provided by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2240
This commit is contained in:
Henry Weller
2016-09-09 12:29:06 +01:00
parent cb1a012b66
commit 4fcdb0b4e4
4 changed files with 6 additions and 7 deletions

View File

@ -104,7 +104,7 @@ ${typeName}FvOption${SourceType}
const fvMesh& mesh
)
:
option(name, modelType, dict, mesh)
cellSetOption(name, modelType, dict, mesh)
{
if (${verbose:-false})
{

View File

@ -105,7 +105,7 @@ SourceFiles
#ifndef codedFvOptionTemplate_H
#define codedFvOptionTemplate_H
#include "fvOption.H"
#include "cellSetOption.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -121,7 +121,7 @@ namespace fv
class ${typeName}FvOption${SourceType}
:
public option
public cellSetOption
{
public:

View File

@ -68,6 +68,7 @@ void Foam::fv::CodedSource<Type>::prepare
"-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
"-I$(LIB_SRC)/meshTools/lnInclude \\\n"
"-I$(LIB_SRC)/sampling/lnInclude \\\n"
"-I$(LIB_SRC)/fvOptions/lnInclude \\\n"
+ context.options()
+ "\n\nLIB_LIBS = \\\n"
+ " -lmeshTools \\\n"

View File

@ -57,14 +57,12 @@ Usage
{
type scalarCodedSource;
active yes;
scalarCodedSourceCoeffs
{
selectionMode all;
fieldNames (h);
name sourceTime;
fields (h);
name sourceTime;
codeInclude
#{