Skip to content
Snippets Groups Projects
Commit 73ae99f7 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Used VectorView for binding instead of Vector in mesh BoundaryTags layer

parent 369b3838
No related branches found
No related tags found
1 merge request!31Code revision
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <TNL/File.h> #include <TNL/File.h>
#include <TNL/Meshes/MeshDetails/traits/MeshTraits.h> #include <TNL/Meshes/MeshDetails/traits/MeshTraits.h>
#include <TNL/Containers/Vector.h> #include <TNL/Containers/VectorView.h>
#include "Traits.h" #include "Traits.h"
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
void updateBoundaryIndices( DimensionTag ) void updateBoundaryIndices( DimensionTag )
{ {
// Array does not have sum(), Vector of bools does not fit due to arithmetics // Array does not have sum(), Vector of bools does not fit due to arithmetics
Containers::Vector< typename BoundaryTagsArray::ValueType, typename BoundaryTagsArray::DeviceType, typename BoundaryTagsArray::IndexType > _boundaryTagsVector; Containers::VectorView< typename BoundaryTagsArray::ValueType, typename BoundaryTagsArray::DeviceType, typename BoundaryTagsArray::IndexType > _boundaryTagsVector;
_boundaryTagsVector.bind( boundaryTags.getData(), boundaryTags.getSize() ); _boundaryTagsVector.bind( boundaryTags.getData(), boundaryTags.getSize() );
const GlobalIndexType boundaryEntities = _boundaryTagsVector.template sum< GlobalIndexType >(); const GlobalIndexType boundaryEntities = _boundaryTagsVector.template sum< GlobalIndexType >();
boundaryIndices.setSize( boundaryEntities ); boundaryIndices.setSize( boundaryEntities );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment