Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
306e43fa
Commit
306e43fa
authored
12 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: shellSurfaces: allow wildcards
parent
26fee7bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C
+25
-61
25 additions, 61 deletions
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
+1
-18
1 addition, 18 deletions
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
with
26 additions
and
79 deletions
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C
+
25
−
61
View file @
306e43fa
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -360,84 +360,48 @@ void Foam::shellSurfaces::findHigherLevel
...
@@ -360,84 +360,48 @@ void Foam::shellSurfaces::findHigherLevel
Foam
::
shellSurfaces
::
shellSurfaces
Foam
::
shellSurfaces
::
shellSurfaces
(
(
const
searchableSurfaces
&
allGeometry
,
const
searchableSurfaces
&
allGeometry
,
const
PtrList
<
dictionary
>
&
shellDict
s
const
dictionary
&
shell
s
Dict
)
)
:
:
allGeometry_
(
allGeometry
)
allGeometry_
(
allGeometry
)
{
{
shells_
.
setSize
(
shellDicts
.
size
());
// Wilcard specification : loop over all surfaces and try to find a match.
modes_
.
setSize
(
shellDicts
.
size
());
distances_
.
setSize
(
shellDicts
.
size
());
levels_
.
setSize
(
shellDicts
.
size
());
forAll
(
shellDicts
,
shellI
)
// Count number of shells.
label
shellI
=
0
;
forAll
(
allGeometry
.
names
(),
geomI
)
{
{
const
dictionary
&
dict
=
shellDicts
[
shellI
];
const
word
&
geomName
=
allGeometry_
.
names
()[
geomI
];
const
word
name
=
dict
.
lookup
(
"name"
);
const
word
type
=
dict
.
lookup
(
"type"
);
shells_
[
shellI
]
=
allGeometry_
.
findSurfaceID
(
name
);
if
(
shellsDict
.
found
(
geomName
))
if
(
shells_
[
shellI
]
==
-
1
)
{
{
FatalErrorIn
shellI
++
;
(
"shellSurfaces::shellSurfaces"
"(const searchableSurfaces&, const PtrList<dictionary>&)"
)
<<
"No surface called "
<<
name
<<
endl
<<
"Valid surfaces are "
<<
allGeometry_
.
names
()
<<
exit
(
FatalError
);
}
}
modes_
[
shellI
]
=
refineModeNames_
.
read
(
dict
.
lookup
(
"refineMode"
));
// Read pairs of distance+level
setAndCheckLevels
(
shellI
,
dict
.
lookup
(
"levels"
));
}
}
// Orient shell surfaces before any searching is done. Note that this
// only needs to be done for inside or outside. Orienting surfaces
// constructs lots of addressing which we want to avoid.
orient
();
}
// Size lists
shells_
.
setSize
(
shellI
);
modes_
.
setSize
(
shellI
);
distances_
.
setSize
(
shellI
);
levels_
.
setSize
(
shellI
);
Foam
::
shellSurfaces
::
shellSurfaces
shellI
=
0
;
(
forAll
(
allGeometry
.
names
(),
geomI
)
const
searchableSurfaces
&
allGeometry
,
const
dictionary
&
shellsDict
)
:
allGeometry_
(
allGeometry
)
{
shells_
.
setSize
(
shellsDict
.
size
());
modes_
.
setSize
(
shellsDict
.
size
());
distances_
.
setSize
(
shellsDict
.
size
());
levels_
.
setSize
(
shellsDict
.
size
());
label
shellI
=
0
;
forAllConstIter
(
dictionary
,
shellsDict
,
iter
)
{
{
shells_
[
shellI
]
=
allGeometry_
.
findSurfaceID
(
iter
().
keyword
())
;
const
word
&
geomName
=
allGeometry_
.
names
()[
geomI
]
;
if
(
shells
_
[
shellI
]
==
-
1
)
if
(
shells
Dict
.
found
(
geomName
)
)
{
{
FatalErrorIn
shells_
[
shellI
]
=
geomI
;
(
const
dictionary
&
dict
=
shellsDict
.
subDict
(
geomName
);
"shellSurfaces::shellSurfaces"
modes_
[
shellI
]
=
refineModeNames_
.
read
(
dict
.
lookup
(
"mode"
));
"(const searchableSurfaces&, const dictionary>&"
)
<<
"No surface called "
<<
iter
().
keyword
()
<<
endl
<<
"Valid surfaces are "
<<
allGeometry_
.
names
()
<<
exit
(
FatalError
);
}
const
dictionary
&
dict
=
shellsDict
.
subDict
(
iter
().
keyword
());
modes_
[
shellI
]
=
refineModeNames_
.
read
(
dict
.
lookup
(
"mode"
));
// Read pairs of distance+level
// Read pairs of distance+level
setAndCheckLevels
(
shellI
,
dict
.
lookup
(
"levels"
));
setAndCheckLevels
(
shellI
,
dict
.
lookup
(
"levels"
));
shellI
++
;
shellI
++
;
}
}
}
// Orient shell surfaces before any searching is done. Note that this
// Orient shell surfaces before any searching is done. Note that this
...
...
This diff is collapsed.
Click to expand it.
src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
+
1
−
18
View file @
306e43fa
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -113,23 +113,6 @@ public:
...
@@ -113,23 +113,6 @@ public:
// Constructors
// Constructors
//- Construct from components
shellSurfaces
(
const
searchableSurfaces
&
allGeometry
,
const
labelList
&
shells
,
const
List
<
refineMode
>&
modes
,
const
List
<
scalarField
>&
distances
,
const
labelListList
&
levels
);
//- Construct from geometry and dictionaries
shellSurfaces
(
const
searchableSurfaces
&
allGeometry
,
const
PtrList
<
dictionary
>&
shellDicts
);
//- Construct from geometry and dictionary
//- Construct from geometry and dictionary
shellSurfaces
shellSurfaces
(
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment