32 void Foam::ignitionSite::findIgnitionCells(
const fvMesh& mesh)
39 label ignCell = mesh.findCell(location_);
45 scalar radius = diameter_/2.0;
51 cellVolumes_[0] = vols[ignCell];
58 scalar dist =
mag(centres[celli] - location_);
65 if (dist < radius && celli != ignCell)
68 cellVolumes_.
setSize(nIgnCells+1);
70 cells_[nIgnCells] = celli;
71 cellVolumes_[nIgnCells] = vols[celli];
79 Pout<<
"Found ignition cells:" <<
endl << cells_ <<
endl;
88 if (mesh_.changing() && timeIndex_ != db_.timeIndex())
90 const_cast<ignitionSite&
>(*this).findIgnitionCells(mesh_);
92 timeIndex_ = db_.timeIndex();
100 scalar curTime = db_.value();
101 scalar deltaT = db_.deltaTValue();
105 (curTime - deltaT >= time_)
107 (curTime - deltaT < time_ +
max(duration_, deltaT) + small)
114 scalar curTime = db_.value();
115 scalar deltaT = db_.deltaTValue();
117 return(curTime - deltaT >= time_);
125 location_ = is.location_;
126 diameter_ = is.diameter_;
128 duration_ = is.duration_;
129 strength_ = is.strength_;
131 cellVolumes_ = is.cellVolumes_;
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
const labelList & cells() const
Return the ignition cells updated if the mesh moved.
void operator=(const ignitionSite &)
scalar minDist(const List< pointIndexHit > &hitList)
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
prefixOSstream Pout(cout, "Pout")