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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2015 OpenFOAM Foundation
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
26Class
27 Foam::controlMeshRefinement
28
29Description
30
31SourceFiles
32 controlMeshRefinementI.H
33 controlMeshRefinement.C
34 controlMeshRefinementIO.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef controlMeshRefinement_H
39#define controlMeshRefinement_H
40
41#include "cellShapeControl.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class controlMeshRefinement Declaration
54\*---------------------------------------------------------------------------*/
57{
58 // Private data
59
60 const cellShapeControl& shapeController_;
61
63
64 const cellSizeAndAlignmentControls& sizeControls_;
65
66 const conformationSurfaces& geometryToConformTo_;
67
68
69 // Private Member Functions
70
71 scalar calcFirstDerivative
72 (
73 const Foam::point& a,
74 const scalar& cellSizeA,
75 const Foam::point& b,
76 const scalar& cellSizeB
77 ) const;
78
79 scalar calcSecondDerivative
80 (
81 const Foam::point& a,
82 const scalar& cellSizeA,
83 const Foam::point& midPoint,
84 const scalar& cellSizeMid,
85 const Foam::point& b,
86 const scalar& cellSizeB
87 ) const
88 {
89 return (cellSizeA - 2*cellSizeMid + cellSizeB)/magSqr((a - b)/2);
90 }
91
92
93 bool detectEdge
94 (
95 const Foam::point& startPt,
96 const Foam::point& endPt,
97 pointHit& pointFound,
98 const scalar tolSqr,
99 const scalar secondDerivTolSqr
100 ) const;
101
102 pointHit findDiscontinuities(const linePointRef& l) const;
103
104 //- No copy construct
106
107 //- No copy assignment
108 void operator=(const controlMeshRefinement&) = delete;
109
110
111public:
112
113 //- Runtime type information
114 ClassName("controlMeshRefinement");
115
116
117 // Constructors
118
119 //- Construct null
120 controlMeshRefinement(cellShapeControl& shapeController);
121
122
123 //- Destructor
125
126
127 // Member Functions
128
129 // Edit
132 (
133 const autoPtr<backgroundMeshDecomposition>& decomposition
134 );
136 label refineMesh
137 (
138 const autoPtr<backgroundMeshDecomposition>& decomposition
139 );
140};
141
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145} // End namespace Foam
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149#endif
150
151// ************************************************************************* //
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
Definition: PointHit.H:54
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
void initialMeshPopulation(const autoPtr< backgroundMeshDecomposition > &decomposition)
controlMeshRefinement(cellShapeControl &shapeController)
Construct null.
ClassName("controlMeshRefinement")
Runtime type information.
~controlMeshRefinement()
Destructor.
label refineMesh(const autoPtr< backgroundMeshDecomposition > &decomposition)
A line primitive.
Definition: line.H:68
Mid-point interpolation (weighting factors = 0.5) scheme class.
Definition: midPoint.H:58
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
Namespace for OpenFOAM.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
volScalarField & b
Definition: createFields.H:27