Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
codedFixedValuePointPatchField< Type > Class Template Reference

Constructs on-the-fly a new boundary condition (derived from fixedValuePointPatchField) which is then used to evaluate. More...

Inheritance diagram for codedFixedValuePointPatchField< Type >:
Inheritance graph
[legend]
Collaboration diagram for codedFixedValuePointPatchField< Type >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("codedFixedValue")
 Runtime type information. More...
 
 codedFixedValuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Construct from patch and internal field. More...
 
 codedFixedValuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &, const bool valueRequired=true)
 Construct from patch, internal field and dictionary. More...
 
 codedFixedValuePointPatchField (const codedFixedValuePointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Construct by mapping given codedFixedValuePointPatchField. More...
 
 codedFixedValuePointPatchField (const codedFixedValuePointPatchField< Type > &)
 Construct as copy. More...
 
virtual autoPtr< pointPatchField< Type > > clone () const
 Construct and return a clone. More...
 
 codedFixedValuePointPatchField (const codedFixedValuePointPatchField< Type > &, const DimensionedField< Type, pointMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual autoPtr< pointPatchField< Type > > clone (const DimensionedField< Type, pointMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
const pointPatchField< Type > & redirectPatchField () const
 Get reference to the underlying patch. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void evaluate (const Pstream::commsTypes commsType=Pstream::blocking)
 Evaluate the patch field, sets Updated to false. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from fixedValuePointPatchField< Type >
 TypeName ("fixedValue")
 Runtime type information. More...
 
 fixedValuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Construct from patch and internal field. More...
 
 fixedValuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &, const bool valueRequired=true)
 Construct from patch, internal field and dictionary. More...
 
 fixedValuePointPatchField (const fixedValuePointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Construct by mapping given patchField<Type> onto a new patch. More...
 
 fixedValuePointPatchField (const fixedValuePointPatchField< Type > &, const DimensionedField< Type, pointMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual bool fixesValue () const
 Return true if this patch field fixes a value. More...
 
virtual void operator= (const Field< Type > &)
 
virtual void operator= (const Type &)
 
- Public Member Functions inherited from valuePointPatchField< Type >
 TypeName ("value")
 Runtime type information. More...
 
 valuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Construct from patch and internal field. More...
 
 valuePointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &, const bool valueRequired=true)
 Construct from patch, internal field and dictionary. More...
 
 valuePointPatchField (const valuePointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Construct by mapping given patchField<Type> onto a new patch. More...
 
 valuePointPatchField (const valuePointPatchField< Type > &, const DimensionedField< Type, pointMesh > &)
 Construct as copy setting internal field reference. More...
 
label size () const
 Return size. More...
 
virtual void autoMap (const pointPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const pointPatchField< Type > &, const labelList &)
 Reverse map the given PointPatchField onto. More...
 
virtual void operator= (const valuePointPatchField< Type > &)
 
virtual void operator= (const pointPatchField< Type > &)
 
virtual void operator== (const valuePointPatchField< Type > &)
 
virtual void operator== (const pointPatchField< Type > &)
 
virtual void operator== (const Field< Type > &)
 
virtual void operator== (const Type &)
 
- Public Member Functions inherited from pointPatchField< Type >
 TypeName ("pointPatchField")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, pointPatchField, pointPatch,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF),(p, iF))
 
 declareRunTimeSelectionTable (autoPtr, pointPatchField, patchMapper,(const pointPatchField< Type > &ptf, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const pointPatchFieldMapper &m),(dynamic_cast< const pointPatchFieldType & >(ptf), p, iF, m))
 
 declareRunTimeSelectionTable (autoPtr, pointPatchField, dictionary,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const dictionary &dict),(p, iF, dict))
 
 pointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Construct from patch and internal field. More...
 
 pointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 pointPatchField (const pointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Construct by mapping given patchField<Type> onto a new patch. More...
 
 pointPatchField (const pointPatchField< Type > &)
 Construct as copy. More...
 
 pointPatchField (const pointPatchField< Type > &, const DimensionedField< Type, pointMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual autoPtr< pointPatchField< Type > > clone () const=0
 Construct and return a clone. More...
 
virtual ~pointPatchField ()
 Destructor. More...
 
const objectRegistrydb () const
 Return local objectRegistry. More...
 
label size () const
 Return size. More...
 
const pointPatchpatch () const
 Return patch. More...
 
const DimensionedField< Type, pointMesh > & dimensionedInternalField () const
 Return dimensioned internal field reference. More...
 
const Field< Type > & internalField () const
 Return internal field reference. More...
 
const wordpatchType () const
 Optional patch type. More...
 
wordpatchType ()
 Optional patch type. More...
 
virtual bool fixesValue () const
 Return true if this patch field fixes a value. More...
 
virtual bool coupled () const
 Return true if this patch field is coupled. More...
 
bool updated () const
 Return true if the boundary condition has already been updated. More...
 
tmp< Field< Type > > patchInternalField () const
 Return field created from appropriate internal field values. More...
 
tmp< Field< Type1 > > patchInternalField (const Field< Type1 > &iF) const
 Return field created from appropriate internal field values. More...
 
tmp< Field< Type1 > > patchInternalField (const Field< Type1 > &iF, const labelList &meshPoints) const
 Return field created from selected internal field values. More...
 
tmp< Field< Type > > patchInternalField () const
 
void addToInternalField (Field< Type1 > &iF, const Field< Type1 > &pF) const
 Given the internal field and a patch field,. More...
 
void addToInternalField (Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &points) const
 Given the internal field and a patch field,. More...
 
void setInInternalField (Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
 Given the internal field and a patch field,. More...
 
void setInInternalField (Field< Type1 > &iF, const Field< Type1 > &pF) const
 Given the internal field and a patch field,. More...
 
virtual const wordconstraintType () const
 Return the constraint type this pointPatchField implements. More...
 
virtual void initEvaluate (const Pstream::commsTypes commsType=Pstream::blocking)
 Initialise evaluation of the patch field (do nothing) More...
 
virtual void operator+= (const pointPatchField< Type > &)
 
virtual void operator+= (const Field< Type > &)
 
virtual void operator+= (const Type &)
 
virtual void operator-= (const pointPatchField< Type > &)
 
virtual void operator-= (const Field< Type > &)
 
virtual void operator-= (const Type &)
 
virtual void operator*= (const pointPatchField< scalar > &)
 
virtual void operator*= (const Field< scalar > &)
 
virtual void operator*= (const scalar)
 
virtual void operator/= (const pointPatchField< scalar > &)
 
virtual void operator/= (const Field< scalar > &)
 
virtual void operator/= (const scalar)
 
- Public Member Functions inherited from Field< Type >
 Field ()
 Construct null. More...
 
 Field (const label)
 Construct given size. More...
 
 Field (const label, const Type &)
 Construct given size and initial value. More...
 
 Field (const UList< Type > &)
 Construct as copy of a UList<Type> More...
 
 Field (const Xfer< List< Type > > &)
 Construct by transferring the List contents. More...
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given tmp field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied uniform. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied values. More...
 
 Field (const Field< Type > &)
 Construct as copy. More...
 
 Field (Field< Type > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 Field (const Xfer< Field< Type > > &)
 Construct by transferring the Field contents. More...
 
 Field (const tmp< Field< Type > > &)
 Construct as copy of tmp<Field> More...
 
 Field (Istream &)
 Construct from Istream. More...
 
 Field (const word &keyword, const dictionary &, const label size)
 Construct from a dictionary entry. More...
 
tmp< Field< Type > > clone () const
 Clone. More...
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 map from the given field More...
 
void map (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 map from the given tmp field More...
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field. More...
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given tmp field. More...
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 Map from self. More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given field More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given tmp field More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given field. More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given tmp field. More...
 
void negate ()
 Negate this field. More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field. More...
 
void replace (const direction, const tmp< Field< cmptType > > &)
 Replace a component field of the field. More...
 
void replace (const direction, const cmptType &)
 Replace a component field of the field. More...
 
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry. More...
 
void operator= (const Field< Type > &)
 
void operator= (const UList< Type > &)
 
void operator= (const SubField< Type > &)
 
void operator= (const tmp< Field< Type > > &)
 
void operator= (const Type &)
 
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator= (const Field< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const tmp< Field > &rhs)
 
void operator= (const Type &t)
 
void operator+= (const UList< Type > &)
 
void operator+= (const tmp< Field< Type > > &)
 
void operator+= (const Type &)
 
void operator-= (const UList< Type > &)
 
void operator-= (const tmp< Field< Type > > &)
 
void operator-= (const Type &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar > > &)
 
void operator*= (const scalar &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar > > &)
 
void operator/= (const scalar &)
 
- Public Member Functions inherited from codedBase
 ClassName ("codedBase")
 Runtime type information. More...
 
 codedBase ()
 Construct null. More...
 
virtual ~codedBase ()
 Destructor. More...
 

Static Public Attributes

static const word codeTemplateC = "fixedValuePointPatchFieldTemplate.C"
 Name of the C code template to be used. More...
 
static const word codeTemplateH = "fixedValuePointPatchFieldTemplate.H"
 Name of the H code template to be used. More...
 
- Static Public Attributes inherited from pointPatchField< Type >
static int disallowGenericPointPatchField
 Debug switch to disallow the use of genericPointPatchField. More...
 
- Static Public Attributes inherited from Field< Type >
static const char *const typeName
 

Private Member Functions

const IOdictionarydict () const
 
virtual dlLibraryTablelibs () const
 Get the loaded dynamic libraries. More...
 
virtual void prepare (dynamicCode &, const dynamicCodeContext &) const
 Adapt the context for the current object. More...
 
virtual string description () const
 
virtual void clearRedirect () const
 
virtual const dictionarycodeDict () const
 

Static Private Member Functions

static void setFieldTemplates (dynamicCode &dynCode)
 Set the rewrite vars controlling the Type. More...
 

Private Attributes

dictionary dict_
 Dictionary contents for the boundary condition. More...
 
const word redirectType_
 
autoPtr< pointPatchField< Type > > redirectPatchFieldPtr_
 

Additional Inherited Members

- Public Types inherited from pointPatchField< Type >
typedef pointPatch Patch
 
- Public Types inherited from Field< Type >
typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
typedef SubField< Type > subField
 Declare type of subField. More...
 
- Static Public Member Functions inherited from pointPatchField< Type >
static autoPtr< pointPatchField< Type > > New (const word &, const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
static autoPtr< pointPatchField< Type > > New (const word &, const word &actualPatchType, const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
static autoPtr< pointPatchField< Type > > New (const pointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Return a pointer to a new patchField created on freestore from. More...
 
static autoPtr< pointPatchField< Type > > New (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
 Return a pointer to a new patchField created on freestore. More...
 
static autoPtr< pointPatchField< Type > > NewCalculatedType (const pointPatchField< Type2 > &)
 Return a pointer to a new CalculatedpointPatchField created on. More...
 
static const wordcalculatedType ()
 Return the type of the calculated form of pointPatchField. More...
 
- Static Public Member Functions inherited from Field< Type >
static const Field< Type > & null ()
 Return a null field. More...
 
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 Return a pointer to a new calculatedFvPatchFieldField created on. More...
 
- Protected Member Functions inherited from codedBase
void updateLibrary (const word &redirectType) const
 Update library as required. More...
 

Detailed Description

template<class Type>
class Foam::codedFixedValuePointPatchField< Type >

Constructs on-the-fly a new boundary condition (derived from fixedValuePointPatchField) which is then used to evaluate.

Example:

    movingWall
    {
        type            codedFixedValue;
        value           uniform 0;
        redirectType    rampedFixedValue;   // name of generated bc

        code
        #{
            operator==
            (
                vector(0,0,1)
               *min(10, 0.1*this->db().time().value())
            );
        #};

        //codeInclude
        //#{
        //    #include "fvCFD.H"
        //#};

        //codeOptions
        //#{
        //    -I$(LIB_SRC)/finiteVolume/lnInclude
        //#};
    }

A special form is if the 'code' section is not supplied. In this case the code gets read from a (runTimeModifiable!) dictionary system/codeDict which would have a corresponding entry

rampedFixedValue
{
    code
    #{
        operator==(min(10, 0.1*this->db().time().value()));
    #};
}
See also
codedFixedValueFvPatchField
Source files

Definition at line 102 of file codedFixedValuePointPatchField.H.

Constructor & Destructor Documentation

◆ codedFixedValuePointPatchField() [1/5]

codedFixedValuePointPatchField ( const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 180 of file codedFixedValuePointPatchField.C.

◆ codedFixedValuePointPatchField() [2/5]

codedFixedValuePointPatchField ( const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const dictionary dict,
const bool  valueRequired = true 
)

Construct from patch, internal field and dictionary.

Definition at line 210 of file codedFixedValuePointPatchField.C.

◆ codedFixedValuePointPatchField() [3/5]

codedFixedValuePointPatchField ( const codedFixedValuePointPatchField< Type > &  ptf,
const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const pointPatchFieldMapper mapper 
)

Construct by mapping given codedFixedValuePointPatchField.

onto a new patch

Definition at line 193 of file codedFixedValuePointPatchField.C.

◆ codedFixedValuePointPatchField() [4/5]

Construct as copy.

Definition at line 229 of file codedFixedValuePointPatchField.C.

◆ codedFixedValuePointPatchField() [5/5]

Construct as copy setting internal field reference.

Definition at line 243 of file codedFixedValuePointPatchField.C.

Member Function Documentation

◆ dict()

const Foam::IOdictionary & dict
private

Definition at line 67 of file codedFixedValuePointPatchField.C.

References objectRegistry::foundObject(), objectRegistry::lookupObject(), regIOobject::store(), and Foam::system().

Here is the call graph for this function:

◆ setFieldTemplates()

void setFieldTemplates ( dynamicCode dynCode)
staticprivate

Set the rewrite vars controlling the Type.

Definition at line 49 of file codedFixedValuePointPatchField.C.

References dynamicCode::setFilterVariable().

Here is the call graph for this function:

◆ libs()

Foam::dlLibraryTable & libs
privatevirtual

Get the loaded dynamic libraries.

Implements codedBase.

Definition at line 97 of file codedFixedValuePointPatchField.C.

◆ prepare()

void prepare ( dynamicCode dynCode,
const dynamicCodeContext context 
) const
privatevirtual

Adapt the context for the current object.

Implements codedBase.

Definition at line 105 of file codedFixedValuePointPatchField.C.

References dynamicCode::addCompileFile(), dynamicCode::addCopyFile(), dynamicCodeContext::libs(), dynamicCodeContext::options(), dynamicCode::setFilterVariable(), and dynamicCode::setMakeOptions().

Here is the call graph for this function:

◆ description()

Foam::string description
privatevirtual

Implements codedBase.

Definition at line 158 of file codedFixedValuePointPatchField.C.

References dimensionedInternalField().

Here is the call graph for this function:

◆ clearRedirect()

void clearRedirect
privatevirtual

Implements codedBase.

Definition at line 169 of file codedFixedValuePointPatchField.C.

◆ codeDict()

const Foam::dictionary & codeDict
privatevirtual

Implements codedBase.

Definition at line 144 of file codedFixedValuePointPatchField.C.

◆ TypeName()

TypeName ( "codedFixedValue"  )

Runtime type information.

◆ clone() [1/2]

virtual autoPtr<pointPatchField<Type> > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented from fixedValuePointPatchField< Type >.

Definition at line 188 of file codedFixedValuePointPatchField.H.

◆ clone() [2/2]

virtual autoPtr<pointPatchField<Type> > clone ( const DimensionedField< Type, pointMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Reimplemented from fixedValuePointPatchField< Type >.

Definition at line 205 of file codedFixedValuePointPatchField.H.

◆ redirectPatchField()

const Foam::pointPatchField< Type > & redirectPatchField

Get reference to the underlying patch.

Definition at line 260 of file codedFixedValuePointPatchField.C.

References dict, dimensionedInternalField(), Foam::nl, OStringStream::str(), Field::writeEntry(), and Ostream::writeKeyword().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs
virtual

Update the coefficients associated with the patch field.

Reimplemented from valuePointPatchField< Type >.

Definition at line 289 of file codedFixedValuePointPatchField.C.

References Foam::operator==().

Here is the call graph for this function:

◆ evaluate()

void evaluate ( const Pstream::commsTypes  commsType = Pstream::blocking)
virtual

Evaluate the patch field, sets Updated to false.

Reimplemented from valuePointPatchField< Type >.

Definition at line 312 of file codedFixedValuePointPatchField.C.

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from valuePointPatchField< Type >.

Definition at line 328 of file codedFixedValuePointPatchField.C.

References Foam::nl, write(), Ostream::writeKeyword(), and Ostream::writeQuoted().

Here is the call graph for this function:

Field Documentation

◆ dict_

dictionary dict_
mutableprivate

Dictionary contents for the boundary condition.

Definition at line 110 of file codedFixedValuePointPatchField.H.

◆ redirectType_

const word redirectType_
private

Definition at line 112 of file codedFixedValuePointPatchField.H.

◆ redirectPatchFieldPtr_

autoPtr<pointPatchField<Type> > redirectPatchFieldPtr_
mutableprivate

Definition at line 114 of file codedFixedValuePointPatchField.H.

◆ codeTemplateC

const Foam::word codeTemplateC = "fixedValuePointPatchFieldTemplate.C"
static

Name of the C code template to be used.

Definition at line 143 of file codedFixedValuePointPatchField.H.

◆ codeTemplateH

const Foam::word codeTemplateH = "fixedValuePointPatchFieldTemplate.H"
static

Name of the H code template to be used.

Definition at line 146 of file codedFixedValuePointPatchField.H.


The documentation for this class was generated from the following files: