Sacado View factory interaction with Kokkos subviews
Created by: rppawlo
Need some changes to sacado view factory to support kokkos subviews of fad types. This is blocking #274 (closed). Email describing issue is below.
@kyungjoo-kim @etphipp @trilinos/panzer @trilinos/sacado
Okay. I looked at this problem and found an issue in createDynRankView in View Factory.
When we use subview of a view, it returns strided layout and this layout is inherited to view factory. This is wrong. It has to be either left/right layout. Eric P knows this and he will fix the problem and add unit tests for that. I think we should call it a day for now. Without that FAC machinery, I cannot make the code correct.
Best, Kyungjoo
[ 22%] Building CXX object packages/panzer/disc-fe/src/CMakeFiles/panzer-disc-fe.dir/Panzer_IntegrationValues2.cpp.o
In file included from /ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Cell/Intrepid2_CellTools.hpp:1580:0,
from /ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Discretization/Integration/Intrepid2_CubatureControlVolume.hpp:56,
from /ascldap/users/rppawlo/Trilinos/packages/panzer/disc-fe/src/Panzer_IntegrationRule.hpp:54,
from /ascldap/users/rppawlo/Trilinos/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.hpp:50,
from /ascldap/users/rppawlo/Trilinos/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp:43:
/ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Cell/Intrepid2_CellToolsDefPhysToRef.hpp: In instantiation of ‘static void Intrepid2::CellTools<ExecSpaceType>::mapToReferenceFrameInitGuess(Kokkos::Experimental::DynRankView<DT, DP ...>, Kokkos::Experimental::DynRankView<cubWeightValueType, cubWeightProperties ...>, Kokkos::Experimental::DynRankView<inArray2ValueType, inArray2Properties ...>, Kokkos::Experimental::DynRankView<worksetCellValueType, worksetCellProperties ...>, HGradBasisPtrType) [with refPointValueType = Sacado::Fad::DFad<double>; refPointProperties = {Kokkos::OpenMP}; initGuessValueType = double; initGuessProperties = {Kokkos::OpenMP}; physPointValueType = Sacado::Fad::DFad<double>; physPointProperties = {Kokkos::OpenMP}; worksetCellValueType = Sacado::Fad::DFad<double>; worksetCellProperties = {Kokkos::OpenMP}; HGradBasisPtrType = Teuchos::RCP<Intrepid2::Basis<Kokkos::OpenMP, Sacado::Fad::DFad<double>, double> >; ExecSpaceType = Kokkos::OpenMP]’:
/ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Cell/Intrepid2_CellTools.hpp:1212:35: required from ‘static void Intrepid2::CellTools<ExecSpaceType>::mapToReferenceFrameInitGuess(Kokkos::Experimental::DynRankView<DT, DP ...>, Kokkos::Experimental::DynRankView<cubWeightValueType, cubWeightProperties ...>, Kokkos::Experimental::DynRankView<inArray2ValueType, inArray2Properties ...>, Kokkos::Experimental::DynRankView<worksetCellValueType, worksetCellProperties ...>, shards::CellTopology) [with refPointValueType = Sacado::Fad::DFad<double>; refPointProperties = {Kokkos::OpenMP}; initGuessValueType = double; initGuessProperties = {Kokkos::OpenMP}; physPointValueType = Sacado::Fad::DFad<double>; physPointProperties = {Kokkos::OpenMP}; worksetCellValueType = Sacado::Fad::DFad<double>; worksetCellProperties = {Kokkos::OpenMP}; ExecSpaceType = Kokkos::OpenMP]’
/ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Cell/Intrepid2_CellToolsDefPhysToRef.hpp:96:33: required from ‘static void Intrepid2::CellTools<ExecSpaceType>::mapToReferenceFrame(Kokkos::Experimental::DynRankView<DT, DP ...>, Kokkos::Experimental::DynRankView<cubWeightValueType, cubWeightProperties ...>, Kokkos::Experimental::DynRankView<inArray2ValueType, inArray2Properties ...>, shards::CellTopology) [with refPointValueType = Sacado::Fad::DFad<double>; refPointProperties = {Kokkos::OpenMP}; physPointValueType = Sacado::Fad::DFad<double>; physPointProperties = {Kokkos::OpenMP}; worksetCellValueType = Sacado::Fad::DFad<double>; worksetCellProperties = {Kokkos::OpenMP}; ExecSpaceType = Kokkos::OpenMP]’
/ascldap/users/rppawlo/Trilinos/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp:578:5: required from ‘void panzer::IntegrationValues2<Scalar>::evaluateValuesCV(const PHX::MDField<Scalar, panzer::Cell, panzer::NODE, panzer::Dim>&) [with Scalar = Sacado::Fad::DFad<double>]’
/ascldap/users/rppawlo/Trilinos/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp:598:1: required from here
/ascldap/users/rppawlo/Trilinos/packages/intrepid2/refactor/src/Cell/Intrepid2_CellToolsDefPhysToRef.hpp:182:25:error: cannot convert ‘std::enable_if<true, Sacado::Fad::ViewFad<double, 0u, 1u, Sacado::Fad::DFad<double> > >::type {aka Sacado::Fad::ViewFad<double, 0u, 1u, Sacado::Fad::DFad<double> >}’ to ‘double’ in assignment
xOld(i,j,k) = refPoints(i,j,k);
^