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 const fvMesh& mesh
) )
: :
option(name, modelType, dict, mesh) cellSetOption(name, modelType, dict, mesh)
{ {
if (${verbose:-false}) if (${verbose:-false})
{ {

View File

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

View File

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

View File

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