Dimensioned field function which sets constant values inside a set of surfaces, and a default value elsewhere. Cutting is used to set fractional values in elements that intersect the surfaces. Foam::searchableSurface is used to define the surface geometry, so triangulated surface files can be used, as well as a list of simple predefined shapes (box, cylinder, ...). More...


Public Member Functions | |
| TypeName ("surfaces") | |
| Runtime type information. More... | |
| Surfaces (const dictionary &dict, DimensionedFieldType &field) | |
| Construct with dictionary to initialise given field. More... | |
| Surfaces (const Surfaces &dff, DimensionedFieldType &field) | |
| Construct a copy for the given field. More... | |
| virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > | clone (DimensionedFieldType &field) const |
| Construct and return a clone for the specified field. More... | |
| virtual | ~Surfaces () |
| Destructor. More... | |
| virtual void | evaluate () |
| Evaluate the function and set the field. More... | |
| virtual void | write (Ostream &os) const |
| Write data to dictionary stream. More... | |
Public Member Functions inherited from DimensionedFieldFunction< DimensionedFieldType > | |
| TypeName ("DimensionedFieldFunction") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, DimensionedFieldFunction, dictionary,(const dictionary &dict, DimensionedFieldType &field),(dict, field)) | |
| DimensionedFieldFunction (const dictionary &dict, DimensionedFieldType &field) | |
| Construct with dictionary to initialise given field. More... | |
| DimensionedFieldFunction (const DimensionedFieldFunction &dff, DimensionedFieldType &field) | |
| Construct a copy for the given field. More... | |
| DimensionedFieldFunction (const DimensionedFieldFunction< DimensionedFieldType > &)=delete | |
| Disallow default bitwise copy construction. More... | |
| virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > | clone () const |
| Construct and return a clone for the specified field. More... | |
| virtual | ~DimensionedFieldFunction () |
| Destructor. More... | |
| virtual bool | update () |
| Update the field if the function has changed and return true. More... | |
| virtual void | reset () |
| Reset the field size. More... | |
| void | operator= (const DimensionedFieldFunction< DimensionedFieldType > &)=delete |
| Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DimensionedFieldFunction< DimensionedFieldType > | |
| static autoPtr< DimensionedFieldFunction< DimensionedFieldType > > | New (const dictionary &dict, DimensionedFieldType &field) |
| Select null constructed. More... | |
Protected Attributes inherited from DimensionedFieldFunction< DimensionedFieldType > | |
| DimensionedFieldType & | field_ |
| Reference to the field the function applies to. More... | |
Dimensioned field function which sets constant values inside a set of surfaces, and a default value elsewhere. Cutting is used to set fractional values in elements that intersect the surfaces. Foam::searchableSurface is used to define the surface geometry, so triangulated surface files can be used, as well as a list of simple predefined shapes (box, cylinder, ...).
Example specification: internalField { type surfaces;
Set a value of one everywhere, except ... defaultValue 1;
surfaces { Set a value of zero in a sphere bubble { type sphere;
centre (0.5 0.5 0.5); radius 0.1;
value 0; }
Set a value of zero where the y coordinate is greater than 1 air { type plane;
point (0 1 0); normal (0 -1 0);
value 0; } } }
Definition at line 96 of file Surfaces_DimensionedFieldFunction.H.
| Surfaces | ( | const dictionary & | dict, |
| DimensionedFieldType & | field | ||
| ) |
Construct with dictionary to initialise given field.
Definition at line 76 of file Surfaces_DimensionedFieldFunction.C.
Construct a copy for the given field.
Definition at line 91 of file Surfaces_DimensionedFieldFunction.C.
|
inlinevirtual |
Destructor.
Definition at line 165 of file Surfaces_DimensionedFieldFunction.H.
| TypeName | ( | "surfaces" | ) |
Runtime type information.
|
virtual |
Construct and return a clone for the specified field.
Implements DimensionedFieldFunction< DimensionedFieldType >.
|
virtual |
Evaluate the function and set the field.
Implements DimensionedFieldFunction< DimensionedFieldType >.
Definition at line 124 of file Surfaces_DimensionedFieldFunction.C.
References Foam::dimless, forAll, IOobject::groupName(), Foam::searchableSurfaces::insideFraction(), Foam::name(), and Foam::New().

|
virtual |
Write data to dictionary stream.
Implements DimensionedFieldFunction< DimensionedFieldType >.
Definition at line 152 of file Surfaces_DimensionedFieldFunction.C.
References Foam::writeEntry().
