mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added null constructor to basicSourceList
This commit is contained in:
@ -62,6 +62,22 @@ Foam::basicSourceList::basicSourceList
|
||||
PtrList<basicSource>(),
|
||||
mesh_(mesh),
|
||||
checkTimeIndex_(mesh_.time().startTimeIndex() + 2)
|
||||
{
|
||||
reset(dict);
|
||||
}
|
||||
|
||||
|
||||
Foam::basicSourceList::basicSourceList(const fvMesh& mesh)
|
||||
:
|
||||
PtrList<basicSource>(),
|
||||
mesh_(mesh),
|
||||
checkTimeIndex_(mesh_.time().startTimeIndex() + 2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::basicSourceList::reset(const dictionary& dict)
|
||||
{
|
||||
label count = 0;
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
@ -85,15 +101,13 @@ Foam::basicSourceList::basicSourceList
|
||||
this->set
|
||||
(
|
||||
i++,
|
||||
basicSource::New(name, sourceDict, mesh)
|
||||
basicSource::New(name, sourceDict, mesh_)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::basicSourceList::read(const dictionary& dict)
|
||||
{
|
||||
checkTimeIndex_ = mesh_.time().timeIndex() + 2;
|
||||
|
||||
@ -84,7 +84,10 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components with list of field names
|
||||
//- Construct null
|
||||
basicSourceList(const fvMesh& mesh);
|
||||
|
||||
//- Construct from mesh and dictionary
|
||||
basicSourceList(const fvMesh& mesh, const dictionary& dict);
|
||||
|
||||
|
||||
@ -95,6 +98,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Reset the source list
|
||||
void reset(const dictionary& dict);
|
||||
|
||||
//- Correct
|
||||
template<class Type>
|
||||
void correct(GeometricField<Type, fvPatchField, volMesh>& fld);
|
||||
|
||||
Reference in New Issue
Block a user