OpenFOAM
v2406
The open source CFD toolbox
simplifiedFvMesh.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) 2018-2021 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
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 "
simplifiedFvMesh.H
"
29
#include "
fvPatchField.H
"
30
#include "
topoSet.H
"
31
32
// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
33
34
namespace
Foam
35
{
36
defineTypeNameAndDebug
(
simplifiedFvMesh
, 0);
37
defineRunTimeSelectionTable
(
simplifiedFvMesh
, time);
38
}
39
40
41
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
42
43
bool
Foam::simplifiedFvMesh::fvPatchFieldExists
(
const
word
& patchType)
44
{
45
return
46
(
47
fvPatchField<scalar>::dictionaryConstructorTablePtr_
->
found
(patchType)
48
||
fvPatchField<vector>::dictionaryConstructorTablePtr_
->
found
(patchType)
49
||
fvPatchField<sphericalTensor>
::
50
dictionaryConstructorTablePtr_->
found
(patchType)
51
||
fvPatchField<symmTensor>
::
52
dictionaryConstructorTablePtr_->
found
(patchType)
53
||
fvPatchField<tensor>::dictionaryConstructorTablePtr_
->
found
(patchType)
54
);
55
}
56
57
58
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
59
60
Foam::simplifiedFvMesh::simplifiedFvMesh
61
(
62
const
IOobject
&
io
,
63
pointField
&&
points
,
64
faceList
&& faces,
65
labelList
&& allOwner,
66
labelList
&& allNeighbour
67
)
68
:
69
fvMesh
70
(
71
io
,
72
std
::move(
points
),
73
std
::move(faces),
74
std
::move(allOwner),
75
std
::move(allNeighbour)
76
)
77
{}
78
79
80
Foam::autoPtr<Foam::simplifiedFvMesh>
Foam::simplifiedFvMesh::New
81
(
82
const
word
& modelType,
83
const
Time
&
runTime
84
)
85
{
86
Info
<<
"Selecting simplified mesh model "
<< modelType <<
endl
;
87
88
auto
* ctorPtr = timeConstructorTable(modelType);
89
90
if
(!ctorPtr)
91
{
92
FatalErrorInLookup
93
(
94
"simplified fvMesh"
,
95
modelType,
96
*timeConstructorTablePtr_
97
) <<
exit
(
FatalError
);
98
}
99
100
return
autoPtr<simplifiedFvMesh>(ctorPtr(
runTime
));
101
}
102
103
104
// ************************************************************************* //
Foam::simplifiedFvMesh::simplifiedFvMesh
simplifiedFvMesh(const IOobject &io, pointField &&points, faceList &&faces, labelList &&allOwner, labelList &&allNeighbour)
Constructor.
Definition:
simplifiedFvMesh.C:54
Foam::simplifiedFvMesh::New
static autoPtr< simplifiedFvMesh > New(const word &modelType, const Time &runTime)
Return a reference to the selected simplified mesh.
Definition:
simplifiedFvMesh.C:74
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition:
errorManip.H:125
Foam::FatalError
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
Foam::List< face >
runTime
engineTime & runTime
Definition:
createEngineTime.H:13
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition:
Ostream.H:531
Foam::UList::found
bool found(const T &val, label pos=0) const
Same as contains()
Definition:
UList.H:888
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition:
volSurfaceMapping.H:51
std
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition:
error.H:615
Foam::simplifiedFvMesh
Functions to generate simplified finite volume meshes.
Definition:
simplifiedFvMesh.H:48
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition:
Time.H:69
topoSet.H
Foam::simplifiedFvMesh::fvPatchFieldExists
static bool fvPatchFieldExists(const word &patchType)
Helper function to see if the patch type exists in the run-time selection tables. ...
Definition:
simplifiedFvMesh.C:36
points
const pointField & points
Definition:
gmvOutputHeader.H:1
Foam::Field< vector >
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:63
simplifiedFvMesh.H
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
fvPatchField.H
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
fvMesh.H:78
Foam::objectRegistry::found
bool found(const word &name, bool recursive=false) const
Same as contains()
Definition:
objectRegistry.H:957
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition:
HashPtrTable.H:48
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition:
IOobject.H:180
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
src
finiteVolume
fvMesh
simplifiedFvMesh
simplifiedFvMesh
simplifiedFvMesh.C
Generated by
1.8.14