PatchFunction1 to sample an existing field. More...


Public Member Functions | |
| TypeName ("sampled") | |
| void | operator= (const Sampled< Type > &)=delete |
| No copy assignment. More... | |
| Sampled (const polyPatch &pp, const word &redirectType, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from entry name and dictionary. More... | |
| Sampled (const Sampled< Type > &rhs, const polyPatch &pp) | |
| Copy construct setting patch. More... | |
| Sampled (const Sampled< Type > &rhs) | |
| Copy construct. More... | |
| virtual tmp< PatchFunction1< Type > > | clone () const |
| Return a clone. More... | |
| virtual tmp< PatchFunction1< Type > > | clone (const polyPatch &pp) const |
| Return a clone, setting the patch. More... | |
| virtual | ~Sampled ()=default |
| Destructor. More... | |
| const GeometricField< Type, fvPatchField, volMesh > & | sampleField () const |
| Field to sample. Either on my or nbr mesh. More... | |
| virtual tmp< Field< Type > > | value (const scalar x) const |
| Return sampled value. More... | |
| virtual bool | constant () const |
| Is value constant (i.e. independent of x) More... | |
| virtual bool | uniform () const |
| Is value uniform (i.e. independent of coordinate) More... | |
| virtual tmp< Field< Type > > | integrate (const scalar x1, const scalar x2) const |
| Integrate between two values. More... | |
| virtual void | writeData (Ostream &os) const |
| Write in dictionary format. More... | |
Public Member Functions inherited from PatchFunction1< Type > | |
| TypeName ("PatchFunction1") declareRunTimeSelectionTable(autoPtr | |
| Runtime type information. More... | |
| PatchFunction1 (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
| Construct from polyPatch and entry name. More... | |
| PatchFunction1 (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from polyPatch, dictionary and entry name. More... | |
| PatchFunction1 (const PatchFunction1< Type > &rhs, const polyPatch &pp) | |
| Copy construct setting patch. More... | |
| PatchFunction1 (const PatchFunction1< Type > &rhs) | |
| Copy construct. More... | |
| virtual | ~PatchFunction1 ()=default |
| Destructor. More... | |
| virtual bool | good () const |
| Can function be evaluated? More... | |
| virtual tmp< pointField > | localPosition (const pointField &globalPos) const |
| Helper: optionally convert coordinates to local coordinates. More... | |
| virtual tmp< Field< Type > > | transform (const Field< Type > &fld) const |
| Apply optional transformation. More... | |
| virtual tmp< Field< Type > > | transform (const tmp< Field< Type >> &tfld) const |
| Apply optional transformation. More... | |
| virtual void | autoMap (const FieldMapper &mapper) |
| Map (and resize as needed) from self given a mapping object. More... | |
| virtual void | rmap (const PatchFunction1< Type > &rhs, const labelList &addr) |
| Reverse map the given PatchFunction1 onto this PatchFunction1. More... | |
Public Member Functions inherited from patchFunction1Base | |
| patchFunction1Base (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
| Construct from polyPatch and entry name. More... | |
| patchFunction1Base (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from polyPatch, dictionary and entry name. More... | |
| patchFunction1Base (const patchFunction1Base &rhs) | |
| Copy construct. More... | |
| patchFunction1Base (const patchFunction1Base &rhs, const polyPatch &pp) | |
| Copy construct setting patch. More... | |
| virtual | ~patchFunction1Base ()=default |
| Destructor. More... | |
| const word & | name () const noexcept |
| The name of the entry. More... | |
| const polyPatch & | patch () const noexcept |
| Reference to the patch. More... | |
| bool | faceValues () const noexcept |
| Generate face or point values on patch? More... | |
| label | size () const |
| Number of faces or points on the patch. More... | |
| const objectRegistry * | whichDb () const |
| Return the associated registry (ie, the mesh) More... | |
| const objectRegistry & | obr () const |
| Return the object registry (ie, the mesh) More... | |
| const Time & | time () const |
| Return false: function not created with time database. More... | |
| virtual void | userTimeToTime (const Time &t) |
| Convert time. More... | |
Public Member Functions inherited from refCount | |
| constexpr | refCount () noexcept |
| Default construct, initializing count to 0. More... | |
| int | use_count () const noexcept |
| Return the current reference count. More... | |
| bool | unique () const noexcept |
| Return true if the reference count is zero. More... | |
| void | operator++ () noexcept |
| Increment the reference count. More... | |
| void | operator++ (int) noexcept |
| Increment the reference count. More... | |
| void | operator-- () noexcept |
| Decrement the reference count. More... | |
| void | operator-- (int) noexcept |
| Decrement the reference count. More... | |
Public Member Functions inherited from mappedPatchBase | |
| TypeName ("mappedPatchBase") | |
| Runtime type information. More... | |
| mappedPatchBase (const polyPatch &) | |
| Construct from patch. More... | |
| mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vectorField &offsets) | |
| Construct with offsetMode=non-uniform. More... | |
| mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vector &uniformOffset) | |
| Construct from offsetMode=uniform. More... | |
| mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const scalar normalDistance) | |
| Construct from offsetMode=normal and distance. More... | |
| mappedPatchBase (const polyPatch &, const dictionary &) | |
| Construct from dictionary. More... | |
| mappedPatchBase (const polyPatch &, const sampleMode, const dictionary &) | |
| Construct from dictionary and (collocated) sample mode. More... | |
| mappedPatchBase (const polyPatch &, const mappedPatchBase &) | |
| Construct as copy, resetting patch. More... | |
| mappedPatchBase (const polyPatch &, const mappedPatchBase &, const labelUList &mapAddressing) | |
| Construct as copy, resetting patch, map original data. More... | |
| virtual | ~mappedPatchBase () |
| Destructor. More... | |
| void | clearOut () |
| void | setOffset (const scalar normalDist) |
| Change to normal offset with given distance. More... | |
| void | setOffset (const vector &uniformOffset) |
| Change to uniform offset with value. More... | |
| void | setOffset (const vectorField &offsets) |
| Change to non-uniform offsets. More... | |
| sampleMode | mode () const noexcept |
| What to sample. More... | |
| const word & | sampleWorld () const noexcept |
| World to sample. More... | |
| const word & | sampleRegion () const |
| Region to sample. More... | |
| const word & | samplePatch () const |
| Patch (only if NEARESTPATCHFACE) More... | |
| const word & | coupleGroup () const |
| PatchGroup (only if NEARESTPATCHFACE) More... | |
| label | sampleSize () const |
| Return size of mapped mesh/patch/boundary. More... | |
| const vector & | offset () const noexcept |
| Offset vector (from patch faces to destination mesh objects) More... | |
| const vectorField & | offsets () const noexcept |
| Offset vectors (from patch faces to destination mesh objects) More... | |
| label | getCommunicator () const |
| Get the communicator (worldComm or world-to-world) More... | |
| label | comm () const |
| Identical to getCommunicator() More... | |
| bool | sameWorld () const |
| Is sample world the local world? More... | |
| bool | masterWorld () const |
| Is my world ordered before the sampleWorld? More... | |
| bool | sameRegion () const noexcept |
| Cached sampleRegion != mesh.name() More... | |
| uniformDimensionedScalarField & | updateSampleMeshTime () const |
| Local mesh update time. More... | |
| uniformDimensionedScalarField & | updateMeshTime () const |
| Sample mesh upate time. More... | |
| bool | upToDate () const |
| const mapDistribute & | map () const |
| Return reference to the parallel distribution map. More... | |
| const AMIPatchToPatchInterpolation & | AMI (const bool forceUpdate=false) const |
| Return reference to the AMI interpolator. More... | |
| bool | owner () const |
| Is it owner. More... | |
| const autoPtr< Foam::searchableSurface > & | surfPtr () const |
| Return a pointer to the AMI projection surface. More... | |
| const polyMesh & | sampleMesh () const |
| Get the region mesh. More... | |
| const polyPatch & | samplePolyPatch () const |
| Get the patch on the region. More... | |
| tmp< pointField > | samplePoints () const |
| Get the sample points. More... | |
| const fileName & | sampleDatabasePath () const |
| bool | sampleDatabase () const noexcept |
| virtual fileName | sendPath (const label proci) const |
| virtual fileName | receivePath (const label proci) const |
| template<class Type > | |
| void | distribute (List< Type > &lst) const |
| Wrapper around map/interpolate data distribution. More... | |
| template<class Type , class CombineOp > | |
| void | distribute (List< Type > &lst, const CombineOp &cop) const |
| Wrapper around map/interpolate data distribution with operation. More... | |
| template<class Type > | |
| void | reverseDistribute (List< Type > &lst) const |
| Wrapper around map/interpolate data distribution. More... | |
| template<class Type , class CombineOp > | |
| void | reverseDistribute (List< Type > &lst, const CombineOp &cop) const |
| Wrapper around map/interpolate data distribution with operation. More... | |
| virtual void | write (Ostream &os) const |
| Write as a dictionary. More... | |
Protected Member Functions | |
| bool | haveSampleField () const |
| Field to sample. Either on my or nbr mesh. More... | |
Protected Member Functions inherited from PatchFunction1< Type > | |
| void | operator= (const PatchFunction1< Type > &)=delete |
| No copy assignment. More... | |
Protected Member Functions inherited from patchFunction1Base | |
| void | operator= (const patchFunction1Base &)=delete |
| No copy assignment. More... | |
Protected Member Functions inherited from mappedPatchBase | |
| virtual void | initGeometry (PstreamBuffers &) |
| Initialise the calculation of the patch geometry. More... | |
| virtual void | calcGeometry (PstreamBuffers &) |
| Calculate the patch geometry. More... | |
| virtual void | initMovePoints (PstreamBuffers &, const pointField &) |
| Initialise the patches for moving points. More... | |
| virtual void | movePoints (PstreamBuffers &, const pointField &) |
| Correct patches after moving points. More... | |
| virtual void | initUpdateMesh (PstreamBuffers &) |
| Initialise the update of the patch topology. More... | |
| virtual void | updateMesh (PstreamBuffers &) |
| Update of the patch topology. More... | |
| bool | addWorldConnection () |
| Add a world-world connection. More... | |
| label | getWorldCommunicator () const |
| Get the communicator for the world-world connection. More... | |
| const polyMesh & | lookupMesh (const word ®ion) const |
| Lookup mesh. More... | |
| const polyPatch & | lookupPatch (const word &sampleRegion, const word &samplePatch) const |
| Lookup patch. More... | |
| tmp< pointField > | facePoints (const polyPatch &) const |
| Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-decomposition triangles. More... | |
| void | collectSamples (const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const |
| Collect single list of samples and originating processor+face + wanted world. More... | |
| void | findLocalSamples (const sampleMode mode, const label sampleWorld, const word &sampleRegion, const word &samplePatch, const pointField &samplePoints, List< nearInfoWorld > &nearest) const |
| Find (local) cells/faces containing samples. More... | |
| void | findSamples (const sampleMode mode, const label myWorldIndex, const pointField &, const labelList &wantedWorlds, const labelList &origProcs, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const |
| Find (global) cells/faces containing samples. More... | |
| tmp< pointField > | samplePoints (const pointField &) const |
| Get the sample points given the face points. More... | |
| void | calcMapping () const |
| Calculate mapping. More... | |
| void | calcAMI () const |
| Calculate AMI interpolator. More... | |
Protected Attributes | |
| word | fieldName_ |
| Name of the field. More... | |
| const bool | setAverage_ |
| If true adjust the mapped field to maintain average value average_. More... | |
| const Type | average_ |
| Average value the mapped field is adjusted to maintain if setAverage_ is set true. More... | |
| word | interpolationScheme_ |
| Interpolation scheme to use for nearestcell mode. More... | |
Protected Attributes inherited from PatchFunction1< Type > | |
| coordinateScaling< Type > | coordSys_ |
| Optional local coordinate system and scaling. More... | |
Protected Attributes inherited from patchFunction1Base | |
| const word | name_ |
| Name of entry. More... | |
| const polyPatch & | patch_ |
| Reference to the patch. More... | |
| const bool | faceValues_ |
| Generate face or point values on patch. More... | |
Protected Attributes inherited from mappedPatchBase | |
| const polyPatch & | patch_ |
| Patch to sample. More... | |
| word | sampleWorld_ |
| World to sample. More... | |
| word | sampleRegion_ |
| Region to sample. More... | |
| const sampleMode | mode_ |
| What to sample. More... | |
| word | samplePatch_ |
| Patch (if in sampleMode NEARESTPATCH*) More... | |
| const coupleGroupIdentifier | coupleGroup_ |
| PatchGroup (if in sampleMode NEARESTPATCH*) More... | |
| const autoPtr< fileName > | sampleDatabasePtr_ |
| Empty or location of database. More... | |
| offsetMode | offsetMode_ |
| How to obtain samples. More... | |
| vector | offset_ |
| Offset vector (uniform) More... | |
| vectorField | offsets_ |
| Offset vector (nonuniform) More... | |
| scalar | distance_ |
| Offset distance (normal) More... | |
| label | communicator_ |
| Communicator. More... | |
| bool | sameRegion_ |
| Same region. More... | |
| autoPtr< mapDistribute > | mapPtr_ |
| Communication schedule: More... | |
| const bool | AMIReverse_ |
| Flag to indicate that slave patch should be reversed for AMI. More... | |
| autoPtr< AMIPatchToPatchInterpolation > | AMIPtr_ |
| Pointer to AMI interpolator. More... | |
| autoPtr< searchableSurface > | surfPtr_ |
| Pointer to projection surface employed by AMI interpolator. More... | |
| dictionary | surfDict_ |
| Dictionary storing projection surface description. More... | |
| autoPtr< uniformDimensionedScalarField > | updateMeshTimePtr_ |
| Local mesh update time. More... | |
| autoPtr< uniformDimensionedScalarField > | updateSampleMeshTimePtr_ |
| Sample mesh update time. More... | |
Additional Inherited Members | |
Public Types inherited from PatchFunction1< Type > | |
| typedef Field< Type > | returnType |
| The return type is a field of values. More... | |
Public Types inherited from mappedPatchBase | |
| enum | sampleMode { NEARESTCELL, NEARESTPATCHFACE, NEARESTPATCHFACEAMI, NEARESTPATCHPOINT, NEARESTFACE, NEARESTONLYCELL } |
| Mesh items to sample. More... | |
| enum | offsetMode { UNIFORM, NONUNIFORM, NORMAL } |
| How to project face centres. More... | |
| typedef Tuple2< pointIndexHit, Tuple2< scalar, label > > | nearInfo |
| Helper class for finding nearest. More... | |
| typedef Tuple2< nearInfo, label > | nearInfoWorld |
| nearest + world More... | |
Static Public Member Functions inherited from PatchFunction1< Type > | |
| template<class Derived > | |
| static tmp< PatchFunction1< Type > > | Clone (const Derived &fun) |
| Clone a PatchFunction1. More... | |
| template<class Derived > | |
| static tmp< PatchFunction1< Type > > | Clone (const Derived &fun, const polyPatch &pp) |
| Clone a PatchFunction1 with a patch. More... | |
| static autoPtr< PatchFunction1< Type > > | New (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true, const bool mandatory=true) |
| Selector. More... | |
| static autoPtr< PatchFunction1< Type > > | NewCompat (const polyPatch &pp, const word &entryName, std::initializer_list< std::pair< const char *, int >> compat, const dictionary &dict, const bool faceValues=true, const bool mandatory=true) |
| Compatibility selector. More... | |
| static autoPtr< PatchFunction1< Type > > | NewIfPresent (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) |
| An optional selector. More... | |
| static refPtr< PatchFunction1< Type > > | New (HashPtrTable< PatchFunction1< Type >> &cache, const polyPatch &pp, const word &entryName, const dictionary &dict, enum keyType::option matchOpt=keyType::LITERAL, const bool faceValues=true, const bool mandatory=true) |
| Selector with external storage. This also allows wildcard matches in a dictionary. More... | |
Static Public Member Functions inherited from mappedPatchBase | |
| static pointIndexHit | facePoint (const polyMesh &, const label facei, const polyMesh::cellDecomposition) |
| Get a point on the face given a face decomposition method: More... | |
| static fileName | sendPath (const fileName &root, const label proci) |
| Helper: return path to store data to be sent to processor i. More... | |
| static fileName | receivePath (const fileName &root, const label proci) |
| Helper: return path to store data to be received from processor i. More... | |
| static FOAM_NO_DANGLING_REFERENCE const objectRegistry & | subRegistry (const objectRegistry &obr, const fileName &path) |
| Lookup (sub)objectRegistry from '/' separated path (relative to objectRegistry). Creates non-existing intermediate ones. More... | |
| template<class Type > | |
| static void | storeField (objectRegistry &obr, const word &fieldName, const Field< Type > &values) |
| Store an IOField on the objectRegistry relative to obr. More... | |
| static void | writeDict (const objectRegistry &obr, dictionary &dict) |
| Convert objectRegistry contents into dictionary. More... | |
| static void | readDict (const dictionary &d, objectRegistry &obr) |
| (recursively) construct and register IOFields from dictionary More... | |
Public Attributes inherited from PatchFunction1< Type > | |
| PatchFunction1 | |
| dictionary | |
| const polyPatch & | pp |
| const polyPatch const word & | type |
| const polyPatch const word const word & | entryName |
| const polyPatch const word const word const dictionary & | dict |
| const polyPatch const word const word const dictionary const bool | faceValues |
| const polyPatch const word const word const dictionary const bool | pp |
| const polyPatch const word const word const dictionary const bool | type |
| const polyPatch const word const word const dictionary const bool | entryName |
| const polyPatch const word const word const dictionary const bool | dict |
Static Public Attributes inherited from mappedPatchBase | |
| static const Enum< sampleMode > | sampleModeNames_ |
| static const Enum< offsetMode > | offsetModeNames_ |
Static Protected Member Functions inherited from mappedPatchBase | |
| static autoPtr< fileName > | readDatabase (const dictionary &dict) |
| Read optional database name from dictionary. More... | |
| static FOAM_NO_DANGLING_REFERENCE const objectRegistry & | subRegistry (const objectRegistry &obr, const wordList &names, const label index) |
| Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate ones. More... | |
| template<class Type > | |
| static bool | writeIOField (const regIOobject &obj, dictionary &dict) |
| Attempt to detect an IOField<Type> and write to dictionary. More... | |
| template<class Type > | |
| static bool | constructIOField (const word &name, token &tok, Istream &is, objectRegistry &obr) |
| Attempt to read an IOField<Type> and store on objectRegistry. More... | |
PatchFunction1 to sample an existing field.
It is the exact functionality from mappedField boundary condition with the following differences:
| Property | Description | Required | Default value |
|---|---|---|---|
field | Field name | yes | |
sampleMode | how to obtain samples | yes | |
sampleRegion | mesh to sample | no | "" |
samplePatch | patch to sample | no | "" |
offsetMode | how to offset samples | no | uniform |
offset | uniform offset vector | no | (0 0 0) |
interpolationScheme | interpolation method | yes | cell |
setAverage | optional average adjustment | no | false |
average | optional average value | no |
Example of the boundary condition specification:
<patchName>
{
// Field to sample
field U;
// Geometric/mapping info (equivalent of 'mappedPatch' patch type)
sampleMode nearestCell;
offset (0 -0.001 0);
// Field specific info (equivalent of 'mappedField' patch field type)
interpolationScheme cell;
}| Sampled | ( | const polyPatch & | pp, |
| const word & | redirectType, | ||
| const word & | entryName, | ||
| const dictionary & | dict, | ||
| const bool | faceValues = true |
||
| ) |
Construct from entry name and dictionary.
Copy construct setting patch.
|
virtualdefault |
Destructor.
|
protected |
Field to sample. Either on my or nbr mesh.
| TypeName | ( | "sampled" | ) |
|
inlinevirtual |
Return a clone.
Implements PatchFunction1< Type >.
Definition at line 230 of file Sampled.H.
References PatchFunction1< Type >::Clone().

|
inlinevirtual |
Return a clone, setting the patch.
Implements PatchFunction1< Type >.
Definition at line 238 of file Sampled.H.
References PatchFunction1< Type >::Clone(), and PatchFunction1< Type >::pp.

| const GeometricField<Type, fvPatchField, volMesh>& sampleField | ( | ) | const |
Field to sample. Either on my or nbr mesh.
Return sampled value.
Reimplemented from PatchFunction1< Type >.
|
inlinevirtual |
Is value constant (i.e. independent of x)
Reimplemented from PatchFunction1< Type >.
|
inlinevirtual |
Is value uniform (i.e. independent of coordinate)
Implements PatchFunction1< Type >.
Integrate between two values.
Reimplemented from PatchFunction1< Type >.
|
virtual |
Write in dictionary format.
Reimplemented from PatchFunction1< Type >.
|
protected |
|
protected |
|
protected |