The open source CFD toolbox
findRefCell.H
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) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
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
26InNamespace
27 Foam
28
29Description
30 Find the reference cell nearest (in index) to the given cell but which
31 is not on a cyclic, symmetry or processor patch.
32
33SourceFiles
34 findRefCell.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef findRefCell_H
39#define findRefCell_H
40
41#include "label.H"
42#include "volFields.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49//- If the field fieldRef needs referencing find the reference cell nearest
50// (in index) to the given cell looked-up for field, but which is not on a
51// cyclic, symmetry or processor patch and return true, otherwise return false.
52bool setRefCell
53(
54 const volScalarField& field,
55 const volScalarField& fieldRef,
56 const dictionary& dict,
57 label& refCelli,
58 scalar& refValue,
59 const bool forceReference = false
60);
61
62//- If the field needs referencing find the reference cell nearest
63// (in index) to the given cell looked-up for field, but which is not on a
64// cyclic, symmetry or processor patch and return true, otherwise return false.
65bool setRefCell
66(
67 const volScalarField& field,
68 const dictionary& dict,
69 label& refCelli,
70 scalar& refValue,
71 const bool forceReference = false
72);
73
74
75//- Return the current value of field in the reference cell
76scalar getRefCellValue
77(
78 const volScalarField& field,
79 const label refCelli
80);
81
82}
83
84// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86#endif
87
88// ************************************************************************* //
rDeltaTY field()
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:134
bool setRefCell(const volScalarField &field, const volScalarField &fieldRef, const dictionary &dict, label &refCelli, scalar &refValue, const bool forceReference=false)
If the field fieldRef needs referencing find the reference cell nearest.
Definition: findRefCell.C:34
dictionary dict