isoSurfaceBaseNew.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28#include "isoSurfaceBase.H"
29#include "isoSurfaceCell.H"
30#include "isoSurfacePoint.H"
31#include "isoSurfaceTopo.H"
32
33// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
34
37(
38 const isoSurfaceParams& params,
39 const volScalarField& cellValues,
40 const scalarField& pointValues,
41 const scalar iso,
42 const bitSet& ignoreCells
43)
44{
46
48 {
49 ptr.reset
50 (
52 (
53 /* fvMesh implicit from cellValues */
56 iso,
57 params,
58 ignoreCells // unused
59 )
60 );
61 }
62 else if (params.algorithm() == isoSurfaceParams::ALGO_CELL)
63 {
64 ptr.reset
65 (
67 (
68 cellValues.mesh(), // polyMesh
69 cellValues.primitiveField(),
71 iso,
72 params,
73 ignoreCells
74 )
75 );
76 }
77 else
78 {
79 // ALGO_TOPO, ALGO_DEFAULT
80 ptr.reset
81 (
83 (
84 cellValues.mesh(), // polyMesh
85 cellValues.primitiveField(),
87 iso,
88 params,
89 ignoreCells
90 )
91 );
92 }
93
94 // Cannot really fail (with current logic)
95 // if (!ptr)
96 // {
97 // FatalErrorInFunction
98 // << "Unknown iso-surface algorithm ("
99 // << int(params.algorithm()) << ")\n"
100 // << exit(FatalError);
101 // }
102
103 return ptr;
104}
105
106
107// ************************************************************************* //
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
void reset(autoPtr< T > &&other) noexcept
Delete managed object and set to new given pointer.
Definition: autoPtrI.H:117
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:66
const scalarField & cellValues() const noexcept
The mesh cell values used for creating the iso-surface.
const scalarField & pointValues() const noexcept
The mesh point values used for creating the iso-surface.
A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons",...
Preferences for controlling iso-surface algorithms.
algorithmType algorithm() const noexcept
Get current algorithm.
A surface formed by the iso value. After "Regularised Marching Tetrahedra: improved iso-surface extra...
Marching tet iso surface algorithm with optional filtering to keep only points originating from mesh ...