ENH: sampledTrisurfaceMesh: construct from triSurface

This commit is contained in:
mattijs 2013-09-10 17:28:51 +01:00
parent 7a0d73e94e
commit db22ecdc26
2 changed files with 40 additions and 1 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -194,6 +194,36 @@ Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
{}
Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
(
const word& name,
const polyMesh& mesh,
const triSurface& surface,
const word& sampleSourceName
)
:
sampledSurface(name, mesh),
surface_
(
IOobject
(
name,
mesh.time().constant(), // instance
"triSurface", // local
mesh, // registry
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
surface
),
sampleSource_(samplingSourceNames_[sampleSourceName]),
needsUpdate_(true),
sampleElements_(0),
samplePoints_(0)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::sampledTriSurfaceMesh::~sampledTriSurfaceMesh()

View File

@ -161,6 +161,15 @@ public:
const dictionary& dict
);
//- Construct from triSurface
sampledTriSurfaceMesh
(
const word& name,
const polyMesh& mesh,
const triSurface& surface,
const word& sampleSourceName
);
//- Destructor
virtual ~sampledTriSurfaceMesh();