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
0ca95ac0
Commit
0ca95ac0
authored
Feb 22, 2019
by
Mark Olesen
Committed by
Andrew Heather
Feb 22, 2019
Browse files
ENH: additional constructors and methods for meshedSurfRef
- construct null, clear() and reset() methods
parent
e3228944
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/surfMesh/meshedSurf/meshedSurfRef.H
View file @
0ca95ac0
...
...
@@ -50,24 +50,33 @@ class meshedSurfRef
{
std
::
reference_wrapper
<
const
pointField
>
points_
;
std
::
reference_wrapper
<
const
faceList
>
faces_
;
std
::
reference_wrapper
<
const
labelList
>
zoneI
ds_
;
std
::
reference_wrapper
<
const
labelList
>
i
ds_
;
public:
// Constructors
//- Construct null
meshedSurfRef
()
:
points_
(
std
::
cref
<
pointField
>
(
pointField
::
null
())),
faces_
(
std
::
cref
<
faceList
>
(
faceList
::
null
())),
ids_
(
std
::
cref
<
labelList
>
(
labelList
::
null
()))
{}
//- Construct from components
meshedSurfRef
(
const
pointField
&
pts
,
const
faceList
&
f
ace
s
,
const
faceList
&
f
c
s
,
const
labelList
&
ids
=
labelList
::
null
()
)
:
points_
(
std
::
cref
<
pointField
>
(
pts
)),
faces_
(
std
::
cref
<
faceList
>
(
f
ace
s
)),
zoneI
ds_
(
std
::
cref
<
labelList
>
(
ids
))
faces_
(
std
::
cref
<
faceList
>
(
f
c
s
)),
i
ds_
(
std
::
cref
<
labelList
>
(
ids
))
{}
...
...
@@ -92,11 +101,32 @@ public:
//- Per-face zone/region information.
virtual
const
labelList
&
zoneIds
()
const
{
return
zoneIds_
.
get
();
return
ids_
.
get
();
}
//- Remove all references by redirecting to null objects
void
clear
()
{
points_
=
std
::
cref
<
pointField
>
(
pointField
::
null
());
faces_
=
std
::
cref
<
faceList
>
(
faceList
::
null
());
ids_
=
std
::
cref
<
labelList
>
(
labelList
::
null
());
}
//- Reset components
void
reset
(
const
pointField
&
pts
,
const
faceList
&
fcs
,
const
labelList
&
ids
=
labelList
::
null
()
)
{
points_
=
std
::
cref
<
pointField
>
(
pts
);
faces_
=
std
::
cref
<
faceList
>
(
fcs
);
ids_
=
std
::
cref
<
labelList
>
(
ids
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
...
...
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