Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
34494082
Commit
34494082
authored
Apr 28, 2020
by
Mark OLESEN
Browse files
STYLE: use simpler typedefs for PrimitivePatch instances
parent
8cbf55ac
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/interpolations/patchToPatchInterpolation/patchToPatchInterpolation.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -23,26 +24,26 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::patchToPatchInterpolation
Description
Foam::patchToPatchInterpolation
\*---------------------------------------------------------------------------*/
#ifndef patchToPatchInterpolation_H
#define patchToPatchInterpolation_H
#include
"PatchToPatchInterpolation.H"
#include
"PrimitivePatch.H"
#include
"face.H"
#include
"SubList.H"
#include
"pointField.H"
#include
"primitivePatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
typedef
PatchToPatchInterpolation
<
PrimitivePatch
<
face
,
SubList
,
const
pointField
&>
,
PrimitivePatch
<
face
,
SubList
,
const
pointField
&>
>
patchToPatchInterpolation
;
typedef
PatchToPatchInterpolation
<
primitivePatch
,
primitivePatch
>
patchToPatchInterpolation
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C
View file @
34494082
...
...
@@ -64,7 +64,7 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToPointWeights() const
const
List
<
typename
Patch
::
face_type
>&
faces
=
patch_
.
localFaces
();
faceToPointWeightsPtr_
=
new
scalarListList
(
points
.
size
());
scalarListList
&
weights
=
*
faceToPointWeightsPtr_
;
auto
&
weights
=
*
faceToPointWeightsPtr_
;
// get reference to addressing
const
labelListList
&
pointFaces
=
patch_
.
pointFaces
();
...
...
@@ -122,7 +122,7 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
const
labelListList
&
edgeFaces
=
patch_
.
edgeFaces
();
faceToEdgeWeightsPtr_
=
new
scalarList
(
patch_
.
nInternalEdges
());
scalarList
&
weights
=
*
faceToEdgeWeightsPtr_
;
auto
&
weights
=
*
faceToEdgeWeightsPtr_
;
forAll
(
weights
,
edgei
)
{
...
...
@@ -301,12 +301,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
<<
abort
(
FatalError
);
}
tmp
<
Field
<
Type
>>
tresult
(
new
Field
<
Type
>
(
patch_
.
nEdges
(),
Zero
)
);
Field
<
Type
>&
result
=
tresult
.
ref
();
auto
tresult
=
tmp
<
Field
<
Type
>>::
New
(
patch_
.
nEdges
(),
Zero
);
auto
&
result
=
tresult
.
ref
();
const
edgeList
&
edges
=
patch_
.
edges
();
const
labelListList
&
edgeFaces
=
patch_
.
edgeFaces
();
...
...
src/OpenFOAM/interpolations/primitivePatchInterpolation/primitivePatchInterpolation.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -35,19 +36,14 @@ Description
#define primitivePatchInterpolation_H
#include
"PrimitivePatchInterpolation.H"
#include
"PrimitivePatch.H"
#include
"face.H"
#include
"SubList.H"
#include
"pointField.H"
#include
"primitivePatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
typedef
PrimitivePatchInterpolation
<
PrimitivePatch
<
face
,
SubList
,
const
pointField
&>
>
primitivePatchInterpolation
;
typedef
PrimitivePatchInterpolation
<
primitivePatch
>
primitivePatchInterpolation
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/OpenFOAM/meshes/primitiveMesh/primitivePatch/indirectPrimitivePatch.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -27,7 +28,8 @@ Typedef
Foam::indirectPrimitivePatch
Description
A PrimitivePatch using an IndirectList for the faces.
A PrimitivePatch with an IndirectList for the faces, const reference
for the point field.
\*---------------------------------------------------------------------------*/
...
...
src/OpenFOAM/meshes/primitiveMesh/primitivePatch/primitiveFacePatch.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -27,7 +28,10 @@ Typedef
Foam::primitiveFacePatch
Description
Foam::primitiveFacePatch
A PrimitivePatch with List storage for the faces,
const reference for the point field.
Can be used to store faces.
\*---------------------------------------------------------------------------*/
...
...
src/OpenFOAM/meshes/primitiveMesh/primitivePatch/primitivePatch.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -27,7 +28,10 @@ Typedef
Foam::primitivePatch
Description
Addressing for a faceList slice.
A PrimitivePatch with a SubList addressing for the faces,
const reference for the point field.
Can be used as addressing for a faceList slice.
\*---------------------------------------------------------------------------*/
...
...
src/OpenFOAM/meshes/primitiveMesh/primitivePatch/uindirectPrimitivePatch.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -27,7 +28,8 @@ Typedef
Foam::uindirectPrimitivePatch
Description
A PrimitivePatch using a UIndirectList for the faces.
A PrimitivePatch with UIndirectList for the faces, const reference
for the point field.
\*---------------------------------------------------------------------------*/
...
...
src/dynamicMesh/boundaryMesh/boundaryMesh.C
View file @
34494082
...
...
@@ -36,6 +36,7 @@ License
#include
"triSurface.H"
#include
"SortableList.H"
#include
"OFstream.H"
#include
"primitiveFacePatch.H"
#include
"uindirectPrimitivePatch.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -538,11 +539,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
//
// Temporary primitivePatch to calculate compact points & faces.
PrimitivePatch
<
face
,
List
,
const
pointField
&>
globalPatch
(
bFaces
,
mesh
.
points
()
);
primitiveFacePatch
globalPatch
(
bFaces
,
mesh
.
points
());
// Store in local(compact) addressing
clearOut
();
...
...
src/dynamicMesh/boundaryMesh/boundaryMesh.H
View file @
34494082
...
...
@@ -50,7 +50,7 @@ SourceFiles
namespace
Foam
{
// Forward
d
eclaration
of classe
s
// Forward
D
eclarations
class
Time
;
class
polyMesh
;
class
primitiveMesh
;
...
...
@@ -61,7 +61,7 @@ class primitiveMesh;
class
boundaryMesh
{
// Static
d
ata
// Static
D
ata
//- Normal along which to divide faces into categories
// (used in getNearest)
...
...
@@ -73,7 +73,7 @@ class boundaryMesh
static
const
scalar
distanceTol_
;
// Private
d
ata
// Private
D
ata
//- All boundary mesh data. Reconstructed every time faces are repatched
bMesh
*
meshPtr_
;
...
...
src/meshTools/AMIInterpolation/AMIInterpolation/AMIPatchToPatchInterpolation.H
View file @
34494082
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -29,20 +30,14 @@ License
#define AMIPatchToPatchInterpolation_H
#include
"AMIInterpolation.H"
#include
"PrimitivePatch.H"
#include
"face.H"
#include
"SubList.H"
#include
"pointField.H"
#include
"primitivePatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
typedef
AMIInterpolation
<
PrimitivePatch
<
face
,
SubList
,
const
pointField
&>
,
PrimitivePatch
<
face
,
SubList
,
const
pointField
&>
>
AMIPatchToPatchInterpolation
;
typedef
AMIInterpolation
<
primitivePatch
,
primitivePatch
>
AMIPatchToPatchInterpolation
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment