|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Thyra: Interfaces and Support for Abstract Numerical Algorithms 00005 // Copyright (2004) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef THYRA_VECTOR_DEFAULT_BASE_DEF_HPP 00030 #define THYRA_VECTOR_DEFAULT_BASE_DEF_HPP 00031 00032 00033 // Define to make some verbose output 00034 //#define THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00035 00036 00037 #include "Thyra_VectorDefaultBase_decl.hpp" 00038 #include "Thyra_VectorSpaceFactoryBase.hpp" 00039 #include "Thyra_VectorBase.hpp" 00040 #include "Thyra_VectorStdOps.hpp" 00041 #include "Thyra_MultiVectorDefaultBase.hpp" 00042 #include "Thyra_AssertOp.hpp" 00043 #include "Thyra_MultiVectorBase.hpp" 00044 #include "Thyra_DetachedVectorView.hpp" 00045 #include "RTOpPack_ROpGetSubVector.hpp" 00046 #include "RTOpPack_TOpSetSubVector.hpp" 00047 #include "Teuchos_TestForException.hpp" 00048 00049 00050 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00051 # include "Teuchos_VerboseObject.hpp" 00052 # define THYRA_VECTOR_VERBOSE_OUT_STATEMENT \ 00053 RCP<Teuchos::FancyOStream> dbgout = Teuchos::VerboseObjectBase::getDefaultOStream() 00054 #endif // THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00055 00056 00057 00058 namespace Thyra { 00059 00060 00061 // Overridden from Teuchos::Describable 00062 00063 00064 template<class Scalar> 00065 std::string VectorDefaultBase<Scalar>::description() const 00066 { 00067 std::ostringstream oss; 00068 const RCP<const VectorSpaceBase<Scalar> > vs = this->space(); 00069 oss << Teuchos::Describable::description(); 00070 if(is_null(vs)) { 00071 oss << "{space=NULL}"; 00072 } 00073 else { 00074 const Ordinal dim = vs->dim(); 00075 oss << "{dim=" << dim << "}"; 00076 } 00077 return oss.str(); 00078 } 00079 00080 00081 template<class Scalar> 00082 void VectorDefaultBase<Scalar>::describe( 00083 Teuchos::FancyOStream &out_arg, 00084 const Teuchos::EVerbosityLevel verbLevel 00085 ) const 00086 { 00087 using Teuchos::FancyOStream; 00088 using Teuchos::OSTab; 00089 RCP<FancyOStream> out = Teuchos::rcpFromRef(out_arg); 00090 OSTab tab(out); 00091 *out << this->description() << "\n"; 00092 if (this->space()->dim()) { 00093 tab.incrTab(); 00094 if (verbLevel >= Teuchos::VERB_HIGH) { 00095 const ConstDetachedVectorView<Scalar> dvv(*this); 00096 for( Ordinal i = 0; i < dvv.subDim(); ++i ) 00097 *out << i << ":" << dvv[i] << std::endl; 00098 } 00099 } 00100 } 00101 00102 00103 // Overridden from LinearOpBase 00104 00105 00106 template<class Scalar> 00107 RCP< const VectorSpaceBase<Scalar> > 00108 VectorDefaultBase<Scalar>::range() const 00109 { 00110 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00111 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00112 *dbgout << "\nThyra::VectorDefaultBase<" 00113 <<Teuchos::ScalarTraits<Scalar>::name() 00114 <<">::range() called!\n"; 00115 #endif 00116 return this->space(); 00117 } 00118 00119 00120 template<class Scalar> 00121 RCP< const VectorSpaceBase<Scalar> > 00122 VectorDefaultBase<Scalar>::domain() const 00123 { 00124 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00125 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00126 *dbgout << "\nThyra::VectorDefaultBase<" 00127 <<Teuchos::ScalarTraits<Scalar>::name() 00128 <<">::domain() called!\n"; 00129 #endif 00130 if(!domain_.get()) { 00131 domain_ = range()->smallVecSpcFcty()->createVecSpc(1); 00132 } 00133 return domain_; 00134 } 00135 00136 00137 // Overridden from MultiVectorBase 00138 00139 00140 template<class Scalar> 00141 RCP<MultiVectorBase<Scalar> > 00142 VectorDefaultBase<Scalar>::clone_mv() const 00143 { 00144 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00145 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00146 *dbgout << "\nThyra::VectorDefaultBase<" 00147 <<Teuchos::ScalarTraits<Scalar>::name() 00148 <<">::clone_mv() called!\n"; 00149 #endif 00150 return this->clone_v(); 00151 } 00152 00153 00154 // Overridden from VectorBase 00155 00156 00157 template<class Scalar> 00158 RCP<VectorBase<Scalar> > 00159 VectorDefaultBase<Scalar>::clone_v() const 00160 { 00161 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00162 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00163 *dbgout << "\nThyra::VectorDefaultBase<" 00164 <<Teuchos::ScalarTraits<Scalar>::name() 00165 <<">::clone_v() called!\n"; 00166 #endif 00167 RCP<VectorBase<Scalar> > copy = createMember(this->space()); 00168 assign(copy.ptr(), *this); 00169 return copy; 00170 } 00171 00172 00173 // protected 00174 00175 00176 // Overridden protected functions from MultiVectorVectorBase 00177 00178 00179 template<class Scalar> 00180 RCP<VectorBase<Scalar> > 00181 VectorDefaultBase<Scalar>::nonconstColImpl(Ordinal j) 00182 { 00183 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00184 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00185 *dbgout << "\nThyra::VectorDefaultBase<" 00186 <<Teuchos::ScalarTraits<Scalar>::name()<<">::nonconstColImpl(j) called!\n"; 00187 #endif 00188 #ifdef TEUCHOS_DEBUG 00189 TEST_FOR_EXCEPT( j != 0 ); 00190 #endif 00191 return Teuchos::rcp(this,false); 00192 } 00193 00194 00195 template<class Scalar> 00196 RCP<const MultiVectorBase<Scalar> > 00197 VectorDefaultBase<Scalar>::contigSubViewImpl( const Range1D& col_rng ) const 00198 { 00199 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00200 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00201 *dbgout << "\nThyra::VectorDefaultBase<" 00202 <<Teuchos::ScalarTraits<Scalar>::name() 00203 <<">::contigSubViewImpl(col_rng) const called!\n"; 00204 #endif 00205 validateColRng(col_rng); 00206 return Teuchos::rcp(this,false); 00207 } 00208 00209 00210 template<class Scalar> 00211 RCP<MultiVectorBase<Scalar> > 00212 VectorDefaultBase<Scalar>::nonconstContigSubViewImpl( const Range1D& col_rng ) 00213 { 00214 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00215 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00216 *dbgout << "\nThyra::VectorDefaultBase<" 00217 <<Teuchos::ScalarTraits<Scalar>::name() 00218 <<">::nonconstContigSubViewImpl(col_rng) called!\n"; 00219 #endif 00220 validateColRng(col_rng); 00221 return Teuchos::rcp(this,false); 00222 } 00223 00224 00225 template<class Scalar> 00226 RCP<const MultiVectorBase<Scalar> > 00227 VectorDefaultBase<Scalar>::nonContigSubViewImpl( 00228 const ArrayView<const int> &cols ) const 00229 { 00230 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00231 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00232 *dbgout << "\nThyra::VectorDefaultBase<" 00233 <<Teuchos::ScalarTraits<Scalar>::name() 00234 <<">::nonContigSubViewImpl(cols) called!\n"; 00235 #endif 00236 validateColIndexes(cols); 00237 return Teuchos::rcp(this,false); 00238 } 00239 00240 00241 template<class Scalar> 00242 RCP<MultiVectorBase<Scalar> > 00243 VectorDefaultBase<Scalar>::nonconstNonContigSubViewImpl( 00244 const ArrayView<const int> &cols ) 00245 { 00246 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00247 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00248 *dbgout << "\nThyra::VectorDefaultBase<" 00249 <<Teuchos::ScalarTraits<Scalar>::name() 00250 <<">::nonconstNonContigSubViewImpl(cols) called!\n"; 00251 #endif 00252 validateColIndexes(cols); 00253 return Teuchos::rcp(this,false); 00254 } 00255 00256 00257 template<class Scalar> 00258 void VectorDefaultBase<Scalar>::acquireDetachedMultiVectorViewImpl( 00259 const Range1D &rowRng, 00260 const Range1D &colRng, 00261 RTOpPack::ConstSubMultiVectorView<Scalar> *sub_mv 00262 ) const 00263 { 00264 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00265 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00266 *dbgout << "\nThyra::VectorDefaultBase<" 00267 <<Teuchos::ScalarTraits<Scalar>::name() 00268 <<">::acquireDetachedMultiVectorViewImpl() const called!\n"; 00269 #endif 00270 #ifdef TEUCHOS_DEBUG 00271 TEST_FOR_EXCEPT(sub_mv==NULL); 00272 #endif 00273 validateColRng(colRng); 00274 RTOpPack::ConstSubVectorView<Scalar> sv; 00275 acquireDetachedView(rowRng,&sv); 00276 #ifdef TEUCHOS_DEBUG 00277 TEST_FOR_EXCEPT( sv.stride() != 1 ); // Can't handle non-unit stride yet but we could 00278 #endif 00279 sub_mv->initialize( sv.globalOffset(), sv.subDim(), 0, 1, sv.values(), sv.subDim() ); 00280 } 00281 00282 00283 template<class Scalar> 00284 void VectorDefaultBase<Scalar>::releaseDetachedMultiVectorViewImpl( 00285 RTOpPack::ConstSubMultiVectorView<Scalar>* sub_mv 00286 ) const 00287 { 00288 TEST_FOR_EXCEPT(sub_mv == 0); 00289 sub_mv->uninitialize(); 00290 } 00291 00292 00293 template<class Scalar> 00294 void VectorDefaultBase<Scalar>::acquireNonconstDetachedMultiVectorViewImpl( 00295 const Range1D &rowRng, 00296 const Range1D &colRng, 00297 RTOpPack::SubMultiVectorView<Scalar> *sub_mv 00298 ) 00299 { 00300 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00301 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00302 *dbgout << "\nThyra::VectorDefaultBase<" 00303 <<Teuchos::ScalarTraits<Scalar>::name() 00304 <<">::acquireNonconstDetachedMultiVectorViewImpl() called!\n"; 00305 #endif 00306 #ifdef TEUCHOS_DEBUG 00307 TEST_FOR_EXCEPT(sub_mv==NULL); 00308 #endif 00309 validateColRng(colRng); 00310 RTOpPack::SubVectorView<Scalar> sv; 00311 acquireDetachedView(rowRng,&sv); 00312 #ifdef TEUCHOS_DEBUG 00313 TEST_FOR_EXCEPT( sv.stride() != 1 ); // Can't handle non-unit stride yet but we could 00314 #endif 00315 sub_mv->initialize( sv.globalOffset(), sv.subDim(), 0, 1, sv.values(), sv.subDim() ); 00316 } 00317 00318 00319 template<class Scalar> 00320 void VectorDefaultBase<Scalar>::commitNonconstDetachedMultiVectorViewImpl( 00321 RTOpPack::SubMultiVectorView<Scalar>* sub_mv 00322 ) 00323 { 00324 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00325 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00326 *dbgout << "\nThyra::VectorDefaultBase<" 00327 <<Teuchos::ScalarTraits<Scalar>::name() 00328 <<">::commitNonconstDetachedMultiVectorViewImpl() called!\n"; 00329 #endif 00330 #ifdef TEUCHOS_DEBUG 00331 TEST_FOR_EXCEPT(sub_mv==NULL); 00332 #endif 00333 RTOpPack::SubVectorView<Scalar> sv( 00334 sub_mv->globalOffset(),sub_mv->subDim(),sub_mv->values(),1); 00335 commitDetachedView(&sv); 00336 sub_mv->uninitialize(); 00337 } 00338 00339 00340 // Overridden protected functions from VectorBase 00341 00342 00343 template<class Scalar> 00344 void VectorDefaultBase<Scalar>::acquireDetachedVectorViewImpl( 00345 const Range1D& rng_in, RTOpPack::ConstSubVectorView<Scalar>* sub_vec_inout 00346 ) const 00347 { 00348 using Teuchos::dyn_cast; 00349 const Range1D rng = rng_in.full_range() ? Range1D(0,this->space()->dim()-1) : rng_in; 00350 #ifdef TEUCHOS_DEBUG 00351 TEST_FOR_EXCEPTION( 00352 !(rng.ubound() < this->space()->dim()), std::out_of_range 00353 ,"VectorDefaultBase<Scalar>::acquireDetachedVectorViewImpl(rng,...):" 00354 " Error, rng = ["<<rng.lbound()<<","<<rng.ubound() 00355 <<"] is not in range = [0,"<<(this->space()->dim()-1)<<"]" ); 00356 #endif 00357 // Initialize the operator 00358 RTOpPack::ROpGetSubVector<Scalar> get_sub_vector_op(rng.lbound(),rng.ubound()); 00359 // Create the reduction object (another sub_vec) 00360 RCP<RTOpPack::ReductTarget> 00361 reduct_obj = get_sub_vector_op.reduct_obj_create(); // This is really of type RTOpPack::ConstSubVectorView<Scalar>! 00362 // Perform the reduction (get the sub-vector requested) 00363 const VectorBase<Scalar>* sub_vecs[] = { this }; 00364 ::Thyra::applyOp<Scalar>(get_sub_vector_op, 1, sub_vecs, 0, NULL, &*reduct_obj); 00365 // Get the sub-vector. 00366 *sub_vec_inout = get_sub_vector_op(*reduct_obj); 00367 } 00368 00369 00370 template<class Scalar> 00371 void VectorDefaultBase<Scalar>::releaseDetachedVectorViewImpl( 00372 RTOpPack::ConstSubVectorView<Scalar>* sub_vec 00373 ) const 00374 { 00375 TEST_FOR_EXCEPT(sub_vec == 0); 00376 sub_vec->uninitialize(); 00377 } 00378 00379 00380 template<class Scalar> 00381 void VectorDefaultBase<Scalar>::acquireNonconstDetachedVectorViewImpl( 00382 const Range1D& rng, RTOpPack::SubVectorView<Scalar>* sub_vec_inout 00383 ) 00384 { 00385 // 00386 // Here we get a copy of the data for the sub-vector that the 00387 // client will modify. We must later commit these changes to the 00388 // actual vector when the client calls commitDetachedView(...). 00389 // Note, this implementation is very dependent on the behavior of 00390 // the default implementation of constant version of 00391 // VectorDefaultBase<Scalar>::acquireDetachedView(...) and the implementation of 00392 // VectorDefaultBase<Scalar>::setSubVector(...)! 00393 // 00394 RTOpPack::ConstSubVectorView<Scalar> sub_vec; 00395 VectorDefaultBase<Scalar>::acquireDetachedVectorViewImpl( rng, &sub_vec ); 00396 sub_vec_inout->initialize( 00397 sub_vec.globalOffset(), sub_vec.subDim(), 00398 Teuchos::arcp_const_cast<Scalar>(sub_vec.values()), sub_vec.stride() 00399 ); 00400 } 00401 00402 00403 template<class Scalar> 00404 void VectorDefaultBase<Scalar>::commitNonconstDetachedVectorViewImpl( 00405 RTOpPack::SubVectorView<Scalar>* sub_vec_inout 00406 ) 00407 { 00408 TEST_FOR_EXCEPT(sub_vec_inout == 0); 00409 RTOpPack::SparseSubVectorT<Scalar> spc_sub_vec( 00410 sub_vec_inout->globalOffset(), sub_vec_inout->subDim() 00411 ,sub_vec_inout->values(), sub_vec_inout->stride() 00412 ); 00413 VectorDefaultBase<Scalar>::setSubVectorImpl(spc_sub_vec); // Commit the changes! 00414 sub_vec_inout->uninitialize(); // Make null as promised! 00415 } 00416 00417 00418 template<class Scalar> 00419 void VectorDefaultBase<Scalar>::setSubVectorImpl( const RTOpPack::SparseSubVectorT<Scalar>& sub_vec ) 00420 { 00421 RTOpPack::TOpSetSubVector<Scalar> set_sub_vector_op(sub_vec); 00422 VectorBase<Scalar>* targ_vecs[1] = { this }; 00423 ::Thyra::applyOp<Scalar>(set_sub_vector_op, 0, NULL, 1, targ_vecs, NULL); 00424 } 00425 00426 00427 // Overridden protected functions from LinearOpBase 00428 00429 00430 template<class Scalar> 00431 bool VectorDefaultBase<Scalar>::opSupportedImpl(EOpTransp M_trans) const 00432 { 00433 typedef Teuchos::ScalarTraits<Scalar> ST; 00434 return ( ST::isComplex ? ( M_trans==NOTRANS || M_trans==CONJTRANS ) : true ); 00435 } 00436 00437 00438 template<class Scalar> 00439 void VectorDefaultBase<Scalar>::applyImpl( 00440 const EOpTransp M_trans, 00441 const MultiVectorBase<Scalar> &X, 00442 const Ptr<MultiVectorBase<Scalar> > &Y, 00443 const Scalar alpha, 00444 const Scalar beta 00445 ) const 00446 { 00447 00448 typedef Teuchos::ScalarTraits<Scalar> ST; 00449 00450 // Validate input 00451 #ifdef TEUCHOS_DEBUG 00452 THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES( 00453 "VectorDefaultBase<Scalar>::apply()", *this, M_trans, X, &*Y); 00454 #endif 00455 00456 const Ordinal numCols = X.domain()->dim(); 00457 00458 for (Ordinal col_j = 0; col_j < numCols; ++col_j) { 00459 00460 // Get single column vectors 00461 const RCP<const VectorBase<Scalar> > x = X.col(col_j); 00462 const RCP<VectorBase<Scalar> > y = Y->col(col_j); 00463 00464 // Here M = m (where m is a column vector) 00465 if( M_trans == NOTRANS || (M_trans == CONJ && !ST::isComplex) ) { 00466 // y = beta*y + alpha*m*x (x is a scalar!) 00467 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00468 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00469 *dbgout << "\nThyra::VectorDefaultBase<" 00470 <<Teuchos::ScalarTraits<Scalar>::name() 00471 <<">::apply(...) : y = beta*y + alpha*m*x (x is a scalar!)\n"; 00472 #endif 00473 Vt_S( y.ptr(), beta ); 00474 Vp_StV( y.ptr(), Scalar(alpha*get_ele(*x,0)), *this ); 00475 } 00476 else if( M_trans == CONJTRANS || (M_trans == TRANS && !ST::isComplex) ) { 00477 // y = beta*y + alpha*m'*x (y is a scalar!) 00478 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00479 THYRA_VECTOR_VERBOSE_OUT_STATEMENT; 00480 *dbgout << "\nThyra::VectorDefaultBase<" 00481 <<Teuchos::ScalarTraits<Scalar>::name() 00482 <<">::apply(...) : y = beta*y + alpha*m'*x (y is a scalar!)\n"; 00483 #endif 00484 Scalar y_inout; 00485 if( beta == ST::zero() ) { 00486 y_inout = ST::zero(); 00487 } 00488 else { 00489 y_inout = beta*get_ele(*y,0); 00490 } 00491 #if defined(THYRA_VECTOR_VERBOSE_TO_ERROR_OUT) && defined(RTOPPACK_SPMD_APPLY_OP_DUMP) 00492 RTOpPack::show_spmd_apply_op_dump = true; 00493 #endif 00494 #if defined(THYRA_VECTOR_VERBOSE_TO_ERROR_OUT) && defined(RTOPPACK_RTOPT_HELPER_DUMP_OUTPUT) 00495 RTOpPack::rtop_helpers_dump_all = true; 00496 #endif 00497 y_inout += alpha * this->space()->scalarProd(*this, *x); 00498 #if defined(THYRA_VECTOR_VERBOSE_TO_ERROR_OUT) && defined(RTOPPACK_SPMD_APPLY_OP_DUMP) 00499 RTOpPack::show_spmd_apply_op_dump = false; 00500 #endif 00501 #if defined(THYRA_VECTOR_VERBOSE_TO_ERROR_OUT) && defined(RTOPPACK_RTOPT_HELPER_DUMP_OUTPUT) 00502 RTOpPack::rtop_helpers_dump_all = false; 00503 #endif 00504 set_ele(0, y_inout, y.ptr()); 00505 #ifdef THYRA_VECTOR_VERBOSE_TO_ERROR_OUT 00506 *dbgout 00507 << "\nThyra::VectorDefaultBase<"<<ST::name()<<">::apply(...) : y_inout = " 00508 << y_inout << "\n"; 00509 #endif 00510 } 00511 else { 00512 TEST_FOR_EXCEPTION(true, std::logic_error, 00513 "VectorBase<"<<ST::name()<<">::apply(M_trans,...): Error, M_trans=" 00514 <<toString(M_trans)<<" not supported!" ); 00515 } 00516 00517 } 00518 00519 } 00520 00521 00522 // private 00523 00524 00525 template<class Scalar> 00526 inline 00527 void VectorDefaultBase<Scalar>::validateColRng( const Range1D &col_rng ) const 00528 { 00529 #ifdef TEUCHOS_DEBUG 00530 TEST_FOR_EXCEPT( 00531 !( col_rng.full_range() || ( col_rng.lbound() == 0 && col_rng.ubound() == 0) ) ); 00532 #endif 00533 } 00534 00535 00536 template<class Scalar> 00537 inline 00538 void VectorDefaultBase<Scalar>::validateColIndexes( 00539 const ArrayView<const int>&cols ) const 00540 { 00541 #ifdef TEUCHOS_DEBUG 00542 TEST_FOR_EXCEPT( cols.size() != 1 || cols[0] != 0 ); 00543 #endif 00544 } 00545 00546 00547 } // end namespace Thyra 00548 00549 00550 #endif // THYRA_VECTOR_DEFAULT_BASE_DEF_HPP
1.7.4