mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
CUDA fixes move device copy into .cxx file.
This commit is contained in:
parent
e9ed3dbb93
commit
767b6c0048
@ -15,6 +15,7 @@
|
||||
|
||||
#include <vtkm/ImplicitFunction.h>
|
||||
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/BoundsCompute.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/FieldRangeCompute.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/Initialize.h>
|
||||
#include <vtkm/cont/Timer.h>
|
||||
|
@ -30,6 +30,8 @@ set(flow_headers
|
||||
|
||||
set(flow_sources
|
||||
Messenger.cxx
|
||||
NewFilterParticleAdvectionSteadyState.cxx
|
||||
NewFilterParticleAdvectionUnsteadyState.cxx
|
||||
ParticleAdvection.cxx
|
||||
Pathline.cxx
|
||||
PathParticle.cxx
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <vtkm/Particle.h>
|
||||
#include <vtkm/cont/ErrorFilterExecution.h>
|
||||
#include <vtkm/filter/NewFilterField.h>
|
||||
#include <vtkm/filter/flow/FlowTypes.h>
|
||||
#include <vtkm/filter/flow/vtkm_filter_flow_export.h>
|
||||
|
||||
namespace vtkm
|
||||
|
48
vtkm/filter/flow/NewFilterParticleAdvectionSteadyState.cxx
Normal file
48
vtkm/filter/flow/NewFilterParticleAdvectionSteadyState.cxx
Normal file
@ -0,0 +1,48 @@
|
||||
//============================================================================
|
||||
// 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.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/filter/flow/NewFilterParticleAdvectionSteadyState.h>
|
||||
|
||||
#include <vtkm/filter/flow/DataSetIntegratorSteadyState.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace filter
|
||||
{
|
||||
namespace flow
|
||||
{
|
||||
|
||||
VTKM_CONT std::vector<vtkm::filter::flow::DataSetIntegratorSteadyState>
|
||||
NewFilterParticleAdvectionSteadyState::CreateDataSetIntegrators(
|
||||
const vtkm::cont::PartitionedDataSet& input,
|
||||
const vtkm::filter::flow::BoundsMap& boundsMap,
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const
|
||||
{
|
||||
using DSIType = vtkm::filter::flow::DataSetIntegratorSteadyState;
|
||||
|
||||
std::string activeField = this->GetActiveFieldName();
|
||||
|
||||
std::vector<DSIType> dsi;
|
||||
for (vtkm::Id i = 0; i < input.GetNumberOfPartitions(); i++)
|
||||
{
|
||||
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
|
||||
auto ds = input.GetPartition(i);
|
||||
if (!ds.HasPointField(activeField) && !ds.HasCellField(activeField))
|
||||
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
|
||||
|
||||
dsi.emplace_back(ds, blockId, activeField, this->SolverType, this->VecFieldType, resultType);
|
||||
}
|
||||
|
||||
return dsi;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace vtkm::filter::flow
|
@ -11,7 +11,8 @@
|
||||
#ifndef vtk_m_filter_flow_NewFilterParticleAdvectionSteadyState_h
|
||||
#define vtk_m_filter_flow_NewFilterParticleAdvectionSteadyState_h
|
||||
|
||||
#include <vtkm/filter/flow/DataSetIntegratorSteadyState.h>
|
||||
#include <vtkm/filter/flow/BoundsMap.h>
|
||||
#include <vtkm/filter/flow/FlowTypes.h>
|
||||
#include <vtkm/filter/flow/NewFilterParticleAdvection.h>
|
||||
#include <vtkm/filter/flow/vtkm_filter_flow_export.h>
|
||||
|
||||
@ -22,6 +23,9 @@ namespace filter
|
||||
namespace flow
|
||||
{
|
||||
|
||||
// Forward declaration
|
||||
class DataSetIntegratorSteadyState;
|
||||
|
||||
class VTKM_FILTER_FLOW_EXPORT NewFilterParticleAdvectionSteadyState
|
||||
: public NewFilterParticleAdvection
|
||||
{
|
||||
@ -30,25 +34,7 @@ protected:
|
||||
VTKM_CONT std::vector<vtkm::filter::flow::DataSetIntegratorSteadyState> CreateDataSetIntegrators(
|
||||
const vtkm::cont::PartitionedDataSet& input,
|
||||
const vtkm::filter::flow::BoundsMap& boundsMap,
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const
|
||||
{
|
||||
using DSIType = vtkm::filter::flow::DataSetIntegratorSteadyState;
|
||||
|
||||
std::string activeField = this->GetActiveFieldName();
|
||||
|
||||
std::vector<DSIType> dsi;
|
||||
for (vtkm::Id i = 0; i < input.GetNumberOfPartitions(); i++)
|
||||
{
|
||||
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
|
||||
auto ds = input.GetPartition(i);
|
||||
if (!ds.HasPointField(activeField) && !ds.HasCellField(activeField))
|
||||
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
|
||||
|
||||
dsi.emplace_back(ds, blockId, activeField, this->SolverType, this->VecFieldType, resultType);
|
||||
}
|
||||
|
||||
return dsi;
|
||||
}
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
58
vtkm/filter/flow/NewFilterParticleAdvectionUnsteadyState.cxx
Normal file
58
vtkm/filter/flow/NewFilterParticleAdvectionUnsteadyState.cxx
Normal file
@ -0,0 +1,58 @@
|
||||
//============================================================================
|
||||
// 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.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/filter/flow/NewFilterParticleAdvectionUnsteadyState.h>
|
||||
|
||||
#include <vtkm/filter/flow/DataSetIntegratorUnsteadyState.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace filter
|
||||
{
|
||||
namespace flow
|
||||
{
|
||||
|
||||
VTKM_CONT std::vector<vtkm::filter::flow::DataSetIntegratorUnsteadyState>
|
||||
NewFilterParticleAdvectionUnsteadyState::CreateDataSetIntegrators(
|
||||
const vtkm::cont::PartitionedDataSet& input,
|
||||
const vtkm::filter::flow::BoundsMap& boundsMap,
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const
|
||||
{
|
||||
using DSIType = vtkm::filter::flow::DataSetIntegratorUnsteadyState;
|
||||
|
||||
std::string activeField = this->GetActiveFieldName();
|
||||
|
||||
std::vector<DSIType> dsi;
|
||||
for (vtkm::Id i = 0; i < input.GetNumberOfPartitions(); i++)
|
||||
{
|
||||
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
|
||||
auto ds1 = input.GetPartition(i);
|
||||
auto ds2 = this->Input2.GetPartition(i);
|
||||
if ((!ds1.HasPointField(activeField) && !ds1.HasCellField(activeField)) ||
|
||||
(!ds2.HasPointField(activeField) && !ds2.HasCellField(activeField)))
|
||||
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
|
||||
|
||||
dsi.emplace_back(ds1,
|
||||
ds2,
|
||||
this->Time1,
|
||||
this->Time2,
|
||||
blockId,
|
||||
activeField,
|
||||
this->SolverType,
|
||||
this->VecFieldType,
|
||||
resultType);
|
||||
}
|
||||
|
||||
return dsi;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace vtkm::filter::flow
|
@ -11,7 +11,7 @@
|
||||
#ifndef vtk_m_filter_flow_NewFilterParticleAdvectionUnsteadyState_h
|
||||
#define vtk_m_filter_flow_NewFilterParticleAdvectionUnsteadyState_h
|
||||
|
||||
#include <vtkm/filter/flow/DataSetIntegratorUnsteadyState.h>
|
||||
#include <vtkm/filter/flow/BoundsMap.h>
|
||||
#include <vtkm/filter/flow/NewFilterParticleAdvection.h>
|
||||
#include <vtkm/filter/flow/vtkm_filter_flow_export.h>
|
||||
|
||||
@ -22,6 +22,9 @@ namespace filter
|
||||
namespace flow
|
||||
{
|
||||
|
||||
// Forward declaration
|
||||
class DataSetIntegratorUnsteadyState;
|
||||
|
||||
class VTKM_FILTER_FLOW_EXPORT NewFilterParticleAdvectionUnsteadyState
|
||||
: public NewFilterParticleAdvection
|
||||
{
|
||||
@ -45,35 +48,7 @@ protected:
|
||||
VTKM_CONT std::vector<vtkm::filter::flow::DataSetIntegratorUnsteadyState>
|
||||
CreateDataSetIntegrators(const vtkm::cont::PartitionedDataSet& input,
|
||||
const vtkm::filter::flow::BoundsMap& boundsMap,
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const
|
||||
{
|
||||
using DSIType = vtkm::filter::flow::DataSetIntegratorUnsteadyState;
|
||||
|
||||
std::string activeField = this->GetActiveFieldName();
|
||||
|
||||
std::vector<DSIType> dsi;
|
||||
for (vtkm::Id i = 0; i < input.GetNumberOfPartitions(); i++)
|
||||
{
|
||||
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
|
||||
auto ds1 = input.GetPartition(i);
|
||||
auto ds2 = this->Input2.GetPartition(i);
|
||||
if ((!ds1.HasPointField(activeField) && !ds1.HasCellField(activeField)) ||
|
||||
(!ds2.HasPointField(activeField) && !ds2.HasCellField(activeField)))
|
||||
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
|
||||
|
||||
dsi.emplace_back(ds1,
|
||||
ds2,
|
||||
this->Time1,
|
||||
this->Time2,
|
||||
blockId,
|
||||
activeField,
|
||||
this->SolverType,
|
||||
this->VecFieldType,
|
||||
resultType);
|
||||
}
|
||||
|
||||
return dsi;
|
||||
}
|
||||
const vtkm::filter::flow::FlowResultType& resultType) const;
|
||||
|
||||
vtkm::cont::PartitionedDataSet Input2;
|
||||
vtkm::FloatDefault Time1 = -1;
|
||||
|
@ -9,11 +9,11 @@
|
||||
##============================================================================
|
||||
|
||||
set(unit_tests
|
||||
UnitTestStreamlineFilter.cxx
|
||||
UnitTestWorkletParticleAdvection.cxx
|
||||
UnitTestWorkletTemporalAdvection.cxx
|
||||
UnitTestStreamSurfaceFilter.cxx
|
||||
UnitTestStreamSurfaceWorklet.cxx
|
||||
UnitTestStreamlineFilter.cxx
|
||||
UnitTestWorkletParticleAdvection.cxx
|
||||
UnitTestWorkletTemporalAdvection.cxx
|
||||
UnitTestStreamSurfaceFilter.cxx
|
||||
UnitTestStreamSurfaceWorklet.cxx
|
||||
)
|
||||
|
||||
set(libraries
|
||||
|
@ -8,6 +8,7 @@
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/CellClassification.h>
|
||||
#include <vtkm/cont/DataSetBuilderUniform.h>
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
#include <vtkm/filter/flow/ParticleAdvection.h>
|
||||
|
@ -8,6 +8,7 @@
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/CellClassification.h>
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
#include <vtkm/filter/flow/ParticleAdvection.h>
|
||||
#include <vtkm/filter/flow/Pathline.h>
|
||||
|
Loading…
Reference in New Issue
Block a user