Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
e43bafa5
Commit
e43bafa5
authored
Jul 18, 2018
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add NodeByCellData::operator=
performs a shallow copy
parent
898ea068
No related branches found
No related tags found
1 merge request
!6
Feature/crs
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.cpp
+0
-1
0 additions, 1 deletion
src/main.cpp
src/mesh/MeshData.hpp
+2
-6
2 additions, 6 deletions
src/mesh/MeshData.hpp
src/scheme/NodeByCellData.hpp
+2
-0
2 additions, 0 deletions
src/scheme/NodeByCellData.hpp
with
4 additions
and
7 deletions
src/main.cpp
+
0
−
1
View file @
e43bafa5
...
@@ -197,7 +197,6 @@ int main(int argc, char *argv[])
...
@@ -197,7 +197,6 @@ int main(int argc, char *argv[])
typedef
TinyVector
<
MeshType
::
dimension
>
Rd
;
typedef
TinyVector
<
MeshType
::
dimension
>
Rd
;
const
Kokkos
::
View
<
const
double
*>
Vj
=
mesh_data
.
Vj
();
const
Kokkos
::
View
<
const
double
*>
Vj
=
mesh_data
.
Vj
();
const
NodeByCellData
<
Rd
>
Cjr
=
mesh_data
.
Cjr
();
const
double
tmax
=
0.2
;
const
double
tmax
=
0.2
;
double
t
=
0
;
double
t
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/mesh/MeshData.hpp
+
2
−
6
View file @
e43bafa5
...
@@ -214,12 +214,8 @@ public:
...
@@ -214,12 +214,8 @@ public:
m_Cjr
(
j
,
0
)
=-
1
;
m_Cjr
(
j
,
0
)
=-
1
;
m_Cjr
(
j
,
1
)
=
1
;
m_Cjr
(
j
,
1
)
=
1
;
});
});
// in 1d njr=Cjr
// in 1d njr=Cjr (here performs a shallow copy)
#warning set equality between njr and Cjr
m_njr
=
m_Cjr
;
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
m_njr
(
j
,
0
)
=-
1
;
m_njr
(
j
,
1
)
=
1
;
});
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
m_ljr
(
j
,
0
)
=
1
;
m_ljr
(
j
,
0
)
=
1
;
m_ljr
(
j
,
1
)
=
1
;
m_ljr
(
j
,
1
)
=
1
;
...
...
This diff is collapsed.
Click to expand it.
src/scheme/NodeByCellData.hpp
+
2
−
0
View file @
e43bafa5
...
@@ -96,6 +96,8 @@ class NodeByCellData
...
@@ -96,6 +96,8 @@ class NodeByCellData
}
}
};
};
NodeByCellData
&
operator
=
(
const
NodeByCellData
&
)
=
default
;
KOKKOS_INLINE_FUNCTION
KOKKOS_INLINE_FUNCTION
DataType
&
operator
()(
const
size_t
&
j
,
const
size_t
&
r
)
DataType
&
operator
()(
const
size_t
&
j
,
const
size_t
&
r
)
{
{
...
...
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