Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
0728c7e8
Commit
0728c7e8
authored
6 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
ENH: zero::null::dummy, when dereferencing and dummy assignment are needed
parent
c57a1af6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/OpenFOAM/global/global.Cver
+2
-1
2 additions, 1 deletion
src/OpenFOAM/global/global.Cver
src/OpenFOAM/primitives/zero/zero.C
+33
-0
33 additions, 0 deletions
src/OpenFOAM/primitives/zero/zero.C
src/OpenFOAM/primitives/zero/zero.H
+4
-0
4 additions, 0 deletions
src/OpenFOAM/primitives/zero/zero.H
with
39 additions
and
1 deletion
src/OpenFOAM/global/global.Cver
+
2
−
1
View file @
0728c7e8
...
@@ -88,9 +88,10 @@ const std::string Foam::foamVersion::version
...
@@ -88,9 +88,10 @@ const std::string Foam::foamVersion::version
#include "new.C"
#include "new.C"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//
Create t
he nullObject singleton
//
T
he nullObject singleton
and a dummy zero singleton
#include "nullObject.C"
#include "nullObject.C"
#include "zero.C"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global IO streams
// Global IO streams
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/zero/zero.C
0 → 100644
+
33
−
0
View file @
0728c7e8
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ 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
"zero.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
Foam
::
zero
::
null
Foam
::
zero
::
null
::
dummy
;
// ************************************************************************* //
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/zero/zero.H
+
4
−
0
View file @
0728c7e8
...
@@ -29,6 +29,7 @@ Description
...
@@ -29,6 +29,7 @@ Description
manipulating objects that are known to be 'zero' at compile-time.
manipulating objects that are known to be 'zero' at compile-time.
SourceFiles
SourceFiles
zero.C
zeroI.H
zeroI.H
\*---------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
...
@@ -105,6 +106,9 @@ class zero::null
...
@@ -105,6 +106,9 @@ class zero::null
public:
public:
typedef
null
value_type
;
typedef
null
value_type
;
//- A static zero::null for dereferencing as a dummy element
static
null
dummy
;
//- Null constructible
//- Null constructible
constexpr
null
()
noexcept
{}
constexpr
null
()
noexcept
{}
...
...
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