Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
epetra
Stokhos_VectorOrthogPoly.hpp
Go to the documentation of this file.
1
// $Id$
2
// $Source$
3
// @HEADER
4
// ***********************************************************************
5
//
6
// Stokhos Package
7
// Copyright (2009) Sandia Corporation
8
//
9
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
10
// license for use of this work by or on behalf of the U.S. Government.
11
//
12
// Redistribution and use in source and binary forms, with or without
13
// modification, are permitted provided that the following conditions are
14
// met:
15
//
16
// 1. Redistributions of source code must retain the above copyright
17
// notice, this list of conditions and the following disclaimer.
18
//
19
// 2. Redistributions in binary form must reproduce the above copyright
20
// notice, this list of conditions and the following disclaimer in the
21
// documentation and/or other materials provided with the distribution.
22
//
23
// 3. Neither the name of the Corporation nor the names of the
24
// contributors may be used to endorse or promote products derived from
25
// this software without specific prior written permission.
26
//
27
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
28
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
31
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
34
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
//
39
// Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
40
//
41
// ***********************************************************************
42
// @HEADER
43
44
#ifndef STOKHOS_VECTORORTHOGPOLY_HPP
45
#define STOKHOS_VECTORORTHOGPOLY_HPP
46
47
#include "
Stokhos_ProductContainer.hpp
"
48
#include "
Stokhos_OrthogPolyBasis.hpp
"
49
50
namespace
Stokhos
{
51
57
template
<
typename
coeff_type>
58
class
VectorOrthogPoly
:
public
virtual
ProductContainer
<coeff_type> {
59
public
:
60
62
typedef
typename
ProductContainer<coeff_type>::traits_type
traits_type
;
63
65
typedef
typename
ProductContainer<coeff_type>::value_type
value_type
;
66
68
typedef
typename
ProductContainer<coeff_type>::ordinal_type
ordinal_type
;
69
71
75
VectorOrthogPoly
();
76
81
VectorOrthogPoly
(
82
const
Teuchos::RCP<
const
Stokhos::OrthogPolyBasis<ordinal_type, value_type>
>&
basis
,
83
const
Teuchos::RCP<const Epetra_BlockMap>&
map
);
84
90
VectorOrthogPoly
(
91
const
Teuchos::RCP<
const
Stokhos::OrthogPolyBasis<ordinal_type, value_type>
>&
basis
,
92
const
Teuchos::RCP<const Epetra_BlockMap>&
map
,
93
const
typename
traits_type::cloner_type& cloner);
94
96
99
VectorOrthogPoly
(
const
VectorOrthogPoly
&);
100
102
virtual
~VectorOrthogPoly
();
103
105
108
VectorOrthogPoly
&
operator=
(
const
VectorOrthogPoly
&);
109
111
114
void
reset
(
115
const
Teuchos::RCP<
const
Stokhos::OrthogPolyBasis<ordinal_type, value_type>
>& new_basis,
116
const
Teuchos::RCP<const Epetra_BlockMap>& new_map,
117
const
typename
traits_type::cloner_type& cloner);
118
120
Teuchos::RCP<const Stokhos::OrthogPolyBasis<ordinal_type, value_type> >
121
basis
()
const
;
122
124
coeff_type&
term
(
ordinal_type
dimension,
ordinal_type
order);
125
127
const
coeff_type&
term
(
ordinal_type
dimension,
ordinal_type
order)
const
;
128
130
133
void
evaluate
(
const
Teuchos::Array<value_type>& basis_values,
134
coeff_type& result)
const
;
135
137
void
sumIntoAllTerms
(
const
value_type
& weight,
138
const
Teuchos::Array<value_type>& basis_values,
139
const
Teuchos::Array<value_type>& basis_norms,
140
const
coeff_type& vec);
141
143
std::ostream&
print
(std::ostream& os)
const
;
144
145
protected
:
146
148
Teuchos::RCP<const Stokhos::OrthogPolyBasis<ordinal_type,value_type> >
basis_
;
149
150
};
// class VectorOrthogPoly
151
152
template
<
typename
coeff_type>
153
std::ostream&
operator <<
(std::ostream& os,
154
const
VectorOrthogPoly<coeff_type>
& vec) {
155
return
vec.
print
(os);
156
}
157
158
}
// end namespace Stokhos
159
160
// include template definitions
161
#include "
Stokhos_VectorOrthogPolyImp.hpp
"
162
163
#endif
// STOKHOS_VECTORORTHOGPOLY_HPP
Stokhos_OrthogPolyBasis.hpp
Stokhos_ProductContainer.hpp
Stokhos_VectorOrthogPolyImp.hpp
Stokhos::OrthogPolyBasis
Abstract base class for multivariate orthogonal polynomials.
Definition
Stokhos_OrthogPolyBasis.hpp:74
Stokhos::ProductContainer::ProductContainer
ProductContainer()
Default constructor.
Definition
Stokhos_ProductContainerImp.hpp:44
Stokhos::ProductContainer::value_type
traits_type::value_type value_type
Typename of values.
Definition
Stokhos_ProductContainer.hpp:68
Stokhos::ProductContainer::ordinal_type
traits_type::ordinal_type ordinal_type
Typename of ordinals.
Definition
Stokhos_ProductContainer.hpp:71
Stokhos::ProductContainer::map
Teuchos::RCP< const Epetra_BlockMap > map() const
Return container map.
Definition
Stokhos_ProductContainerImp.hpp:147
Stokhos::ProductContainer::traits_type
Stokhos::ProductContainerTraits< coeff_type > traits_type
Typename of traits.
Definition
Stokhos_ProductContainer.hpp:65
Stokhos::VectorOrthogPoly
A container class storing an orthogonal polynomial whose coefficients are vectors,...
Definition
Stokhos_VectorOrthogPoly.hpp:58
Stokhos::VectorOrthogPoly::basis
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis() const
Get basis.
Definition
Stokhos_VectorOrthogPolyImp.hpp:114
Stokhos::VectorOrthogPoly::operator=
VectorOrthogPoly & operator=(const VectorOrthogPoly &)
Assignment.
Definition
Stokhos_VectorOrthogPolyImp.hpp:90
Stokhos::VectorOrthogPoly::sumIntoAllTerms
void sumIntoAllTerms(const value_type &weight, const Teuchos::Array< value_type > &basis_values, const Teuchos::Array< value_type > &basis_norms, const coeff_type &vec)
Evaluate polynomial at supplied basis values.
Definition
Stokhos_VectorOrthogPolyImp.hpp:162
Stokhos::VectorOrthogPoly::ordinal_type
ProductContainer< coeff_type >::ordinal_type ordinal_type
Typename of ordinals.
Definition
Stokhos_VectorOrthogPoly.hpp:68
Stokhos::VectorOrthogPoly::~VectorOrthogPoly
virtual ~VectorOrthogPoly()
Destructor.
Definition
Stokhos_VectorOrthogPolyImp.hpp:83
Stokhos::VectorOrthogPoly::print
std::ostream & print(std::ostream &os) const
Print polynomial.
Definition
Stokhos_VectorOrthogPolyImp.hpp:180
Stokhos::VectorOrthogPoly::reset
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, const Teuchos::RCP< const Epetra_BlockMap > &new_map, const typename traits_type::cloner_type &cloner)
Reset to a new basis.
Definition
Stokhos_VectorOrthogPolyImp.hpp:102
Stokhos::VectorOrthogPoly::traits_type
ProductContainer< coeff_type >::traits_type traits_type
Typename of traits.
Definition
Stokhos_VectorOrthogPoly.hpp:62
Stokhos::VectorOrthogPoly::value_type
ProductContainer< coeff_type >::value_type value_type
Typename of values.
Definition
Stokhos_VectorOrthogPoly.hpp:65
Stokhos::VectorOrthogPoly::basis_
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
Basis.
Definition
Stokhos_VectorOrthogPoly.hpp:148
Stokhos::VectorOrthogPoly::VectorOrthogPoly
VectorOrthogPoly()
Constructor with no basis.
Definition
Stokhos_VectorOrthogPolyImp.hpp:46
Stokhos::VectorOrthogPoly::evaluate
void evaluate(const Teuchos::Array< value_type > &basis_values, coeff_type &result) const
Evaluate polynomial at supplied basis values.
Definition
Stokhos_VectorOrthogPolyImp.hpp:151
Stokhos::VectorOrthogPoly::term
coeff_type & term(ordinal_type dimension, ordinal_type order)
Get term for dimension dimension and order order.
Definition
Stokhos_VectorOrthogPolyImp.hpp:123
Stokhos
Top-level namespace for Stokhos classes and functions.
Definition
Stokhos_AbstractPreconditionerFactory.hpp:48
Stokhos::operator<<
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
Definition
Stokhos_ProductContainer.hpp:184
Generated by
1.17.0