STYLE: clear names of selected fields when re-reading

This commit is contained in:
Mark Olesen
2017-02-24 14:51:26 +01:00
parent a203d0a344
commit 3f1c72356f
2 changed files with 13 additions and 12 deletions

View File

@ -282,6 +282,7 @@ bool Foam::surfMeshSamplers::write()
bool Foam::surfMeshSamplers::read(const dictionary& dict) bool Foam::surfMeshSamplers::read(const dictionary& dict)
{ {
fieldSelection_.clear();
derivedNames_.clear(); derivedNames_.clear();
const bool createOnRead = const bool createOnRead =

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -153,20 +153,20 @@ public:
// Constructors // Constructors
//- Construct from Time and dictionary //- Construct from name, Time and dictionary
surfMeshSamplers surfMeshSamplers
( (
const word& name, const word& name,
const Time& time, const Time& runTime,
const dictionary& dict const dictionary& dict
); );
//- Construct for given objectRegistry and dictionary //- Construct from name, objectRegistry and dictionary
surfMeshSamplers surfMeshSamplers
( (
const word& name, const word& name,
const objectRegistry&, const objectRegistry& obr,
const dictionary& const dictionary& dict
); );
@ -192,19 +192,19 @@ public:
void verbose(const bool verbosity = true); void verbose(const bool verbosity = true);
//- Read the surfMeshSamplers dictionary //- Read the surfMeshSamplers dictionary
virtual bool read(const dictionary&); virtual bool read(const dictionary&) override;
//- Execute, does sampling //- Execute, does sampling
virtual bool execute(); virtual bool execute() override;
//- Write sampled values //- Write sampled values
virtual bool write(); virtual bool write() override;
//- Update for changes of mesh - expires the surfaces //- Update for changes of mesh - expires the surfaces
virtual void updateMesh(const mapPolyMesh&); virtual void updateMesh(const mapPolyMesh&) override;
//- Update for mesh point-motion - expires the surfaces //- Update for mesh point-motion - expires the surfaces
virtual void movePoints(const polyMesh&); virtual void movePoints(const polyMesh&) override;
//- Update for changes of mesh due to readUpdate - expires the surfaces //- Update for changes of mesh due to readUpdate - expires the surfaces
virtual void readUpdate(const polyMesh::readUpdateState state); virtual void readUpdate(const polyMesh::readUpdateState state);