controlMeshRefinement.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 | Copyright (C) 2013-2015 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 Class
25  Foam::controlMeshRefinement
26 
27 Description
28 
29 SourceFiles
30  controlMeshRefinementI.H
31  controlMeshRefinement.C
32  controlMeshRefinementIO.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef controlMeshRefinement_H
37 #define controlMeshRefinement_H
38 
39 #include "cellShapeControl.H"
40 #include "cellShapeControlMesh.H"
42 #include "conformationSurfaces.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class controlMeshRefinement Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
59 
61 
63 
65 
66 
67  // Private Member Functions
68 
69  scalar calcFirstDerivative
70  (
71  const Foam::point& a,
72  const scalar& cellSizeA,
73  const Foam::point& b,
74  const scalar& cellSizeB
75  ) const;
76 
78  (
79  const Foam::point& a,
80  const scalar& cellSizeA,
81  const Foam::point& midPoint,
82  const scalar& cellSizeMid,
83  const Foam::point& b,
84  const scalar& cellSizeB
85  ) const
86  {
87  return (cellSizeA - 2*cellSizeMid + cellSizeB)/magSqr((a - b)/2);
88  }
89 
90 
91  bool detectEdge
92  (
93  const Foam::point& startPt,
94  const Foam::point& endPt,
95  pointHit& pointFound,
96  const scalar tolSqr,
97  const scalar secondDerivTolSqr
98  ) const;
99 
100  pointHit findDiscontinuities(const linePointRef& l) const;
101 
102  //- Disallow default bitwise copy construct
104 
105  //- Disallow default bitwise assignment
106  void operator=(const controlMeshRefinement&);
107 
108 
109 public:
110 
111  //- Runtime type information
112  ClassName("controlMeshRefinement");
113 
114 
115  // Constructors
116 
117  //- Construct null
118  controlMeshRefinement(cellShapeControl& shapeController);
119 
120 
121  //- Destructor
123 
124 
125  // Member Functions
126 
127  // Edit
128 
130  (
131  const autoPtr<backgroundMeshDecomposition>& decomposition
132  );
133 
135  (
136  const autoPtr<backgroundMeshDecomposition>& decomposition
137  );
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
cellSizeAndAlignmentControls.H
Foam::controlMeshRefinement::operator=
void operator=(const controlMeshRefinement &)
Disallow default bitwise assignment.
cellShapeControl.H
Foam::PointHit
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
Definition: PointHit.H:51
Foam::midPoint
Mid-point interpolation (weighting factors = 0.5) scheme class.
Definition: midPoint.H:50
Foam::controlMeshRefinement::detectEdge
bool detectEdge(const Foam::point &startPt, const Foam::point &endPt, pointHit &pointFound, const scalar tolSqr, const scalar secondDerivTolSqr) const
Foam::controlMeshRefinement::mesh_
cellShapeControlMesh & mesh_
Definition: controlMeshRefinement.H:59
Foam::conformationSurfaces
Definition: conformationSurfaces.H:53
Foam::controlMeshRefinement::~controlMeshRefinement
~controlMeshRefinement()
Destructor.
Foam::cellSizeAndAlignmentControls
Definition: cellSizeAndAlignmentControls.H:48
Foam::controlMeshRefinement::shapeController_
const cellShapeControl & shapeController_
Definition: controlMeshRefinement.H:57
backgroundMeshDecomposition.H
Foam::label
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
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:28
conformationSurfaces.H
Foam::cellShapeControl
Definition: cellShapeControl.H:62
Foam::controlMeshRefinement::findDiscontinuities
pointHit findDiscontinuities(const linePointRef &l) const
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::controlMeshRefinement::initialMeshPopulation
void initialMeshPopulation(const autoPtr< backgroundMeshDecomposition > &decomposition)
Foam::controlMeshRefinement::calcSecondDerivative
scalar calcSecondDerivative(const Foam::point &a, const scalar &cellSizeA, const Foam::point &midPoint, const scalar &cellSizeMid, const Foam::point &b, const scalar &cellSizeB) const
Definition: controlMeshRefinement.H:77
cellShapeControlMesh.H
Foam::controlMeshRefinement::refineMesh
label refineMesh(const autoPtr< backgroundMeshDecomposition > &decomposition)
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::controlMeshRefinement::calcFirstDerivative
scalar calcFirstDerivative(const Foam::point &a, const scalar &cellSizeA, const Foam::point &b, const scalar &cellSizeB) const
Foam::controlMeshRefinement::sizeControls_
const cellSizeAndAlignmentControls & sizeControls_
Definition: controlMeshRefinement.H:61
Foam::controlMeshRefinement::geometryToConformTo_
const conformationSurfaces & geometryToConformTo_
Definition: controlMeshRefinement.H:63
Foam::Vector< scalar >
Foam::controlMeshRefinement::controlMeshRefinement
controlMeshRefinement(const controlMeshRefinement &)
Disallow default bitwise copy construct.
Foam::line
A line primitive.
Definition: line.H:56
Foam::controlMeshRefinement
Definition: controlMeshRefinement.H:53
Foam::cellShapeControlMesh
Definition: cellShapeControlMesh.H:61
Foam::controlMeshRefinement::ClassName
ClassName("controlMeshRefinement")
Runtime type information.
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)