Skip to content
Snippets Groups Projects
Commit e43bafa5 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add NodeByCellData::operator=

performs a shallow copy
parent 898ea068
No related branches found
No related tags found
1 merge request!6Feature/crs
...@@ -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;
......
...@@ -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;
......
...@@ -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)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment