From bf9ccce3bff29d7f911138b06e014788d0de26d9 Mon Sep 17 00:00:00 2001 From: Roger Pawlowski Date: Tue, 14 Aug 2018 13:20:31 -0600 Subject: [PATCH] Panzer: added global indexer accessor to L2 projection class --- packages/panzer/adapters-stk/test/projection/projection.cpp | 2 ++ packages/panzer/disc-fe/src/Panzer_L2Projection.hpp | 3 +++ packages/panzer/disc-fe/src/Panzer_L2Projection_impl.hpp | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/packages/panzer/adapters-stk/test/projection/projection.cpp b/packages/panzer/adapters-stk/test/projection/projection.cpp index 7938a1d0a5bd..f9e89f213e5a 100644 --- a/packages/panzer/adapters-stk/test/projection/projection.cpp +++ b/packages/panzer/adapters-stk/test/projection/projection.cpp @@ -239,6 +239,8 @@ TEUCHOS_UNIT_TEST(L2Projection, ToNodal) projectionFactory.setup(hgradBD,integrationDescriptor,comm,connManager,eBlockNames,worksetContainer); timer->stop("projectionFactory.setup()"); + TEST_ASSERT(nonnull(projectionFactory.getTargetGlobalIndexer())); + // Build mass matrix timer->start("projectionFactory.buildMassMatrix()"); auto massMatrix = projectionFactory.buildMassMatrix(); diff --git a/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp b/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp index b85346d7d60a..111b08dd5607 100644 --- a/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp +++ b/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp @@ -69,6 +69,9 @@ namespace panzer { const std::vector& elementBlockNames, const Teuchos::RCP worksetContainer = Teuchos::null); + /// Returns the target global indexer. Will be null if setup() has not been called. + Teuchos::RCP> getTargetGlobalIndexer() const; + /** \brief Allocates, fills and returns a mass matrix for L2 projection onto a target basis. diff --git a/packages/panzer/disc-fe/src/Panzer_L2Projection_impl.hpp b/packages/panzer/disc-fe/src/Panzer_L2Projection_impl.hpp index b958f029a28a..f53524e4ea15 100644 --- a/packages/panzer/disc-fe/src/Panzer_L2Projection_impl.hpp +++ b/packages/panzer/disc-fe/src/Panzer_L2Projection_impl.hpp @@ -66,6 +66,11 @@ namespace panzer { // Check workset needs are correct } + template + Teuchos::RCP> + panzer::L2Projection::getTargetGlobalIndexer() const + {return targetGlobalIndexer_;} + template Teuchos::RCP>> panzer::L2Projection::buildMassMatrix()