本文整理汇总了C++中MultiVector::domain方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiVector::domain方法的具体用法?C++ MultiVector::domain怎么用?C++ MultiVector::domain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiVector
的用法示例。
在下文中一共展示了MultiVector::domain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: datacopy
/** \brief Copy the contents of a multivector to a destination vector.
*
* Copy the contents of a multivector to a new vector. If the destination
* vector is null, a deep copy of the source multivector is made to a newly allocated
* vector. Also, if the destination and the source do not match, a new destination
* object is allocated and returned to the user.
*
* \param[in] src Source multivector to be copied.
* \param[in] dst Destination multivector. If null a new multivector will be allocated.
*
* \returns A copy of the source multivector. If dst is not null a pointer to this object
* is returned. Otherwise a new multivector is returned.
*/
inline MultiVector datacopy(const MultiVector & src,MultiVector & dst)
{
if(dst==Teuchos::null)
return deepcopy(src);
bool rangeCompat = src->range()->isCompatible(*dst->range());
bool domainCompat = src->domain()->isCompatible(*dst->domain());
if(not (rangeCompat && domainCompat))
return deepcopy(src);
// perform data copy
Thyra::assign<double>(dst.ptr(),*src);
return dst;
}