Loading src/TNL/Containers/StaticArray.h +13 −13 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public: /** * \brief Constructor from static array. * * \param v[Size] input array. * \param v Input array. */ // Note: the template avoids ambiguity of overloaded functions with literal 0 and pointer // reference: https://stackoverflow.com/q/4610503 Loading src/TNL/Meshes/Mesh.h +5 −5 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forAll( Func f ) const; Loading @@ -213,7 +213,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forBoundary( Func f ) const; Loading @@ -224,7 +224,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forInterior( Func f ) const; Loading @@ -235,7 +235,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forLocal( Func f ) const; Loading @@ -246,7 +246,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forGhost( Func f ) const; Loading src/TNL/Meshes/MeshEntity.h +9 −0 Original line number Diff line number Diff line Loading @@ -62,11 +62,20 @@ class MeshEntity __cuda_callable__ bool operator!=( const MeshEntity& entity ) const; /** * \brief Returns the dimension of this mesh entity. */ static constexpr int getEntityDimension(); /** * \brief Returns a reference to the mesh that owns this mesh entity. */ __cuda_callable__ const MeshType& getMesh() const; /** * \brief Returns the index of this mesh entity. */ __cuda_callable__ GlobalIndexType getIndex() const; Loading Loading
src/TNL/Containers/StaticArray.h +13 −13 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public: /** * \brief Constructor from static array. * * \param v[Size] input array. * \param v Input array. */ // Note: the template avoids ambiguity of overloaded functions with literal 0 and pointer // reference: https://stackoverflow.com/q/4610503 Loading
src/TNL/Meshes/Mesh.h +5 −5 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forAll( Func f ) const; Loading @@ -213,7 +213,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forBoundary( Func f ) const; Loading @@ -224,7 +224,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forInterior( Func f ) const; Loading @@ -235,7 +235,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forLocal( Func f ) const; Loading @@ -246,7 +246,7 @@ class Mesh * The function \e f is executed as `f(i)`, where `GlobalIndexType i` is the global index of the * mesh entity to be processed. The mesh itself is not passed to the function `f`, it is the user's * responsibility to ensure proper access to the mesh if needed, e.g. by the means of lambda capture * and/or using a \ref SharedPointer. * and/or using a \ref TNL::Pointers::SharedPointer "SharedPointer". */ template< int EntityDimension, typename Device2 = DeviceType, typename Func > void forGhost( Func f ) const; Loading
src/TNL/Meshes/MeshEntity.h +9 −0 Original line number Diff line number Diff line Loading @@ -62,11 +62,20 @@ class MeshEntity __cuda_callable__ bool operator!=( const MeshEntity& entity ) const; /** * \brief Returns the dimension of this mesh entity. */ static constexpr int getEntityDimension(); /** * \brief Returns a reference to the mesh that owns this mesh entity. */ __cuda_callable__ const MeshType& getMesh() const; /** * \brief Returns the index of this mesh entity. */ __cuda_callable__ GlobalIndexType getIndex() const; Loading