/usr/include/trilinos/AbstractLinAlgPack_VectorSpaceThyra.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | // @HEADER
// ***********************************************************************
//
// Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
// Copyright (2003) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
//
// ***********************************************************************
// @HEADER
#ifndef ALAP_VECTOR_SPACE_Thyra_HPP
#define ALAP_VECTOR_SPACE_Thyra_HPP
#include "AbstractLinAlgPack_VectorSpace.hpp"
#include "Thyra_VectorSpaceBase.hpp"
namespace AbstractLinAlgPack {
/** \brief <tt>VectorSpace</tt> adapter subclass for <tt>Thyra::VectorSpaceBase<value_type> </tt>.
*
* Note that the default copy constructor and assignment operators are
* allowed which yield in shallow copy, not deep copy.
*/
class VectorSpaceThyra : public VectorSpace {
public:
/** @name Constructors / initializers */
//@{
/** \brief Construct to uninitialized.
*
* Postconditioins:<ul>
* <li><tt>this->thyra_vec().get() == NULL</tt>
* </ul>
*/
VectorSpaceThyra();
/** \brief Calls <tt>this->initialize()</tt>.
*/
VectorSpaceThyra(
const Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> > &thyra_vec_spc
,const inner_prod_ptr_t &inner_prod = Teuchos::null
);
/** \brief Initalize given a smart pointer to a <tt>Thyra::VetorSpace</tt> object.
*
* @param thyra_vec_spc [in] Smart pointer to Thyra vector <tt>this</tt> will adapt.
* @param inner_prod [in] Smart pointer to an inner product. If <tt>inner_prod.get()==NULL</tt>
* then a <tt>InnerProductThyra</tt> object will be used which will
* point to this.
*
* Preconditioins:<ul>
* <li><tt>thyra_vec_spc.get() != NULL</tt> (throw <tt>std::invalid_argument</tt>)
* </ul>
*
* Postconditioins:<ul>
* <li><tt>this->thyra_vec_spc().get() == thyra_vec_spc.get()</tt>
* <li>[<tt>inner_prod.get()!=NULL</tt>]
* <tt>this->inner_prod().get()==inner_prod.get()</tt>
* <li>[<tt>inner_prod.get()==NULL</tt>]
* <tt>dynamic_cast<const InnerProductThyra*>(this->inner_prod().get()).thyra_vec_spc().get()==thyra_vec_spc.get()</tt>
* </ul>
*/
void initialize(
const Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> > &thyra_vec_spc
,const inner_prod_ptr_t &inner_prod = Teuchos::null
);
/** \brief Set to uninitialized and return smart pointer to the internal <tt>Thyra::VectorSpaceBase<value_type> </tt> object.
*
* Postconditioins:<ul>
* <li><tt>this->thyra_vec_spc().get() == NULL</tt>
* </ul>
*/
Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> > set_uninitialized();
/** \brief Return a (converted) smart pointer to the internal smart pointer to the <tt>Thyra::VectorSpaceBase<value_type> </tt> object.
*
* If <tt>this->thyra_vec_spc().count() == 1</tt>, then <tt>this</tt>
* has sole ownership of the <tt>*this->thyra_vec_spc()</tt> object.
*/
const Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> >& thyra_vec_spc() const;
//@}
/** @name Overridden from VectorSpace */
//@{
/** \brief . */
space_ptr_t clone() const;
/** \brief . */
bool is_compatible(const VectorSpace& vec_spc ) const;
/** \brief . */
bool is_in_core() const;
/** \brief . */
index_type dim() const;
/** \brief . */
vec_mut_ptr_t create_member() const;
/** \brief . */
space_fcty_ptr_t small_vec_spc_fcty() const;
/** \brief . */
multi_vec_mut_ptr_t create_members(size_type num_vecs) const;
//@}
private:
#ifdef DOXYGEN_COMPILE
const Thyra::VectorSpaceBase<value_type> *thyra_vector_space;
#else
Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> > thyra_vec_spc_;
#endif
}; // end class VectorSpaceThyra
// ///////////////////////////////
// Inline functions
inline
const Teuchos::RCP<const Thyra::VectorSpaceBase<value_type> >&
VectorSpaceThyra::thyra_vec_spc() const
{
return thyra_vec_spc_;
}
} // end namespace AbstractLinAlgPack
#endif // ALAP_VECTOR_SPACE_Thyra_HPP
|