46 #include "Thyra_VectorSpaceTester.hpp"
47 #include "Thyra_VectorStdOpsTester.hpp"
48 #include "Thyra_MultiVectorStdOpsTester.hpp"
49 #include "Thyra_VectorStdOps.hpp"
50 #include "Thyra_MultiVectorStdOps.hpp"
51 #include "Thyra_LinearOpTester.hpp"
52 #include "Thyra_DefaultProductVector.hpp"
53 #include "Thyra_TestingTools.hpp"
54 #include "Thyra_ScaledLinearOpBase.hpp"
55 #include "Thyra_RowStatLinearOpBase.hpp"
56 #include "Thyra_VectorStdOps.hpp"
57 #include "Tpetra_CrsMatrix.hpp"
76 using Teuchos::rcp_dynamic_cast;
77 using Teuchos::inOutArg;
100 template<
class Scalar>
101 RCP<const VectorSpaceBase<Scalar> >
108 template<
class Scalar>
109 RCP<Tpetra::Operator<Scalar> >
112 typedef Tpetra::global_size_t global_size_t;
113 typedef Tpetra::Map<>::global_ordinal_type GO;
117 const size_t numMyElements = map->getNodeNumElements();
118 const global_size_t numGlobalElements = map->getGlobalNumElements();
131 for (
size_t i=0; i < numMyElements; ++i) {
132 if (myGlobalElements[i] == 0 || static_cast<global_size_t>(myGlobalElements[i]) == numGlobalElements-1) {
143 Teuchos::rcp(
new Tpetra::CrsMatrix<Scalar>(map, numNz (), Tpetra::StaticProfile) );
153 const Scalar two =
static_cast<Scalar
>( 2.0);
154 const Scalar posOne =
static_cast<Scalar
>(+1.0);
155 const Scalar negOne =
static_cast<Scalar
>(-1.0);
156 for (
size_t i = 0; i < numMyElements; i++) {
157 if (myGlobalElements[i] == 0) {
158 A->insertGlobalValues( myGlobalElements[i],
159 tuple<GO>(myGlobalElements[i], myGlobalElements[i]+1)(),
160 tuple<Scalar> (two, posOne)()
163 else if (static_cast<global_size_t>(myGlobalElements[i]) == numGlobalElements-1) {
164 A->insertGlobalValues( myGlobalElements[i],
165 tuple<GO>(myGlobalElements[i]-1, myGlobalElements[i])(),
166 tuple<Scalar> (negOne, two)()
170 A->insertGlobalValues( myGlobalElements[i],
171 tuple<GO>(myGlobalElements[i]-1, myGlobalElements[i], myGlobalElements[i]+1)(),
172 tuple<Scalar> (negOne, two, posOne)()
193 "show-all-tests",
"no-show-all-tests", &
showAllTests,
"Show all tests or not" );
195 "dump-all",
"no-dump-all", &
dumpAll,
"Dump all objects being tested" );
228 Thyra::createVectorSpace<Scalar>(tpetraMap);
230 out <<
"vs = " << *vs;
232 rcp_dynamic_cast<
const SpmdVectorSpaceBase<Scalar> >(vs,
true);
234 TEST_EQUALITY(vs->dim(), as<Ordinal>(tpetraMap->getGlobalNumElements()));
238 TEST_EQUALITY(tpetraMap2, tpetraMap);
254 Thyra::createVectorSpace<Scalar>(tpetraMap);
257 rcp(
new Tpetra::Vector<Scalar>(tpetraMap));
263 ConverterT::getTpetraVector(thyraVector);
270 TEST_ASSERT(thyraVector->space()->isCompatible(*vs));
272 ConverterT::getTpetraVector(thyraVector);
291 Thyra::createVectorSpace<Scalar>(tpetraMap);
294 rcp(
new Tpetra::Vector<Scalar>(tpetraMap));
301 ConverterT::getConstTpetraVector(thyraVector);
309 TEST_ASSERT(thyraVector->space()->isCompatible(*vs));
311 ConverterT::getConstTpetraVector(thyraVector);
325 typedef Tpetra::Map<>::local_ordinal_type LO;
326 typedef Tpetra::Map<>::global_ordinal_type GO;
327 typedef Tpetra::Map<>::node_type NODE;
330 const int numCols = 3;
334 Thyra::createVectorSpace<Scalar>(tpetraMap);
337 Tpetra::createLocalMapWithNode<LO,GO,NODE>(
338 numCols, tpetraMap->getComm());
340 Thyra::createVectorSpace<Scalar>(tpetraLocRepMap);
343 rcp(
new Tpetra::MultiVector<Scalar>(tpetraMap, numCols));
351 ConverterT::getTpetraMultiVector(thyraMultiVector);
360 TEST_ASSERT(thyraMultiVector->range()->isCompatible(*rangeVs));
361 TEST_ASSERT(thyraMultiVector->domain()->isCompatible(*domainVs));
363 ConverterT::getTpetraMultiVector(thyraMultiVector);
377 typedef Tpetra::Map<>::local_ordinal_type LO;
378 typedef Tpetra::Map<>::global_ordinal_type GO;
379 typedef Tpetra::Map<>::node_type NODE;
382 const int numCols = 3;
386 Thyra::createVectorSpace<Scalar>(tpetraMap);
389 Tpetra::createLocalMapWithNode<LO,GO,NODE>(
390 numCols, tpetraMap->getComm());
392 Thyra::createVectorSpace<Scalar>(tpetraLocRepMap);
395 rcp(
new Tpetra::MultiVector<Scalar>(tpetraMap, numCols));
403 ConverterT::getConstTpetraMultiVector(thyraMultiVector);
412 TEST_ASSERT(thyraMultiVector->range()->isCompatible(*rangeVs));
413 TEST_ASSERT(thyraMultiVector->domain()->isCompatible(*domainVs));
415 ConverterT::getConstTpetraMultiVector(thyraMultiVector);
446 = createTpetraVectorSpace<Scalar>(
g_localDim);
447 Thyra::VectorSpaceTester<Scalar> vectorSpaceTester;
449 vectorSpaceTester.dump_all(
dumpAll);
464 Thyra::VectorStdOpsTester<Scalar> vectorStdOpsTester;
465 vectorStdOpsTester.warning_tol(5.0e-13);
466 vectorStdOpsTester.error_tol(5.0e-14);
467 TEST_ASSERT(vectorStdOpsTester.checkStdOps(*vs, &out));
481 Thyra::MultiVectorStdOpsTester<Scalar> mvStdOpsTester;
482 mvStdOpsTester.warning_tol(5.0e-13);
483 mvStdOpsTester.error_tol(5.0e-14);
484 TEST_ASSERT(mvStdOpsTester.checkStdOps(*vs, &out));
497 const int numCols = 3;
499 = createTpetraVectorSpace<Scalar>(
g_localDim);
504 ConverterT::getTpetraMultiVector(mv);
506 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
512 ConverterT::getTpetraMultiVector(v);
514 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
519 TEST_THROW(ConverterT::getTpetraMultiVector(pv), std::logic_error);
534 const int numCols = 3;
536 = createTpetraVectorSpace<Scalar>(
g_localDim);
541 ConverterT::getConstTpetraMultiVector(mv);
543 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
549 ConverterT::getConstTpetraMultiVector(v);
551 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
556 TEST_THROW(ConverterT::getConstTpetraMultiVector(pv), std::logic_error);
574 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
575 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
579 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
581 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
583 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
586 out <<
"\nCheck that operator returns the right thing ...\n";
588 Thyra::V_S(x.
ptr(), ST::one());
590 Thyra::apply<Scalar>(*thyraLinearOp, Thyra::NOTRANS, *x, y.
ptr());
591 const Scalar sum_y = sum(*y);
595 out <<
"\nCheck the general LinearOp interface ...\n";
596 Thyra::LinearOpTester<Scalar> linearOpTester;
598 linearOpTester.dump_all(
dumpAll);
600 TEST_ASSERT(linearOpTester.check(*thyraLinearOp, Teuchos::inOutArg(out)));
617 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
618 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
621 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
624 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
632 ConverterT::getTpetraOperator(thyraOp);
641 TEST_ASSERT(thyraOp->range()->isCompatible(*rangeSpace));
642 TEST_ASSERT(thyraOp->domain()->isCompatible(*domainSpace));
644 ConverterT::getTpetraOperator(thyraOp);
662 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
663 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
666 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
669 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
677 ConverterT::getConstTpetraOperator(thyraOp);
686 TEST_ASSERT(thyraOp->range()->isCompatible(*rangeSpace));
687 TEST_ASSERT(thyraOp->domain()->isCompatible(*domainSpace));
689 ConverterT::getConstTpetraOperator(thyraOp);
706 "lookupAndAssertTimer(): timer \"" << label <<
"\" was not present in Teuchos::TimeMonitor."
707 " Unit test not valid.");
712 #define CHECK_TPETRA_FUNC_CALL_INCREMENT( timerStr, tpetraCode, thyraCode ) \
714 out << "\nTesting that Thyra calls down to " << timerStr << "\n"; \
716 const RCP<const Time> timer = lookupAndAssertTimer(timerStr); \
717 const int countBefore = timer->numCalls(); \
719 const int countAfter = timer->numCalls(); \
720 TEST_EQUALITY( countAfter, countBefore+1 ); \
729 typedef typename ST::magnitudeType Magnitude;
730 typedef VectorSpaceBase<Scalar> VectorSpace;
731 typedef MultiVectorBase<Scalar> MultiVec;
733 typedef Tpetra::MultiVector<Scalar> TpetraMultiVec;
736 const int numCols = 3;
741 A = createMembers(vs, numCols),
742 B = createMembers(vs, numCols);
744 tA = TOVE::getTpetraMultiVector(A),
745 tB = TOVE::getTpetraMultiVector(
B);
746 Array<Scalar>
C(numCols*numCols,ST::zero());
752 "Tpetra::MultiVector::putScalar()",
753 tA->putScalar(ST::zero()),
754 Thyra::assign(A.ptr(), ST::zero())
758 "Tpetra::MultiVector::dot()",
759 tA->dot(*tB, avScal() ),
760 Thyra::norms( *A, avMag() )
764 "Tpetra::MultiVector::dot()",
765 tA->dot(*tB, avScal() ),
766 A->range()->scalarProds(*A, *
B, avScal() )
832 #ifdef TPETRA_TEUCHOS_TIME_MONITOR
833 # define TPETRA_TIMER_TESTS(SCALAR) \
834 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, UseTpetraImplementations, SCALAR )
836 # define TPETRA_TIMER_TESTS(SCALAR)
845 #ifdef HAVE_THYRA_TPETRA_EPETRA
853 using Teuchos::outArg;
854 using Teuchos::rcp_dynamic_cast;
858 const RCP<Tpetra::Operator<Scalar> > tpetraOp =
859 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
861 const RCP<LinearOpBase<Scalar> > thyraOp =
864 const RCP<Thyra::TpetraLinearOp<Scalar> > thyraTpetraOp =
867 RCP<const Epetra_Operator> epetraOp;
868 Thyra::EOpTransp epetraOpTransp;
872 thyraTpetraOp->getEpetraOpView( outArg(epetraOp), outArg(epetraOpTransp),
873 outArg(epetraOpApplyAs), outArg(epetraOpAdjointSupport) );
875 if (
typeid(Scalar) ==
typeid(
double)) {
877 const RCP<const Epetra_RowMatrix> epetraRowMatrix =
878 rcp_dynamic_cast<
const Epetra_RowMatrix>(epetraOp,
true);
879 int numRowEntries = -1;
880 epetraRowMatrix->NumMyRowEntries(1, numRowEntries);
882 Array<double> row_values(numRowEntries);
883 Array<int> row_indices(numRowEntries);
884 epetraRowMatrix->ExtractMyRowCopy(1, numRowEntries, numRowEntries,
885 row_values.getRawPtr(), row_indices.getRawPtr());
910 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
911 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
915 Teuchos::rcp_dynamic_cast<Tpetra::CrsMatrix<Scalar> >(tpetraOp,
true);
918 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
920 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
922 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
926 Teuchos::rcp_dynamic_cast<Thyra::RowStatLinearOpBase<Scalar> >(thyraLinearOp,
true);
931 createMember<Scalar>(thyraLinearOp->range());
933 createMember<Scalar>(thyraLinearOp->range());
935 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM,
937 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
940 out <<
"inv_row_sums = " << *inv_row_sums;
941 out <<
"row_sums = " << *row_sums;
944 Thyra::sum<Scalar>(*row_sums),
945 Teuchos::as<Scalar>(4.0 * thyraLinearOp->domain()->dim() - 2.0),
950 Thyra::sum<Scalar>(*inv_row_sums),
951 Teuchos::as<Scalar>( 1.0 / 4.0 * (thyraLinearOp->domain()->dim() - 2) + 2.0 / 3.0 ),
960 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
961 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
965 Teuchos::rcp_dynamic_cast<Tpetra::CrsMatrix<Scalar> >(tpetraOp,
true);
968 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
970 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
972 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
976 Teuchos::rcp_dynamic_cast<Thyra::RowStatLinearOpBase<Scalar> >(thyraLinearOp,
true);
981 createMember<Scalar>(thyraLinearOp->range());
983 createMember<Scalar>(thyraLinearOp->range());
985 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM,
987 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
990 out <<
"inv_row_sums = " << *inv_row_sums;
991 out <<
"row_sums = " << *row_sums;
994 Teuchos::rcp_dynamic_cast<Thyra::ScaledLinearOpBase<Scalar> >(thyraLinearOp,
true);
998 scaledOp->scaleLeft(*inv_row_sums);
1000 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
1003 out <<
"row_sums after left scaling by inv_row_sum = " << *row_sums;
1007 Scalar(row_sums->space()->dim()),
1008 Thyra::sum<Scalar>(*row_sums),
1016 scaledOp->scaleRight(*inv_row_sums);
1017 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,row_sums.ptr());
1018 out <<
"row_sums after right scaling by inv_row_sum = " << *row_sums;
1021 #endif // HAVE_THYRA_TPETRA_EPETRA
1028 #define THYRA_TPETRA_THYRA_WRAPPERS_INSTANT(SCALAR) \
1030 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1031 convertTpetraToThyraComm, SCALAR ) \
1033 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1034 createVectorSpace, SCALAR ) \
1036 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1037 createVector, SCALAR ) \
1039 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1040 createConstVector, SCALAR ) \
1042 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1043 createMultiVector, SCALAR ) \
1045 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1046 createConstMultiVector, SCALAR ) \
1048 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1049 TeptraVectorSpace, SCALAR ) \
1051 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1052 vectorSpaceTester, SCALAR ) \
1054 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1055 vectorStdOpsTester, SCALAR ) \
1057 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1058 multiVectorStdOpsTester, SCALAR ) \
1060 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1061 getTpetraMultiVector, SCALAR ) \
1063 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1064 getConstTpetraMultiVector, SCALAR ) \
1066 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1067 TpetraLinearOp, SCALAR ) \
1069 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1070 createLinearOp, SCALAR ) \
1072 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1073 createConstLinearOp, SCALAR ) \
1075 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1076 TpetraLinearOp_EpetraRowMatrix, SCALAR ) \
1078 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1079 TpetraLinearOp_RowStatLinearOpBase, SCALAR ) \
1081 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1082 TpetraLinearOp_ScaledLinearOpBase, SCALAR ) \
RCP< MultiVectorBase< Scalar > > createMultiVector(const RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraMultiVector, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
#define THYRA_TPETRA_THYRA_WRAPPERS_INSTANT(SCALAR)
#define TEST_INEQUALITY(v1, v2)
bool is_null(const boost::shared_ptr< T > &p)
static magnitudeType eps()
static CommandLineProcessor & getCLP()
#define TEST_EQUALITY_CONST(v1, v2)
RCP< Tpetra::Operator< Scalar > > createTriDiagonalTpetraOperator(const int numLocalRows)
#define CHECK_TPETRA_FUNC_CALL_INCREMENT(timerStr, tpetraCode, thyraCode)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
static Teuchos::RCP< const Comm< OrdinalType > > getComm()
RCP< const VectorBase< Scalar > > createConstVector(const RCP< const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraVector, const RCP< const VectorSpaceBase< Scalar > > space=Teuchos::null)
RCP< const LinearOpBase< Scalar > > createConstLinearOp(const RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
RCP< LinearOpBase< Scalar > > createLinearOp(const RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
RCP< VectorBase< Scalar > > createVector(const RCP< Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraVector, const RCP< const VectorSpaceBase< Scalar > > space=Teuchos::null)
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
EAdjointEpetraOp
Determine if adjoints are supported on Epetra_Opeator or not.
RCP< const MultiVectorBase< Scalar > > createConstMultiVector(const RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraMultiVector, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
TypeTo as(const TypeFrom &t)
Teuchos::RCP< Teuchos::Time > lookupAndAssertTimer(const std::string &label)
#define TEST_FLOATING_EQUALITY(v1, v2, tol)
bool nonnull(const boost::shared_ptr< T > &p)
TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(TpetraThyraWrappers, convertTpetraToThyraComm, Scalar)
#define TEST_THROW(code, ExceptType)
EApplyEpetraOpAs
Determine how the apply an Epetra_Operator as a linear operator.
RCP< const VectorSpaceBase< Scalar > > createVectorSpace(const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &tpetraMap)
Create a Thyra::VectorSpaceBase object given a Tpetra::Map.
#define TEST_EQUALITY(v1, v2)
RCP< const Teuchos::Comm< Ordinal > > convertTpetraToThyraComm(const RCP< const Teuchos::Comm< int > > &tpetraComm)
Given an Tpetra Teuchos::Comm<int> object, return an equivalent Teuchos::Comm<Ordinal> object...
#define TEUCHOS_ASSERT(assertion_test)
Concrete Thyra::LinearOpBase subclass for Tpetra::Operator.
RCP< const TpetraMap_t > createTpetraMap(const int localDim)
RCP< const VectorSpaceBase< Scalar > > createTpetraVectorSpace(const int localDim)