43 void Foam::fv::interRegionModel::readCoeffs(
const dictionary&
dict)
45 master_ =
dict.lookupOrDefault<
bool>(
"master",
true);
48 dict.lookupBackwardsCompatible<word>
54 dict.lookup(
"interpolationMethod") >> interpolationMethod_;
60 if (!interpolationPtr_.valid())
71 <<
"Inter-region model selected, but local and "
72 <<
"neighbour regions are the same: " <<
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),
159 readCoeffs(coeffs(
dict));
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indent(Ostream &os)
Indent stream.