43 void Foam::fv::interRegionModel::readCoeffs()
54 coeffs().
lookup(
"interpolationMethod") >> interpolationMethod_;
60 if (!interpolationPtr_.valid())
68 if (mesh().
name() == nbrMesh().
name())
71 <<
"Inter-region model selected, but local and "
72 <<
"neighbour regions are the same: " <<
nl
73 <<
" local region: " << mesh().name() <<
nl
74 <<
" secondary region: " << nbrMesh().name() <<
nl
78 if (mesh().bounds().overlaps(nbrMesh().bounds()))
81 interpolationPtr_->update(mesh(), nbrMesh());
86 <<
"regions " << mesh().name() <<
" and "
87 << nbrMesh().name() <<
" do not intersect"
95 return interpolationPtr_();
108 if (isA<interRegionModel>(
fvModels[fvModeli]))
111 refCast<const interRegionModel>(
fvModels[fvModeli]);
121 <<
"Neighbour model not found in region " << nbrMesh.
name() <<
nl
123 return NullObjectRef<interRegionModel>();
132 const word& modelType,
139 nbrRegionName_(
word::null),
140 interpolationMethod_(cellsToCellss::matching::typeName),
160 interpolationPtr_.clear();
#define forAll(list, i)
Loop across all elements in list.
Class to calculate interpolative addressing and weights between the cells of two overlapping meshes.
static autoPtr< cellsToCells > New(const word &cellsToCellsType)
Select from name.
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const word & name() const
Return reference to name.
Finite volume model abstract base class.
const dictionary & coeffs() const
Return dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
Base class for inter-region exchange.
interRegionModel(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual bool read(const dictionary &dict)
Read dictionary.
const word & nbrRegionName() const
Return const access to the neighbour region name.
const cellsToCells & interpolation() const
Return const access to the interpolation engine.
virtual ~interRegionModel()
Destructor.
const interRegionModel & nbrModel() const
Get the neighbour interRegionModel.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & indent(Ostream &os)
Indent stream.