44 void Foam::sampledSet::setSamples()
const
46 DynamicList<point> samplingPositions;
47 DynamicList<scalar> samplingDistances;
48 DynamicList<label> samplingSegments;
49 DynamicList<label> samplingCells;
50 DynamicList<label> samplingFaces;
64 (ordered && samplingDistances.size() != samplingPositions.size())
65 || (samplingCells.size() != samplingPositions.size())
66 || (samplingFaces.size() != samplingPositions.size())
67 || (samplingSegments.size() != samplingPositions.size())
71 <<
"sizes not equal : "
72 <<
" positions:" << samplingPositions.size();
74 <<
" distances:" << samplingDistances.size();
76 <<
" segments:" << samplingSegments.size()
77 <<
" cells:" << samplingCells.size()
78 <<
" faces:" << samplingFaces.size()
86 if (ordered) distances.
transfer(samplingDistances);
96 ordered ? distances : NullObjectRef<scalarField>(),
102 cellsPtr_().transfer(samplingCells);
105 facesPtr_().transfer(samplingFaces);
123 axis_(
coordSet::axisTypeNames_[axis])
182 if (oldToNewType.
found(sampleType))
184 const word newSampleType = oldToNewType[sampleType];
187 <<
"Unknown sample set type "
188 << sampleType <<
nl <<
nl
189 <<
"The sample set type " << sampleType <<
" has been renamed "
190 << newSampleType <<
nl <<
nl
191 <<
"Replace \"type " << sampleType <<
";\" with \"type "
192 << newSampleType <<
";\" for the set " <<
name <<
" in "
196 wordConstructorTable::iterator cstrIter =
197 wordConstructorTablePtr_->find(sampleType);
199 if (cstrIter == wordConstructorTablePtr_->end())
202 <<
"Unknown sample set type "
203 << sampleType <<
nl <<
nl
204 <<
"Valid sample set types : " <<
endl
205 << wordConstructorTablePtr_->sortedToc()
An STL-conforming hash table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
A 2-tuple for storing two objects of different types.
Holds list of sampling positions.
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
const fileName & name() const
Return the dictionary name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
static autoPtr< sampledSet > New(const word &name, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected sampledSet.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
sampledSet(const word &name, const polyMesh &mesh, const word &axis)
Construct from components.
virtual void movePoints()
Update for mesh point-motion.
virtual ~sampledSet()
Destructor.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const pointField & positions() const
Access the positions.
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
errorManip< error > abort(error &err)
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineRunTimeSelectionTable(fvConstraint, dictionary)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)