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
ae8782fe
Commit
ae8782fe
authored
Feb 18, 2014
by
mattijs
Committed by
Andrew Heather
Feb 18, 2014
Browse files
BUG: snappyHexMesh: fixed points
parent
8f9a454b
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/mesh/autoMesh/Make/files
View file @
ae8782fe
...
...
@@ -30,7 +30,7 @@ meshMover = $(autoHexMesh)/externalDisplacementMeshMover
$(meshMover)/displacementMeshMoverMotionSolver.C
$(meshMover)/externalDisplacementMeshMover.C
$(meshMover)/medialAxisMeshMover.C
$(meshMover)/zeroFixedValue/zeroFixedValuePointPatchFields.C
LIB = $(FOAM_LIBBIN)/libautoMesh
src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
View file @
ae8782fe
...
...
@@ -50,6 +50,7 @@ Description
#include "PatchTools.H"
#include "slipPointPatchFields.H"
#include "fixedValuePointPatchFields.H"
#include "zeroFixedValuePointPatchFields.H"
#include "calculatedPointPatchFields.H"
#include "cyclicSlipPointPatchFields.H"
#include "fixedValueFvPatchFields.H"
...
...
@@ -826,7 +827,12 @@ Foam::autoLayerDriver::makeLayerDisplacementField
{
// 0 layers: do not allow slip so fixedValue 0
// >0 layers: fixedValue which gets adapted
if
(
numLayers
[
patchI
]
>=
0
)
if
(
numLayers
[
patchI
]
==
0
)
{
patchFieldTypes
[
patchI
]
=
zeroFixedValuePointPatchVectorField
::
typeName
;
}
else
if
(
numLayers
[
patchI
]
>
0
)
{
patchFieldTypes
[
patchI
]
=
fixedValuePointPatchVectorField
::
typeName
;
}
...
...
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
View file @
ae8782fe
...
...
@@ -33,6 +33,7 @@ License
#include "PatchTools.H"
#include "OBJstream.H"
#include "pointData.H"
#include "zeroFixedValuePointPatchFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -64,7 +65,15 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs
if
(
isA
<
valuePointPatchField
<
vector
>
>
(
patchFld
))
{
adaptPatchIDs
.
append
(
patchI
);
if
(
isA
<
zeroFixedValuePointPatchField
<
vector
>
>
(
patchFld
))
{
// Special condition of fixed boundary condition. Does not
// get adapted
}
else
{
adaptPatchIDs
.
append
(
patchI
);
}
}
}
return
adaptPatchIDs
;
...
...
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
View file @
ae8782fe
...
...
@@ -28,7 +28,10 @@ Description
Mesh motion solver that uses a medial axis algorithm to work
out a fraction between the (nearest point on a) moving surface
and the (nearest point on a) fixed surface.
This fraction is then used to scale the motion.
This fraction is then used to scale the motion. Use
- fixedValue on all moving patches
- zeroFixedValue on stationary patches
- slip on all slipping patches
SourceFiles
medialAxisMeshMover.C
...
...
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
0 → 100644
View file @
ae8782fe
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "zeroFixedValuePointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template
<
class
Type
>
zeroFixedValuePointPatchField
<
Type
>::
zeroFixedValuePointPatchField
(
const
pointPatch
&
p
,
const
DimensionedField
<
Type
,
pointMesh
>&
iF
)
:
fixedValuePointPatchField
<
Type
>
(
p
,
iF
)
{}
template
<
class
Type
>
zeroFixedValuePointPatchField
<
Type
>::
zeroFixedValuePointPatchField
(
const
pointPatch
&
p
,
const
DimensionedField
<
Type
,
pointMesh
>&
iF
,
const
dictionary
&
dict
)
:
fixedValuePointPatchField
<
Type
>
(
p
,
iF
,
dict
,
false
)
{
fixedValuePointPatchField
<
Type
>::
operator
=
(
pTraits
<
Type
>::
zero
);
}
template
<
class
Type
>
zeroFixedValuePointPatchField
<
Type
>::
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
ptf
,
const
pointPatch
&
p
,
const
DimensionedField
<
Type
,
pointMesh
>&
iF
,
const
pointPatchFieldMapper
&
mapper
)
:
fixedValuePointPatchField
<
Type
>
(
ptf
,
p
,
iF
,
mapper
)
{
// For safety re-evaluate
fixedValuePointPatchField
<
Type
>::
operator
=
(
pTraits
<
Type
>::
zero
);
}
template
<
class
Type
>
zeroFixedValuePointPatchField
<
Type
>::
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
ptf
)
:
fixedValuePointPatchField
<
Type
>
(
ptf
)
{}
template
<
class
Type
>
zeroFixedValuePointPatchField
<
Type
>::
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
ptf
,
const
DimensionedField
<
Type
,
pointMesh
>&
iF
)
:
fixedValuePointPatchField
<
Type
>
(
ptf
,
iF
)
{
// For safety re-evaluate
fixedValuePointPatchField
<
Type
>::
operator
=
(
pTraits
<
Type
>::
zero
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
0 → 100644
View file @
ae8782fe
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::zeroFixedValuePointPatchField
Description
Enables the specification of a zero fixed value boundary condition.
Example of the boundary condition specification:
\verbatim
inlet
{
type zeroFixedValue;
}
\endverbatim
SourceFiles
zeroFixedValuePointPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef zeroFixedValuePointPatchField_H
#define zeroFixedValuePointPatchField_H
#include "fixedValuePointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class zeroFixedValuePointPatchField Declaration
\*---------------------------------------------------------------------------*/
template
<
class
Type
>
class
zeroFixedValuePointPatchField
:
public
fixedValuePointPatchField
<
Type
>
{
public:
//- Runtime type information
TypeName
(
"zeroFixedValue"
);
// Constructors
//- Construct from patch and internal field
zeroFixedValuePointPatchField
(
const
pointPatch
&
,
const
DimensionedField
<
Type
,
pointMesh
>&
);
//- Construct from patch, internal field and dictionary
zeroFixedValuePointPatchField
(
const
pointPatch
&
,
const
DimensionedField
<
Type
,
pointMesh
>&
,
const
dictionary
&
);
//- Construct by mapping given patchField<Type> onto a new patch
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
,
const
pointPatch
&
,
const
DimensionedField
<
Type
,
pointMesh
>&
,
const
pointPatchFieldMapper
&
);
//- Construct as copy
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
);
//- Construct and return a clone
virtual
autoPtr
<
pointPatchField
<
Type
>
>
clone
()
const
{
return
autoPtr
<
pointPatchField
<
Type
>
>
(
new
zeroFixedValuePointPatchField
<
Type
>
(
*
this
)
);
}
//- Construct as copy setting internal field reference
zeroFixedValuePointPatchField
(
const
zeroFixedValuePointPatchField
<
Type
>&
,
const
DimensionedField
<
Type
,
pointMesh
>&
);
//- Construct and return a clone setting internal field reference
virtual
autoPtr
<
pointPatchField
<
Type
>
>
clone
(
const
DimensionedField
<
Type
,
pointMesh
>&
iF
)
const
{
return
autoPtr
<
pointPatchField
<
Type
>
>
(
new
zeroFixedValuePointPatchField
<
Type
>
(
*
this
,
iF
)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "zeroFixedValuePointPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C
0 → 100644
View file @
ae8782fe
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "zeroFixedValuePointPatchFields.H"
#include "pointPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makePointPatchFields
(
zeroFixedValue
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.H
0 → 100644
View file @
ae8782fe
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::zeroFixedValuePointPatchFields
Description
SourceFiles
zeroFixedValuePointPatchFields.C
\*---------------------------------------------------------------------------*/
#ifndef zeroFixedValuePointPatchFields_H
#define zeroFixedValuePointPatchFields_H
#include "zeroFixedValuePointPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchFieldTypedefs
(
zeroFixedValue
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C
View file @
ae8782fe
...
...
@@ -1972,7 +1972,7 @@ void Foam::meshRefinement::calculateEdgeWeights
const
edge
&
e
=
edges
[
edgeI
];
scalar
eMag
=
max
(
V
SMALL
,
SMALL
,
mag
(
pts
[
meshPoints
[
e
[
1
]]]
...
...
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