mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: derive surface sampling from fvMeshFunctionObject
This commit is contained in:
committed by
Andrew Heather
parent
75a691ecfa
commit
4e7ac82060
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
@ -123,9 +123,8 @@ Foam::sampledSurfaces::sampledSurfaces
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
functionObjects::regionFunctionObject(name, runTime, dict),
|
||||
functionObjects::fvMeshFunctionObject(name, runTime, dict),
|
||||
PtrList<sampledSurface>(),
|
||||
mesh_(refCast<const fvMesh>(obr_)),
|
||||
loadFromFiles_(false),
|
||||
outputPath_
|
||||
(
|
||||
@ -152,9 +151,8 @@ Foam::sampledSurfaces::sampledSurfaces
|
||||
const bool loadFromFiles
|
||||
)
|
||||
:
|
||||
functionObjects::regionFunctionObject(name, obr, dict),
|
||||
functionObjects::fvMeshFunctionObject(name, obr, dict),
|
||||
PtrList<sampledSurface>(),
|
||||
mesh_(refCast<const fvMesh>(obr)),
|
||||
loadFromFiles_(loadFromFiles),
|
||||
outputPath_
|
||||
(
|
||||
@ -228,6 +226,8 @@ bool Foam::sampledSurfaces::write()
|
||||
|
||||
bool Foam::sampledSurfaces::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
PtrList<sampledSurface>::clear();
|
||||
mergedList_.clear();
|
||||
changedGeom_.clear();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -108,7 +108,7 @@ SourceFiles
|
||||
#ifndef sampledSurfaces_H
|
||||
#define sampledSurfaces_H
|
||||
|
||||
#include "regionFunctionObject.H"
|
||||
#include "fvMeshFunctionObject.H"
|
||||
#include "sampledSurface.H"
|
||||
#include "surfaceWriter.H"
|
||||
#include "mergedSurf.H"
|
||||
@ -122,21 +122,16 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class Time;
|
||||
class fvMesh;
|
||||
class dictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class sampledSurfaces Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class sampledSurfaces
|
||||
:
|
||||
public functionObjects::regionFunctionObject,
|
||||
public functionObjects::fvMeshFunctionObject,
|
||||
public PtrList<sampledSurface>
|
||||
{
|
||||
// Static data members
|
||||
// Static Data Members
|
||||
|
||||
//- Output verbosity
|
||||
static bool verbose_;
|
||||
@ -145,10 +140,7 @@ class sampledSurfaces
|
||||
static scalar mergeTol_;
|
||||
|
||||
|
||||
// Private data
|
||||
|
||||
//- Const reference to fvMesh
|
||||
const fvMesh& mesh_;
|
||||
// Private Data
|
||||
|
||||
//- Load fields from files (not from objectRegistry)
|
||||
const bool loadFromFiles_;
|
||||
|
||||
@ -174,9 +174,8 @@ Foam::surfMeshSamplers::surfMeshSamplers
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
functionObjects::regionFunctionObject(name, runTime, dict),
|
||||
functionObjects::fvMeshFunctionObject(name, runTime, dict),
|
||||
PtrList<surfMeshSample>(),
|
||||
mesh_(refCast<const fvMesh>(obr_)),
|
||||
fieldSelection_(),
|
||||
derivedNames_(),
|
||||
sampleFaceScheme_(),
|
||||
@ -193,9 +192,8 @@ Foam::surfMeshSamplers::surfMeshSamplers
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
functionObjects::regionFunctionObject(name, obr, dict),
|
||||
functionObjects::fvMeshFunctionObject(name, obr, dict),
|
||||
PtrList<surfMeshSample>(),
|
||||
mesh_(refCast<const fvMesh>(obr)),
|
||||
fieldSelection_(),
|
||||
derivedNames_(),
|
||||
sampleFaceScheme_(),
|
||||
@ -323,6 +321,8 @@ bool Foam::surfMeshSamplers::write()
|
||||
|
||||
bool Foam::surfMeshSamplers::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
PtrList<surfMeshSample>::clear();
|
||||
fieldSelection_.clear();
|
||||
derivedNames_.clear();
|
||||
|
||||
@ -102,7 +102,7 @@ SourceFiles
|
||||
#ifndef surfMeshSamplers_H
|
||||
#define surfMeshSamplers_H
|
||||
|
||||
#include "regionFunctionObject.H"
|
||||
#include "fvMeshFunctionObject.H"
|
||||
#include "surfMeshSample.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "surfaceFieldsFwd.H"
|
||||
@ -114,33 +114,22 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class Time;
|
||||
class fvMesh;
|
||||
class dictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class surfMeshSamplers Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class surfMeshSamplers
|
||||
:
|
||||
public functionObjects::regionFunctionObject,
|
||||
public functionObjects::fvMeshFunctionObject,
|
||||
public PtrList<surfMeshSample>
|
||||
{
|
||||
// Static data members
|
||||
// Static Data Members
|
||||
|
||||
//- Output verbosity
|
||||
static bool verbose_;
|
||||
|
||||
|
||||
// Private data
|
||||
|
||||
//- Const reference to fvMesh
|
||||
const fvMesh& mesh_;
|
||||
|
||||
|
||||
// Read from dictionary
|
||||
// Private Data
|
||||
|
||||
//- Names of fields to sample
|
||||
wordRes fieldSelection_;
|
||||
|
||||
Reference in New Issue
Block a user