adding wrapper for exec connectivity.
This commit is contained in:
parent
8a382f138a
commit
9ff5832909
@ -7,10 +7,25 @@
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
|
||||
class CellSetExplicit
|
||||
class CellSetExplicit : public CellSet
|
||||
{
|
||||
public:
|
||||
ExplicitConnectivity nodesOfCellsConnectivity;
|
||||
public:
|
||||
//CellSetExplicit() : CellSet("", 0)
|
||||
//{
|
||||
//}
|
||||
|
||||
CellSetExplicit(const std::string &n, int d)
|
||||
: CellSet(n,d)
|
||||
{
|
||||
}
|
||||
|
||||
virtual int GetNumCells()
|
||||
{
|
||||
return nodesOfCellsConnectivity.GetNumberOfElements();
|
||||
}
|
||||
|
||||
public:
|
||||
ExplicitConnectivity nodesOfCellsConnectivity;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
|
||||
class CellSetStructured
|
||||
class CellSetStructured// : public CellSet
|
||||
{
|
||||
public:
|
||||
RegularConnectivity structure;
|
||||
|
@ -1,7 +1,27 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//
|
||||
// Copyright 2015 Sandia Corporation.
|
||||
// Copyright 2015 UT-Battelle, LLC.
|
||||
// Copyright 2015 Los Alamos National Security.
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ExplicitConnectivity_h
|
||||
#define vtk_m_cont_ExplicitConnectivity_h
|
||||
|
||||
#include <vtkm/CellType.h>
|
||||
#include <vtkm/exec/ExplicitConnectivity.h>
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
#include <vtkm/cont/DynamicArrayHandle.h>
|
||||
@ -12,6 +32,9 @@ namespace cont {
|
||||
|
||||
class ExplicitConnectivity
|
||||
{
|
||||
public:
|
||||
typedef vtkm::exec::ExplicitConnectivity ExecObjectType;
|
||||
|
||||
public:
|
||||
ExplicitConnectivity() {}
|
||||
|
||||
@ -41,6 +64,15 @@ public:
|
||||
///\todo: how do I modify an array handle?
|
||||
}
|
||||
|
||||
ExecObjectType GetExecObject()
|
||||
{
|
||||
vtkm::exec::ExplicitConnectivity obj;
|
||||
//obj.Shapes = Shapes.GetPortal(); ///???
|
||||
/// ...
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic> Shapes;
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic> NumIndices;
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic> Connectivity;
|
||||
|
35
vtkm/cont/TopologyType.h
Normal file
35
vtkm/cont/TopologyType.h
Normal file
@ -0,0 +1,35 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//
|
||||
// Copyright 2015 Sandia Corporation.
|
||||
// Copyright 2015 UT-Battelle, LLC.
|
||||
// Copyright 2015 Los Alamos National Security.
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_TopologyType_h
|
||||
#define vtk_m_cont_TopologyType_h
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
|
||||
enum TopologyType
|
||||
{
|
||||
NODE,
|
||||
CELL,
|
||||
EDGE,
|
||||
FACE
|
||||
};
|
||||
|
||||
} // namespace cont
|
||||
} // namespace vtkm
|
@ -143,7 +143,7 @@ void TestDataSet_Explicit()
|
||||
map_cell_to_iondex.push_back(0);
|
||||
map_cell_to_iondex.push_back(3);
|
||||
|
||||
vtkm::cont::CellSetExplicit *cs = new vtkm::cont::CellSetExplicit;
|
||||
vtkm::cont::CellSetExplicit *cs = new vtkm::cont::CellSetExplicit("cells",2);
|
||||
|
||||
tmp2 = vtkm::cont::make_ArrayHandle(shapes);
|
||||
vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG>::Copy(tmp2, cs->nodesOfCellsConnectivity.Shapes);
|
||||
|
33
vtkm/exec/ExplicitConnectivity.h
Normal file
33
vtkm/exec/ExplicitConnectivity.h
Normal file
@ -0,0 +1,33 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//
|
||||
// Copyright 2015 Sandia Corporation.
|
||||
// Copyright 2015 UT-Battelle, LLC.
|
||||
// Copyright 2015 Los Alamos National Security.
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_exec_ExplicitConnectivity_h
|
||||
#define vtk_m_exec_ExplicitConnectivity_h
|
||||
|
||||
namespace vtkm {
|
||||
namespace exec {
|
||||
|
||||
class ExplicitConnectivity
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace exec
|
||||
} // namespace vtkm
|
||||
|
||||
#endif // vtk_m_exec_ExplicitConnectivity_h
|
Loading…
Reference in New Issue
Block a user