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];
53 scalar minDist = great;
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;
90 const_cast<ignitionSite&
>(*this).findIgnitionCells(mesh_);
100 scalar curTime = db_.
value();
105 (curTime - deltaT >= time_)
107 (curTime - deltaT < time_ +
max(duration_, deltaT) + small)
114 scalar curTime = db_.
value();
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_;
bool changing() const
Is mesh changing (topology changing and/or moving)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< vector, fvPatchField, volMesh > volVectorField
void operator=(const ignitionSite &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const labelList & cells() const
Return the ignition cells updated if the mesh moved.
scalar deltaTValue() const
Return time step value.
const Type & value() const
Return const reference to value.
void setSize(const label)
Reset size of List.
label timeIndex() const
Return current time index.
prefixOSstream Pout(cout, "Pout")
dimensioned< scalar > mag(const dimensioned< Type > &)