131 this->basis_ = new_basis;
144 this->basis_ = new_basis;
151 if (this->map_->Comm().NumProc() == 1 || !this->map_->DistributedGlobal()) {
152 v.Scale(1.0, *(this->coeff_[0]));
159 this->map_->RemoteIDList(1, &gid, &root, &lid);
160 if (this->map_->Comm().MyPID() == root) {
161 v.Scale(1.0, *(this->coeff_[lid]));
163 this->map_->Comm().Broadcast(v.Values(), v.MyLength(), root);
171 bool is_parallel = (this->map_->Comm().NumProc() > 1) &&
172 this->map_->DistributedGlobal();
180 v_local->PutScalar(0.0);
182 for (
int i=0; i<this->size(); i++) {
183 i_gid = this->map_->GID(i);
185 v_local->Multiply(nrm2[i_gid], *(this->coeff_[i]), *(this->coeff_[i]),
191 this->map_->Comm().SumAll(v_local->Values(), v.Values(), v.MyLength());
202 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.