smoothAlignmentSolver.H
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) 2013-2018 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::smoothAlignmentSolver
26 
27 Description
28 
29 SourceFiles
30  smoothAlignmentSolverI.H
31  smoothAlignmentSolver.C
32  smoothAlignmentSolverIO.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef smoothAlignmentSolver_H
37 #define smoothAlignmentSolver_H
38 
39 #include "cellShapeControlMesh.H"
40 #include "triadField.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class smoothAlignmentSolver Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 {
53  // Private data
54 
55  cellShapeControlMesh& mesh_;
56 
57 
58  // Private Member Functions
59 
60  template<class Triangulation, class Type>
61  tmp<Field<Type>> filterFarPoints
62  (
63  const Triangulation& mesh,
64  const Field<Type>& field
65  );
66 
67  template<class Triangulation>
68  autoPtr<mapDistribute> buildMap
69  (
70  const Triangulation& mesh,
71  labelListList& pointPoints
72  );
73 
74  template<class Triangulation>
75  autoPtr<mapDistribute> buildReferredMap
76  (
77  const Triangulation& mesh,
78  labelList& indices
79  );
80 
81  template<class Triangulation>
82  tmp<triadField> buildAlignmentField(const Triangulation& mesh);
83 
84  template<class Triangulation>
85  tmp<pointField> buildPointField(const Triangulation& mesh);
86 
87  //- Apply the fixed alignments to the triad
88  void applyBoundaryConditions
89  (
90  const triad& fixedAlignment,
91  triad& t
92  ) const;
93 
94  //- Disallow default bitwise copy construct
96 
97  //- Disallow default bitwise assignment
98  void operator=(const smoothAlignmentSolver&);
99 
100 
101 public:
102 
103  // Constructors
104 
105  //- Construct null
107 
108 
109  //- Destructor
111 
112 
113  // Member Functions
114 
115  // Edit
116 
117  //- Smooth the alignments on the mesh
118  void smoothAlignments(const label maxSmoothingIterations);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
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
void smoothAlignments(const label maxSmoothingIterations)
Smooth the alignments on the mesh.
dynamicFvMesh & mesh
Pre-declare SubField and related Field type.
Definition: Field.H:57
Representation of a 3D Cartesian coordinate system as a Vector of vectors.
Definition: triad.H:65
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
~smoothAlignmentSolver()
Destructor.
Namespace for OpenFOAM.