99 this->basis_ = new_basis;
112 this->basis_ = new_basis;
119 if (this->map_->Comm().NumProc() == 1 || !this->map_->DistributedGlobal()) {
120 v.Scale(1.0, *(this->coeff_[0]));
127 this->map_->RemoteIDList(1, &gid, &root, &lid);
128 if (this->map_->Comm().MyPID() == root) {
129 v.Scale(1.0, *(this->coeff_[lid]));
131 this->map_->Comm().Broadcast(v.Values(), v.MyLength(), root);
139 bool is_parallel = (this->map_->Comm().NumProc() > 1) &&
140 this->map_->DistributedGlobal();
148 v_local->PutScalar(0.0);
150 for (
int i=0; i<this->size(); i++) {
151 i_gid = this->map_->GID(i);
153 v_local->Multiply(nrm2[i_gid], *(this->coeff_[i]), *(this->coeff_[i]),
159 this->map_->Comm().SumAll(v_local->Values(), v.Values(), v.MyLength());
170 for (
int i=0; i<v.MyLength(); i++)
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
void computeVariance(Epetra_Vector &v) const
Compute variance.
void computeStandardDeviation(Epetra_Vector &v) const
Compute standard deviation.
void computeMean(Epetra_Vector &v) const
Compute mean.
void reset(const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm)
Reset to a new size.
EpetraVectorOrthogPoly()
Constructor with no basis.
ProductEpetraVector & operator=(const ProductEpetraVector &v)
Assignment.
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
virtual const Epetra_BlockMap & Map() const =0
A container class for products of Epetra_Vector's.
EpetraVectorOrthogPoly & operator=(const EpetraVectorOrthogPoly &v)
Assignment.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
Basis.
virtual ~EpetraVectorOrthogPoly()
Destructor.
A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
void reset(const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm)
Reset to a new basis.