11 #include "Thyra_VectorSpaceTester.hpp"
12 #include "Thyra_VectorStdOpsTester.hpp"
13 #include "Thyra_MultiVectorStdOpsTester.hpp"
14 #include "Thyra_VectorStdOps.hpp"
15 #include "Thyra_MultiVectorStdOps.hpp"
16 #include "Thyra_LinearOpTester.hpp"
17 #include "Thyra_DefaultProductVector.hpp"
18 #include "Thyra_TestingTools.hpp"
19 #include "Thyra_ScaledLinearOpBase.hpp"
20 #include "Thyra_RowStatLinearOpBase.hpp"
21 #include "Thyra_VectorStdOps.hpp"
22 #include "Tpetra_CrsMatrix.hpp"
41 using Teuchos::rcp_dynamic_cast;
42 using Teuchos::inOutArg;
65 template<
class Scalar>
66 RCP<const VectorSpaceBase<Scalar> >
73 template<
class Scalar>
74 RCP<Tpetra::Operator<Scalar> >
77 typedef Tpetra::global_size_t global_size_t;
78 typedef Tpetra::Map<>::global_ordinal_type GO;
82 const size_t numMyElements = map->getLocalNumElements();
83 const global_size_t numGlobalElements = map->getGlobalNumElements();
96 for (
size_t i=0; i < numMyElements; ++i) {
97 if (myGlobalElements[i] == 0 || static_cast<global_size_t>(myGlobalElements[i]) == numGlobalElements-1) {
108 Teuchos::rcp(
new Tpetra::CrsMatrix<Scalar>(map, numNz ()) );
118 const Scalar two =
static_cast<Scalar
>( 2.0);
119 const Scalar posOne =
static_cast<Scalar
>(+1.0);
120 const Scalar negOne =
static_cast<Scalar
>(-1.0);
121 for (
size_t i = 0; i < numMyElements; i++) {
122 if (myGlobalElements[i] == 0) {
123 A->insertGlobalValues( myGlobalElements[i],
124 tuple<GO>(myGlobalElements[i], myGlobalElements[i]+1)(),
125 tuple<Scalar> (two, posOne)()
128 else if (static_cast<global_size_t>(myGlobalElements[i]) == numGlobalElements-1) {
129 A->insertGlobalValues( myGlobalElements[i],
130 tuple<GO>(myGlobalElements[i]-1, myGlobalElements[i])(),
131 tuple<Scalar> (negOne, two)()
135 A->insertGlobalValues( myGlobalElements[i],
136 tuple<GO>(myGlobalElements[i]-1, myGlobalElements[i], myGlobalElements[i]+1)(),
137 tuple<Scalar> (negOne, two, posOne)()
158 "show-all-tests",
"no-show-all-tests", &
showAllTests,
"Show all tests or not" );
160 "dump-all",
"no-dump-all", &
dumpAll,
"Dump all objects being tested" );
193 Thyra::createVectorSpace<Scalar>(tpetraMap);
195 out <<
"vs = " << *vs;
197 rcp_dynamic_cast<
const SpmdVectorSpaceBase<Scalar> >(vs,
true);
199 TEST_EQUALITY(vs->dim(), as<Ordinal>(tpetraMap->getGlobalNumElements()));
203 TEST_EQUALITY(tpetraMap2, tpetraMap);
219 Thyra::createVectorSpace<Scalar>(tpetraMap);
222 rcp(
new Tpetra::Vector<Scalar>(tpetraMap));
228 ConverterT::getTpetraVector(thyraVector);
235 TEST_ASSERT(thyraVector->space()->isCompatible(*vs));
237 ConverterT::getTpetraVector(thyraVector);
256 Thyra::createVectorSpace<Scalar>(tpetraMap);
259 rcp(
new Tpetra::Vector<Scalar>(tpetraMap));
266 ConverterT::getConstTpetraVector(thyraVector);
274 TEST_ASSERT(thyraVector->space()->isCompatible(*vs));
276 ConverterT::getConstTpetraVector(thyraVector);
290 typedef Tpetra::Map<>::local_ordinal_type LO;
291 typedef Tpetra::Map<>::global_ordinal_type GO;
292 typedef Tpetra::Map<>::node_type NODE;
295 const int numCols = 3;
299 Thyra::createVectorSpace<Scalar>(tpetraMap);
302 Tpetra::createLocalMapWithNode<LO,GO,NODE>(
303 numCols, tpetraMap->getComm());
305 Thyra::createVectorSpace<Scalar>(tpetraLocRepMap);
308 rcp(
new Tpetra::MultiVector<Scalar>(tpetraMap, numCols));
316 ConverterT::getTpetraMultiVector(thyraMultiVector);
325 TEST_ASSERT(thyraMultiVector->range()->isCompatible(*rangeVs));
326 TEST_ASSERT(thyraMultiVector->domain()->isCompatible(*domainVs));
328 ConverterT::getTpetraMultiVector(thyraMultiVector);
342 typedef Tpetra::Map<>::local_ordinal_type LO;
343 typedef Tpetra::Map<>::global_ordinal_type GO;
344 typedef Tpetra::Map<>::node_type NODE;
347 const int numCols = 3;
351 Thyra::createVectorSpace<Scalar>(tpetraMap);
354 Tpetra::createLocalMapWithNode<LO,GO,NODE>(
355 numCols, tpetraMap->getComm());
357 Thyra::createVectorSpace<Scalar>(tpetraLocRepMap);
360 rcp(
new Tpetra::MultiVector<Scalar>(tpetraMap, numCols));
368 ConverterT::getConstTpetraMultiVector(thyraMultiVector);
377 TEST_ASSERT(thyraMultiVector->range()->isCompatible(*rangeVs));
378 TEST_ASSERT(thyraMultiVector->domain()->isCompatible(*domainVs));
380 ConverterT::getConstTpetraMultiVector(thyraMultiVector);
411 = createTpetraVectorSpace<Scalar>(
g_localDim);
412 Thyra::VectorSpaceTester<Scalar> vectorSpaceTester;
414 vectorSpaceTester.dump_all(
dumpAll);
429 Thyra::VectorStdOpsTester<Scalar> vectorStdOpsTester;
430 vectorStdOpsTester.warning_tol(5.0e-13);
431 vectorStdOpsTester.error_tol(5.0e-14);
432 TEST_ASSERT(vectorStdOpsTester.checkStdOps(*vs, &out));
446 Thyra::MultiVectorStdOpsTester<Scalar> mvStdOpsTester;
447 mvStdOpsTester.warning_tol(5.0e-13);
448 mvStdOpsTester.error_tol(5.0e-14);
449 TEST_ASSERT(mvStdOpsTester.checkStdOps(*vs, &out));
462 const int numCols = 3;
464 = createTpetraVectorSpace<Scalar>(
g_localDim);
469 ConverterT::getTpetraMultiVector(mv);
471 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
477 ConverterT::getTpetraMultiVector(v);
479 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
484 TEST_THROW(ConverterT::getTpetraMultiVector(pv), std::logic_error);
499 const int numCols = 3;
501 = createTpetraVectorSpace<Scalar>(
g_localDim);
506 ConverterT::getConstTpetraMultiVector(mv);
508 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
514 ConverterT::getConstTpetraMultiVector(v);
516 TEST_EQUALITY(as<Ordinal>(tmv->getMap()->getGlobalNumElements()), vs->dim());
521 TEST_THROW(ConverterT::getConstTpetraMultiVector(pv), std::logic_error);
539 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
540 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
544 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
546 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
548 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
551 out <<
"\nCheck that operator returns the right thing ...\n";
553 Thyra::V_S(x.
ptr(), ST::one());
555 Thyra::apply<Scalar>(*thyraLinearOp, Thyra::NOTRANS, *x, y.
ptr());
556 const Scalar sum_y = sum(*y);
560 out <<
"\nCheck the general LinearOp interface ...\n";
561 Thyra::LinearOpTester<Scalar> linearOpTester;
563 linearOpTester.dump_all(
dumpAll);
565 TEST_ASSERT(linearOpTester.check(*thyraLinearOp, Teuchos::inOutArg(out)));
582 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
583 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
586 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
589 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
597 ConverterT::getTpetraOperator(thyraOp);
606 TEST_ASSERT(thyraOp->range()->isCompatible(*rangeSpace));
607 TEST_ASSERT(thyraOp->domain()->isCompatible(*domainSpace));
609 ConverterT::getTpetraOperator(thyraOp);
627 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
628 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
631 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
634 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
642 ConverterT::getConstTpetraOperator(thyraOp);
651 TEST_ASSERT(thyraOp->range()->isCompatible(*rangeSpace));
652 TEST_ASSERT(thyraOp->domain()->isCompatible(*domainSpace));
654 ConverterT::getConstTpetraOperator(thyraOp);
671 "lookupAndAssertTimer(): timer \"" << label <<
"\" was not present in Teuchos::TimeMonitor."
672 " Unit test not valid.");
677 #define CHECK_TPETRA_FUNC_CALL_INCREMENT( timerStr, tpetraCode, thyraCode ) \
679 out << "\nTesting that Thyra calls down to " << timerStr << "\n"; \
681 const RCP<const Time> timer = lookupAndAssertTimer(timerStr); \
682 const int countBefore = timer->numCalls(); \
684 const int countAfter = timer->numCalls(); \
685 TEST_EQUALITY( countAfter, countBefore+1 ); \
694 typedef typename ST::magnitudeType Magnitude;
695 typedef VectorSpaceBase<Scalar> VectorSpace;
696 typedef MultiVectorBase<Scalar> MultiVec;
698 typedef Tpetra::MultiVector<Scalar> TpetraMultiVec;
701 const int numCols = 3;
706 A = createMembers(vs, numCols),
707 B = createMembers(vs, numCols);
709 tA = TOVE::getTpetraMultiVector(A),
710 tB = TOVE::getTpetraMultiVector(
B);
711 Array<Scalar>
C(numCols*numCols,ST::zero());
717 "Tpetra::MultiVector::putScalar()",
718 tA->putScalar(ST::zero()),
719 Thyra::assign(A.ptr(), ST::zero())
723 "Tpetra::MultiVector::dot()",
724 tA->dot(*tB, avScal() ),
725 Thyra::norms( *A, avMag() )
729 "Tpetra::MultiVector::dot()",
730 tA->dot(*tB, avScal() ),
731 A->range()->scalarProds(*A, *
B, avScal() )
797 #ifdef TPETRA_TEUCHOS_TIME_MONITOR
798 # define TPETRA_TIMER_TESTS(SCALAR) \
799 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, UseTpetraImplementations, SCALAR )
801 # define TPETRA_TIMER_TESTS(SCALAR)
810 #ifdef HAVE_THYRA_TPETRA_EPETRA
818 using Teuchos::outArg;
819 using Teuchos::rcp_dynamic_cast;
823 const RCP<Tpetra::Operator<Scalar> > tpetraOp =
824 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
826 const RCP<LinearOpBase<Scalar> > thyraOp =
829 const RCP<Thyra::TpetraLinearOp<Scalar> > thyraTpetraOp =
832 RCP<const Epetra_Operator> epetraOp;
833 Thyra::EOpTransp epetraOpTransp;
837 thyraTpetraOp->getEpetraOpView( outArg(epetraOp), outArg(epetraOpTransp),
838 outArg(epetraOpApplyAs), outArg(epetraOpAdjointSupport) );
840 if (
typeid(Scalar) ==
typeid(
double)) {
842 const RCP<const Epetra_RowMatrix> epetraRowMatrix =
843 rcp_dynamic_cast<
const Epetra_RowMatrix>(epetraOp,
true);
844 int numRowEntries = -1;
845 epetraRowMatrix->NumMyRowEntries(1, numRowEntries);
847 Array<double> row_values(numRowEntries);
848 Array<int> row_indices(numRowEntries);
849 epetraRowMatrix->ExtractMyRowCopy(1, numRowEntries, numRowEntries,
850 row_values.getRawPtr(), row_indices.getRawPtr());
875 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
876 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
880 Teuchos::rcp_dynamic_cast<Tpetra::CrsMatrix<Scalar> >(tpetraOp,
true);
883 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
885 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
887 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
891 Teuchos::rcp_dynamic_cast<Thyra::RowStatLinearOpBase<Scalar> >(thyraLinearOp,
true);
896 createMember<Scalar>(thyraLinearOp->range());
898 createMember<Scalar>(thyraLinearOp->range());
900 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM,
902 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
905 out <<
"inv_row_sums = " << *inv_row_sums;
906 out <<
"row_sums = " << *row_sums;
909 Thyra::sum<Scalar>(*row_sums),
910 Teuchos::as<Scalar>(4.0 * thyraLinearOp->domain()->dim() - 2.0),
915 Thyra::sum<Scalar>(*inv_row_sums),
916 Teuchos::as<Scalar>( 1.0 / 4.0 * (thyraLinearOp->domain()->dim() - 2) + 2.0 / 3.0 ),
925 createTriDiagonalTpetraOperator<Scalar>(
g_localDim);
926 out <<
"tpetraOp = " << Teuchos::describe(*tpetraOp,
Teuchos::VERB_HIGH) << std::endl;
930 Teuchos::rcp_dynamic_cast<Tpetra::CrsMatrix<Scalar> >(tpetraOp,
true);
933 Thyra::createVectorSpace<Scalar>(tpetraOp->getRangeMap());
935 Thyra::createVectorSpace<Scalar>(tpetraOp->getDomainMap());
937 Thyra::tpetraLinearOp(rangeSpace, domainSpace, tpetraOp);
941 Teuchos::rcp_dynamic_cast<Thyra::RowStatLinearOpBase<Scalar> >(thyraLinearOp,
true);
946 createMember<Scalar>(thyraLinearOp->range());
948 createMember<Scalar>(thyraLinearOp->range());
950 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_INV_ROW_SUM,
952 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
955 out <<
"inv_row_sums = " << *inv_row_sums;
956 out <<
"row_sums = " << *row_sums;
959 Teuchos::rcp_dynamic_cast<Thyra::ScaledLinearOpBase<Scalar> >(thyraLinearOp,
true);
963 scaledOp->scaleLeft(*inv_row_sums);
965 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,
968 out <<
"row_sums after left scaling by inv_row_sum = " << *row_sums;
972 Scalar(row_sums->space()->dim()),
973 Thyra::sum<Scalar>(*row_sums),
981 scaledOp->scaleRight(*inv_row_sums);
982 rowStatOp->getRowStat(Thyra::RowStatLinearOpBaseUtils::ROW_STAT_ROW_SUM,row_sums.ptr());
983 out <<
"row_sums after right scaling by inv_row_sum = " << *row_sums;
986 #endif // HAVE_THYRA_TPETRA_EPETRA
993 #define THYRA_TPETRA_THYRA_WRAPPERS_INSTANT(SCALAR) \
995 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
996 convertTpetraToThyraComm, SCALAR ) \
998 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
999 createVectorSpace, SCALAR ) \
1001 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1002 createVector, SCALAR ) \
1004 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1005 createConstVector, SCALAR ) \
1007 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1008 createMultiVector, SCALAR ) \
1010 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1011 createConstMultiVector, SCALAR ) \
1013 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1014 TeptraVectorSpace, SCALAR ) \
1016 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1017 vectorSpaceTester, SCALAR ) \
1019 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1020 vectorStdOpsTester, SCALAR ) \
1022 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1023 multiVectorStdOpsTester, SCALAR ) \
1025 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1026 getTpetraMultiVector, SCALAR ) \
1028 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1029 getConstTpetraMultiVector, SCALAR ) \
1031 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1032 TpetraLinearOp, SCALAR ) \
1034 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1035 createLinearOp, SCALAR ) \
1037 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1038 createConstLinearOp, SCALAR ) \
1040 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1041 TpetraLinearOp_EpetraRowMatrix, SCALAR ) \
1043 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1044 TpetraLinearOp_RowStatLinearOpBase, SCALAR ) \
1046 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( TpetraThyraWrappers, \
1047 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)