Skip to content

Commit

Permalink
Panzer: Higher order mesh support :: Update projection test to use no…
Browse files Browse the repository at this point in the history
…des, not vertices.
  • Loading branch information
reuterb committed Aug 11, 2023
1 parent 76d0ce1 commit 22be6dc
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions packages/panzer/adapters-stk/test/projection/project_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ evaluateFields(
typedef Intrepid2::Experimental::ProjectionTools<PHX::Device> pts;

// FYI, this all relies on a first-order mesh
auto cellNodesAll = workset.getCellVertices(); // TODO BWR UPDATE WHEN DEPRECATED
auto cellNodesAll = workset.getCellNodes()
size_t numOwnedElems = workset.num_cells;
TEUCHOS_ASSERT(local_nodes.extent(0)==local_orts.extent(0));

Expand Down Expand Up @@ -586,7 +586,7 @@ bool checkProjection(Teuchos::RCP<panzer_stk::STK_Interface> mesh,
auto worksets = wkstsAndOrts.worksets;
auto orientations = wkstsAndOrts.orientations;
auto wkstSize = (*worksets)[0].num_cells; // As long as we don't pick the last workset, this gives the max size
auto numNodesPerElem = (*worksets)[0].getCellVertices().extent(1);
auto numNodesPerElem = (*worksets)[0].getCellNodes().extent(1);

// we will project from first to a second order basis to a first
// this essentially matches the intrepid2 test, but we've
Expand Down Expand Up @@ -671,26 +671,6 @@ bool checkProjection(Teuchos::RCP<panzer_stk::STK_Interface> mesh,
if ( err > 1e-14 ) matched = false;
}

//typedef typename EvalType::ScalarT ScalarT;

//PHX::MDField<ScalarT,panzer::Cell,panzer::BASIS> s(fname,sourceBasis->functional);
//PHX::MDField<ScalarT,panzer::Cell,panzer::BASIS> t(fname+"_final",sourceBasis->functional);

//fm->getFieldData<EvalType>(s);
//fm->getFieldData<EvalType>(t);

//auto s_h = Kokkos::create_mirror_view(s.get_view());
//Kokkos::deep_copy(s_h, s.get_view());
//auto t_h = Kokkos::create_mirror_view(t.get_view());
//Kokkos::deep_copy(t_h, t.get_view());

//bool matched = true;
//for (size_t ncell=0;ncell<numCells;++ncell){
// for (int idx_pt=0;idx_pt<sourceBasis->cardinality();++idx_pt){
// if (std::abs(s_h(ncell,idx_pt) - t_h(ncell,idx_pt)) > 1e-14) matched = false;
// }
//}

return matched;
}

Expand All @@ -700,4 +680,4 @@ bool checkProjection(Teuchos::RCP<panzer_stk::STK_Interface> mesh,

typedef panzer::Traits::Residual ResidualType;

UNIT_TEST_GROUP(ResidualType)
UNIT_TEST_GROUP(ResidualType)

0 comments on commit 22be6dc

Please sign in to comment.