OpenFOAM: API Guide
v2006
The open source CFD toolbox
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
-------------------------------------------------------------------------------
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
Class
27
Foam::controlMeshRefinement
28
29
Description
30
31
SourceFiles
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
"
42
#include "
cellShapeControlMesh.H
"
43
#include "
cellSizeAndAlignmentControls.H
"
44
#include "
conformationSurfaces.H
"
45
#include "
backgroundMeshDecomposition.H
"
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
/*---------------------------------------------------------------------------*\
53
Class controlMeshRefinement Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
controlMeshRefinement
57
{
58
// Private data
59
60
const
cellShapeControl
& shapeController_;
61
62
cellShapeControlMesh
& mesh_;
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
105
controlMeshRefinement
(
const
controlMeshRefinement
&) =
delete
;
106
107
//- No copy assignment
108
void
operator=(
const
controlMeshRefinement
&) =
delete
;
109
110
111
public
:
112
113
//- Runtime type information
114
ClassName
(
"controlMeshRefinement"
);
115
116
117
// Constructors
118
119
//- Construct null
120
controlMeshRefinement
(
cellShapeControl
& shapeController);
121
122
123
//- Destructor
124
~controlMeshRefinement
();
125
126
127
// Member Functions
128
129
// Edit
130
131
void
initialMeshPopulation
132
(
133
const
autoPtr<backgroundMeshDecomposition>
& decomposition
134
);
135
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
// ************************************************************************* //
cellSizeAndAlignmentControls.H
cellShapeControl.H
Foam::PointHit< point >
Foam::midPoint
Mid-point interpolation (weighting factors = 0.5) scheme class.
Definition:
midPoint.H:55
Foam::conformationSurfaces
Definition:
conformationSurfaces.H:55
Foam::controlMeshRefinement::~controlMeshRefinement
~controlMeshRefinement()
Destructor.
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::cellSizeAndAlignmentControls
Definition:
cellSizeAndAlignmentControls.H:50
backgroundMeshDecomposition.H
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition:
createFields.H:27
conformationSurfaces.H
Foam::cellShapeControl
Definition:
cellShapeControl.H:64
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::controlMeshRefinement::initialMeshPopulation
void initialMeshPopulation(const autoPtr< backgroundMeshDecomposition > &decomposition)
cellShapeControlMesh.H
Foam::controlMeshRefinement::refineMesh
label refineMesh(const autoPtr< backgroundMeshDecomposition > &decomposition)
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition:
HashPtrTable.H:53
Foam::Vector< scalar >
Foam::line
A line primitive.
Definition:
line.H:59
Foam::controlMeshRefinement
Definition:
controlMeshRefinement.H:55
Foam::cellShapeControlMesh
Definition:
cellShapeControlMesh.H:63
Foam::controlMeshRefinement::ClassName
ClassName("controlMeshRefinement")
Runtime type information.
applications
utilities
mesh
generation
foamyMesh
conformalVoronoiMesh
cellShapeControl
controlMeshRefinement
controlMeshRefinement.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.