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