/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
Class
Foam::triSurfaceMesh
Description
IOoject and searching on triSurface
Note: when constructing from dictionary has optional parameters:
- scale : scaling factor.
- tolerance : relative tolerance for doing intersections
(see triangle::intersection)
- minQuality: discard triangles with low quality when getting normal
SourceFiles
triSurfaceMesh.C
\*---------------------------------------------------------------------------*/
#ifndef triSurfaceMesh_H
#define triSurfaceMesh_H
#include "treeBoundBox.H"
#include "searchableSurface.H"
#include "objectRegistry.H"
#include "indexedOctree.H"
#include "treeDataTriSurface.H"
#include "treeDataPrimitivePatch.H"
#include "treeDataEdge.H"
#include "EdgeMap.H"
#include "triSurface.H"
#include "triSurfaceRegionSearch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class triSurfaceMesh Declaration
\*---------------------------------------------------------------------------*/
class triSurfaceMesh
:
public searchableSurface,
public objectRegistry, // so we can store fields
public triSurface,
public triSurfaceRegionSearch
{
private:
// Private member data
//- Supplied fileName override
fileName fName_;
//- Optional min triangle quality. Triangles below this get
// ignored for normal calculation
scalar minQuality_;
//- Search tree for boundary edges.
mutable autoPtr> edgeTree_;
//- Names of regions
mutable wordList regions_;
//- Is surface closed
mutable label surfaceClosed_;
// Private Member Functions
////- Helper: find instance of files without header
//static word findRawInstance
//(
// const Time&,
// const fileName&,
// const word&
//);
//- Return fileName to load IOobject from
static fileName checkFile(const IOobject& io);
//- Return fileName to load IOobject from. Optional override of fileName
static fileName checkFile(const IOobject&, const dictionary&);
//- Helper function for isSurfaceClosed
static bool addFaceToEdge
(
const edge&,
EdgeMap