Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
50a97a7d
Commit
50a97a7d
authored
Dec 26, 2012
by
Henry
Browse files
Merge branch 'master' of
ssh://opencfd:8007/home/dm4/OpenFOAM/OpenFOAM-dev
parents
e22205d3
78575272
Changes
15
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C
View file @
50a97a7d
...
...
@@ -466,8 +466,8 @@ int main(int argc, char *argv[])
labelListList
pointPoints
;
autoPtr
<
mapDistribute
>
meshDistributor
=
buildMap
(
mesh
,
pointPoints
);
triadField
alignments
=
buildAlignmentField
(
mesh
);
pointField
points
=
buildPointField
(
mesh
);
triadField
alignments
(
buildAlignmentField
(
mesh
)
)
;
pointField
points
(
buildPointField
(
mesh
)
)
;
mesh
.
printInfo
(
Info
);
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H
View file @
50a97a7d
...
...
@@ -168,7 +168,8 @@ public:
);
//- Inserts points into the triangulation if the point is within
// the circumsphere of another cell
// the circumsphere of another cell. Returns HashSet of failed
// point insertions
template
<
class
PointIterator
>
labelPairHashSet
rangeInsertReferredWithInfo
(
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C
View file @
50a97a7d
...
...
@@ -585,7 +585,7 @@ Foam::label Foam::cellShapeControl::refineMesh
const
autoPtr
<
backgroundMeshDecomposition
>&
decomposition
)
{
const
pointField
cellCentres
=
shapeControlMesh_
.
cellCentres
();
const
pointField
cellCentres
(
shapeControlMesh_
.
cellCentres
()
)
;
Info
<<
" Created cell centres"
<<
endl
;
...
...
@@ -682,7 +682,7 @@ Foam::label Foam::cellShapeControl::refineMesh
)
);
verts
.
last
().
targetCellSize
()
=
lastCellSize
;
verts
.
last
().
alignment
()
=
t
ensor
::
I
;
verts
.
last
().
alignment
()
=
t
riad
::
unset
;
}
}
...
...
@@ -704,8 +704,8 @@ void Foam::cellShapeControl::smoothMesh()
pointPoints
);
triadField
alignments
=
buildAlignmentField
(
shapeControlMesh_
);
pointField
points
=
buildPointField
(
shapeControlMesh_
);
triadField
alignments
(
buildAlignmentField
(
shapeControlMesh_
)
)
;
pointField
points
(
buildPointField
(
shapeControlMesh_
)
)
;
// Setup the sizes and alignments on each point
triadField
fixedAlignments
(
shapeControlMesh_
.
vertexCount
(),
triad
::
unset
);
...
...
@@ -721,12 +721,7 @@ void Foam::cellShapeControl::smoothMesh()
{
const
tensor
&
alignment
=
vit
->
alignment
();
fixedAlignments
[
vit
->
index
()]
=
triad
(
alignment
.
x
(),
alignment
.
y
(),
alignment
.
z
()
);
fixedAlignments
[
vit
->
index
()]
=
alignment
;
}
}
...
...
@@ -881,12 +876,7 @@ void Foam::cellShapeControl::smoothMesh()
{
if
(
vit
->
real
())
{
vit
->
alignment
()
=
tensor
(
alignments
[
vit
->
index
()].
x
(),
alignments
[
vit
->
index
()].
y
(),
alignments
[
vit
->
index
()].
z
()
);
vit
->
alignment
()
=
alignments
[
vit
->
index
()];
}
}
...
...
@@ -911,9 +901,7 @@ void Foam::cellShapeControl::smoothMesh()
{
if
(
vit
->
referred
())
{
const
triad
&
t
=
alignments
[
referredPoints
[
referredI
++
]];
vit
->
alignment
()
=
tensor
(
t
.
x
(),
t
.
y
(),
t
.
z
());
vit
->
alignment
()
=
alignments
[
referredPoints
[
referredI
++
]];
}
}
}
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C
View file @
50a97a7d
...
...
@@ -684,7 +684,7 @@ void Foam::cellShapeControlMesh::insertBoundingPoints(const boundBox& bb)
boundBox
bbInflate
=
bb
;
bbInflate
.
inflate
(
10
);
pointField
pts
=
bbInflate
.
points
();
pointField
pts
(
bbInflate
.
points
()
)
;
forAll
(
pts
,
pI
)
{
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C
View file @
50a97a7d
...
...
@@ -263,8 +263,6 @@ Foam::triSurfaceScalarField Foam::automatic::load()
surfaceCellSize
.
write
();
debug
=
1
;
if
(
debug
)
{
faceList
faces
(
surface_
.
size
());
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
View file @
50a97a7d
...
...
@@ -212,9 +212,8 @@ void Foam::conformalVoronoiMesh::checkDuals()
typedef
CGAL
::
Exact_predicates_exact_constructions_kernel
EK2
;
typedef
CGAL
::
Regular_triangulation_euclidean_traits_3
<
EK2
>
EK
;
typedef
CGAL
::
Cartesian_converter
<
typename
baseK
::
Kernel
,
EK2
>
To_exact
;
typedef
CGAL
::
Cartesian_converter
<
EK2
,
typename
baseK
::
Kernel
>
Back_from_exact
;
typedef
CGAL
::
Cartesian_converter
<
baseK
::
Kernel
,
EK2
>
To_exact
;
typedef
CGAL
::
Cartesian_converter
<
EK2
,
baseK
::
Kernel
>
Back_from_exact
;
// PackedBoolList bPoints(number_of_finite_cells());
...
...
@@ -392,13 +391,13 @@ void Foam::conformalVoronoiMesh::checkDuals()
CGAL
::
Gmpq
z
(
CGAL
::
to_double
(
masterPoint
.
z
()));
std
::
cout
<<
"master = "
<<
x
<<
" "
<<
y
<<
" "
<<
z
<<
endl
;
<<
std
::
endl
;
CGAL
::
Gmpq
xs
(
CGAL
::
to_double
(
closestPoint
.
x
()));
CGAL
::
Gmpq
ys
(
CGAL
::
to_double
(
closestPoint
.
y
()));
CGAL
::
Gmpq
zs
(
CGAL
::
to_double
(
closestPoint
.
z
()));
std
::
cout
<<
"slave = "
<<
xs
<<
" "
<<
ys
<<
" "
<<
zs
<<
endl
;
<<
std
::
endl
;
}
}
else
...
...
applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexI.H
View file @
50a97a7d
...
...
@@ -142,7 +142,7 @@ inline int CGAL::indexedVertex<Gt, Vb>::index() const
template
<
class
Gt
,
class
Vb
>
inline
typename
CGAL
::
indexedVertex
<
Gt
,
Vb
>
::
vertexType
&
inline
Foam
::
indexedVertex
Enum
::
vertexType
&
CGAL
::
indexedVertex
<
Gt
,
Vb
>::
type
()
{
return
type_
;
...
...
@@ -150,7 +150,7 @@ CGAL::indexedVertex<Gt, Vb>::type()
template
<
class
Gt
,
class
Vb
>
inline
typename
CGAL
::
indexedVertex
<
Gt
,
Vb
>
::
vertexType
inline
Foam
::
indexedVertex
Enum
::
vertexType
CGAL
::
indexedVertex
<
Gt
,
Vb
>::
type
()
const
{
return
type_
;
...
...
src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.H
View file @
50a97a7d
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -36,7 +36,6 @@ SourceFiles
#define symmTensor_H
#include "SymmTensor.H"
#include "vector.H"
#include "contiguous.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/OpenFOAM/primitives/Tensor/Tensor.H
View file @
50a97a7d
...
...
@@ -103,6 +103,9 @@ public:
//- Construct given SymmTensor
inline
Tensor
(
const
SymmTensor
<
Cmpt
>&
);
//- Construct given triad
inline
Tensor
(
const
Vector
<
Vector
<
Cmpt
>
>&
);
//- Construct given the three vector components
inline
Tensor
(
...
...
@@ -165,6 +168,9 @@ public:
//- Assign to a SymmTensor
inline
void
operator
=
(
const
SymmTensor
<
Cmpt
>&
);
//- Assign to a triad
inline
void
operator
=
(
const
Vector
<
Vector
<
Cmpt
>
>&
);
};
...
...
src/OpenFOAM/primitives/Tensor/TensorI.H
View file @
50a97a7d
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -66,6 +66,24 @@ inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
}
//- Construct given triad
template
<
class
Cmpt
>
inline
Tensor
<
Cmpt
>::
Tensor
(
const
Vector
<
Vector
<
Cmpt
>
>&
tr
)
{
this
->
v_
[
XX
]
=
tr
.
x
().
x
();
this
->
v_
[
XY
]
=
tr
.
x
().
y
();
this
->
v_
[
XZ
]
=
tr
.
x
().
z
();
this
->
v_
[
YX
]
=
tr
.
y
().
x
();
this
->
v_
[
YY
]
=
tr
.
y
().
y
();
this
->
v_
[
YZ
]
=
tr
.
y
().
z
();
this
->
v_
[
ZX
]
=
tr
.
z
().
x
();
this
->
v_
[
ZY
]
=
tr
.
z
().
y
();
this
->
v_
[
ZZ
]
=
tr
.
z
().
z
();
}
//- Construct given the three vector components
template
<
class
Cmpt
>
inline
Tensor
<
Cmpt
>::
Tensor
...
...
@@ -272,6 +290,23 @@ inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
}
template
<
class
Cmpt
>
inline
void
Tensor
<
Cmpt
>::
operator
=
(
const
Vector
<
Vector
<
Cmpt
>
>&
tr
)
{
this
->
v_
[
XX
]
=
tr
.
x
().
x
();
this
->
v_
[
XY
]
=
tr
.
x
().
y
();
this
->
v_
[
XZ
]
=
tr
.
x
().
z
();
this
->
v_
[
YX
]
=
tr
.
y
().
x
();
this
->
v_
[
YY
]
=
tr
.
y
().
y
();
this
->
v_
[
YZ
]
=
tr
.
y
().
z
();
this
->
v_
[
ZX
]
=
tr
.
z
().
x
();
this
->
v_
[
ZY
]
=
tr
.
z
().
y
();
this
->
v_
[
ZZ
]
=
tr
.
z
().
z
();
}
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector)
...
...
src/OpenFOAM/primitives/triad/triad.C
View file @
50a97a7d
...
...
@@ -25,7 +25,6 @@ License
#include "triad.H"
#include "transform.H"
#include "tensor.H"
#include "quaternion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -63,6 +62,14 @@ Foam::triad::triad(const quaternion& q)
}
Foam
::
triad
::
triad
(
const
tensor
&
t
)
{
x
()
=
t
.
x
();
y
()
=
t
.
y
();
z
()
=
t
.
z
();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void
Foam
::
triad
::
orthogonalize
()
...
...
@@ -331,6 +338,16 @@ Foam::triad::operator quaternion() const
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void
Foam
::
triad
::
operator
=
(
const
tensor
&
t
)
{
x
()
=
t
.
x
();
y
()
=
t
.
y
();
z
()
=
t
.
z
();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
...
...
src/OpenFOAM/primitives/triad/triad.H
View file @
50a97a7d
...
...
@@ -40,6 +40,7 @@ SourceFiles
#define triad_H
#include "vector.H"
#include "tensor.H"
#include "contiguous.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -58,7 +59,6 @@ Ostream& operator<<(Ostream&, const triad&);
class
quaternion
;
/*---------------------------------------------------------------------------*\
Class triad Declaration
\*---------------------------------------------------------------------------*/
...
...
@@ -87,6 +87,9 @@ public:
//- Construct from a quaternion
triad
(
const
quaternion
&
q
);
//- Construct from a tensor
triad
(
const
tensor
&
t
);
//- Construct from Istream
inline
triad
(
Istream
&
);
...
...
@@ -135,6 +138,8 @@ public:
inline
void
operator
=
(
const
Vector
<
vector
>&
);
void
operator
=
(
const
tensor
&
t
);
//- Add the triad t2 to this triad
// without normalizing or orthogonalizing
void
operator
+=
(
const
triad
&
t2
);
...
...
src/dynamicMesh/polyMeshFilter/polyMeshFilter.C
View file @
50a97a7d
...
...
@@ -496,7 +496,6 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
faceFilterFactor_
.
resize
(
mesh_
.
nFaces
(),
initialFaceLengthFactor_
);
// Maintain the number of times a point has been part of a bad face
//
labelList
pointErrorCount
(
mesh_
.
nPoints
(),
0
);
// Main loop
...
...
src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C
View file @
50a97a7d
...
...
@@ -564,8 +564,6 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeaturePoints
List
<
pointIndexHit
>&
info
)
const
{
DynamicList
<
pointIndexHit
>
dynPointHit
;
// Pick up all the feature points that intersect the search sphere
labelList
elems
=
pointTree
().
findSphere
(
...
...
@@ -573,6 +571,8 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeaturePoints
searchRadiusSqr
);
DynamicList
<
pointIndexHit
>
dynPointHit
(
elems
.
size
());
forAll
(
elems
,
elemI
)
{
label
index
=
elems
[
elemI
];
...
...
@@ -609,7 +609,7 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeatureEdges
sliceStarts
[
3
]
=
openStart_
;
sliceStarts
[
4
]
=
multipleStart_
;
DynamicList
<
pointIndexHit
>
dynEdgeHit
;
DynamicList
<
pointIndexHit
>
dynEdgeHit
(
edgeTrees
.
size
()
*
3
)
;
// Loop over all the feature edge types
forAll
(
edgeTrees
,
i
)
...
...
src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
View file @
50a97a7d
...
...
@@ -348,7 +348,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::evaluate
label
patchi
=
patch
().
index
();
const
scalarField
&
pp
=
thermoPtr_
->
p
().
boundaryField
()[
patchi
];
const
scalarField
lWeights
=
weights
();
const
scalarField
lWeights
(
weights
()
)
;
scalarField
::
operator
=
(
...
...
@@ -416,8 +416,10 @@ patchNeighbourField() const
nbrThermoPtr_
->
T
().
internalField
(),
nbrFaceCells
);
scalarField
intNbrT
=
regionCoupledPatch_
.
regionCoupledPatch
().
interpolate
(
nbrIntT
);
scalarField
intNbrT
(
regionCoupledPatch_
.
regionCoupledPatch
().
interpolate
(
nbrIntT
)
);
label
patchi
=
patch
().
index
();
const
scalarField
&
pp
=
thermoPtr_
->
p
().
boundaryField
()[
patchi
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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