Skip to content
Snippets Groups Projects
Commit 309120d5 authored by andy's avatar andy
Browse files

ENH: Added null constructor to basicSourceList

parent ac8af99b
Branches
Tags
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment