Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
mpim-sw
cdo
Commits
31967b85
Commit
31967b85
authored
3 months ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
libcdi update
parent
8a83b9ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!295
M214003/develop
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libcdi
+1
-1
1 addition, 1 deletion
libcdi
src/grid_icosphere.cc
+8
-1
8 additions, 1 deletion
src/grid_icosphere.cc
src/vector3d.h
+2
-2
2 additions, 2 deletions
src/vector3d.h
with
11 additions
and
4 deletions
libcdi
@
ffeab2c8
Compare
beac578c
...
ffeab2c8
Subproject commit
beac578c7a38640a274287482827b01e8bcf1d2d
Subproject commit
ffeab2c829d20c205f30a614eecd8847001a2843
This diff is collapsed.
Click to expand it.
src/grid_icosphere.cc
+
8
−
1
View file @
31967b85
...
...
@@ -10,7 +10,6 @@
#include
<iostream>
#include
<array>
#include
<vector>
#include
<map>
using
Index
=
uint64_t
;
using
Vertex
=
Vector3d
;
...
...
@@ -18,7 +17,15 @@ using Triangle = std::array<Index, 3>;
using
TriangleList
=
std
::
vector
<
Triangle
>
;
using
VertexList
=
std
::
vector
<
Vertex
>
;
// flat_map needs g++ version 15 or clang++ version 20
// #define USE_FLAT_MAP 1
#ifdef USE_FLAT_MAP
#include
<flat_map>
using
Lookup
=
std
::
vector
<
std
::
flat_map
<
Index
,
Index
>>
;
#else
#include
<map>
using
Lookup
=
std
::
vector
<
std
::
map
<
Index
,
Index
>>
;
#endif
// icosahedron from ICON
namespace
icosahedron
...
...
This diff is collapsed.
Click to expand it.
src/vector3d.h
+
2
−
2
View file @
31967b85
...
...
@@ -27,7 +27,7 @@ public:
Vector3d
()
noexcept
{}
Vector3d
(
const
double
&
x
,
const
double
&
y
,
const
double
&
z
)
noexcept
:
X
(
x
),
Y
(
y
),
Z
(
z
)
{}
explicit
Vector3d
(
const
double
coords
[
3
])
noexcept
:
X
(
coords
[
0
]),
Y
(
coords
[
1
]),
Z
(
coords
[
2
])
{}
explicit
Vector3d
(
const
double
(
&
coords
)
[
3
])
noexcept
:
X
(
coords
[
0
]),
Y
(
coords
[
1
]),
Z
(
coords
[
2
])
{}
double
operator
[](
size_t
index
)
const
noexcept
...
...
@@ -82,7 +82,7 @@ public:
// Calculate the dot/inner/scalar product
double
operator
*
(
const
Vector3d
&
other
)
const
operator
*
(
const
Vector3d
&
other
)
const
noexcept
{
return
(
X
*
other
.
X
)
+
(
Y
*
other
.
Y
)
+
(
Z
*
other
.
Z
);
}
...
...
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