mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Fix conversion warnings when using double precision.
There were some conversion warnings issued when the default float was set to 64-bit. Fixed these (on clang).
This commit is contained in:
parent
bf03243516
commit
0d394db0ce
@ -279,7 +279,8 @@ void JacobianFor2DCell(const WorldCoordType &wCoords,
|
||||
vtkm::Matrix<JacobianType,2,2> &jacobian,
|
||||
vtkm::CellShapeTagQuad)
|
||||
{
|
||||
vtkm::Vec<JacobianType,2> pc(pcoords[0], pcoords[1]);
|
||||
vtkm::Vec<JacobianType,2> pc(static_cast<JacobianType>(pcoords[0]),
|
||||
static_cast<JacobianType>(pcoords[1]));
|
||||
vtkm::Vec<JacobianType,2> rc = vtkm::Vec<JacobianType,2>(1) - pc;
|
||||
|
||||
vtkm::Vec<JacobianType,2> wcoords2d;
|
||||
@ -434,7 +435,8 @@ ParametricDerivative(const FieldVecType &field,
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType,2> GradientType;
|
||||
|
||||
GradientType pc(pcoords[0], pcoords[1]);
|
||||
GradientType pc(static_cast<FieldType>(pcoords[0]),
|
||||
static_cast<FieldType>(pcoords[1]));
|
||||
GradientType rc = GradientType(1) - pc;
|
||||
|
||||
GradientType parametricDerivative(0);
|
||||
|
@ -113,7 +113,7 @@ struct TestDerivativeFunctor
|
||||
for (vtkm::IdComponent pointIndex = 0; pointIndex < numPoints; pointIndex++)
|
||||
{
|
||||
vtkm::Vec<vtkm::FloatDefault,3> wcoords = worldCoordinates[pointIndex];
|
||||
FieldType value = field.GetValue(wcoords);
|
||||
FieldType value = static_cast<FieldType>(field.GetValue(wcoords));
|
||||
fieldValues.Append(value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user