patchCutPlotTemplates.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "patchCutPlot.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 template<class PatchType>
33 (
34  const PatchType& p,
35  const scalarField& localPointXs,
36  const scalarField& cutXs,
37  const bool interpolate,
38  const bool normalise
39 )
40 {
41  return
43  (
44  p.localFaces(),
45  p.faceAreas(),
46  p.faceNormals(),
47  p.localPoints(),
48  localPointXs,
49  cutXs,
51  normalise
52  );
53 }
54 
55 
56 template<class PatchType>
58 (
59  const PatchType& p,
60  const scalarField& localPointXs,
61  const bool interpolate,
62  const label nCuts,
63  const label nIter,
64  const bool debug,
65  const word& functionName,
66  const polyMesh& functionMesh,
67  const setWriter& functionFormatter
68 )
69 {
70  return
71  calcCutXs
72  (
73  p.localFaces(),
74  p.faceAreas(),
75  p.faceNormals(),
76  p.localPoints(),
77  localPointXs,
79  nCuts,
80  nIter,
81  debug,
82  functionName,
83  functionMesh,
84  functionFormatter
85  );
86 }
87 
88 
89 // ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
A class for managing temporary objects.
Definition: tmp.H:55
volScalarField scalarField(fieldObject, mesh)
List< weight > calcWeights(const polyMesh &mesh, const generatedCellZone &zone, const scalarField &pointXs, const scalarField &cellMinXs, const scalarField &cellMaxXs, const labelList &cellMinOrder, const scalarField &cutXs, const bool interpolate, const bool normalise)
Definition: cellCutPlot.C:848
tmp< scalarField > calcCutXs(const polyMesh &mesh, const generatedCellZone &zone, const scalarField &pointXs, const bool interpolate, const label nCuts, const label nIter, const bool debug=false, const word &functionName=word::null, const setWriter &functionFormatter=NullObjectRef< setWriter >())
Compute and return evenly-spaced cut coordinates.
Definition: cellCutPlot.C:941
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
List< weight > calcWeights(const faceList &faces, const UList< vector > &faceAreas, const UList< vector > &faceNormals, const pointField &points, const scalarField &pointXs, const scalarField &faceMinXs, const scalarField &faceMaxXs, const labelList &faceMinOrder, const scalarField &cutXs, const bool interpolate, const bool normalise)
Definition: patchCutPlot.C:397
tmp< scalarField > calcCutXs(const faceList &faces, const Field< vector > &faceAreas, const Field< vector > &faceNormals, const pointField &points, const scalarField &pointXs, const bool interpolate, const label nCuts, const label nIter, const bool debug=false, const word &functionName=word::null, const polyMesh &functionMesh=NullObjectRef< polyMesh >(), const setWriter &functionFormatter=NullObjectRef< setWriter >())
Compute and return evenly-spaced cut coordinates.
Definition: patchCutPlot.C:488
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
quaternion normalise(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
Definition: quaternionI.H:603
volScalarField & p