Loading src/TNL/Meshes/Mesh.h +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,11 @@ class Mesh template< typename Device_ > Mesh( const Mesh< MeshConfig, Device_ >& mesh ); Mesh& operator=( const Mesh& mesh ); template< typename Device_ > Mesh& operator=( const Mesh< MeshConfig, Device_ >& mesh ); static constexpr int getMeshDimension(); Loading src/TNL/Meshes/MeshDetails/Mesh_impl.h +23 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,29 @@ Mesh( const Mesh< MeshConfig, Device_ >& mesh ) MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); } template< typename MeshConfig, typename Device > Mesh< MeshConfig, Device >& Mesh< MeshConfig, Device >:: operator=( const Mesh& mesh ) { StorageBaseType::operator=( *( (const MeshStorageLayers< MeshConfig, Device >*) &mesh ) ); // update pointers from entities into the subentity and superentity storage networks MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); return *this; } template< typename MeshConfig, typename Device > template< typename Device_ > Mesh< MeshConfig, Device >& Mesh< MeshConfig, Device >:: operator=( const Mesh< MeshConfig, Device_ >& mesh ) { StorageBaseType::operator=( *( (const MeshStorageLayers< MeshConfig, Device_ >*) &mesh ) ); // update pointers from entities into the subentity and superentity storage networks MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); return *this; } template< typename MeshConfig, typename Device > constexpr int Mesh< MeshConfig, Device >:: Loading src/UnitTests/Meshes/MeshTest.h +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ void testCopyToCuda( const Mesh& mesh ) dmesh2 = mesh; EXPECT_EQ( dmesh2, mesh ); testCopyAssignment( dmesh1 ); // copy back to host Mesh mesh2( dmesh1 ); EXPECT_EQ( mesh2, mesh ); Loading Loading
src/TNL/Meshes/Mesh.h +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,11 @@ class Mesh template< typename Device_ > Mesh( const Mesh< MeshConfig, Device_ >& mesh ); Mesh& operator=( const Mesh& mesh ); template< typename Device_ > Mesh& operator=( const Mesh< MeshConfig, Device_ >& mesh ); static constexpr int getMeshDimension(); Loading
src/TNL/Meshes/MeshDetails/Mesh_impl.h +23 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,29 @@ Mesh( const Mesh< MeshConfig, Device_ >& mesh ) MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); } template< typename MeshConfig, typename Device > Mesh< MeshConfig, Device >& Mesh< MeshConfig, Device >:: operator=( const Mesh& mesh ) { StorageBaseType::operator=( *( (const MeshStorageLayers< MeshConfig, Device >*) &mesh ) ); // update pointers from entities into the subentity and superentity storage networks MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); return *this; } template< typename MeshConfig, typename Device > template< typename Device_ > Mesh< MeshConfig, Device >& Mesh< MeshConfig, Device >:: operator=( const Mesh< MeshConfig, Device_ >& mesh ) { StorageBaseType::operator=( *( (const MeshStorageLayers< MeshConfig, Device_ >*) &mesh ) ); // update pointers from entities into the subentity and superentity storage networks MeshEntityStorageRebinder< Mesh< MeshConfig, Device > >::exec( *this ); return *this; } template< typename MeshConfig, typename Device > constexpr int Mesh< MeshConfig, Device >:: Loading
src/UnitTests/Meshes/MeshTest.h +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ void testCopyToCuda( const Mesh& mesh ) dmesh2 = mesh; EXPECT_EQ( dmesh2, mesh ); testCopyAssignment( dmesh1 ); // copy back to host Mesh mesh2( dmesh1 ); EXPECT_EQ( mesh2, mesh ); Loading