63 #include "EpetraExt_BlockUtility.h" 64 #include "EpetraExt_RowMatrixOut.h" 79 bool full_expansion =
false;
87 Cijk = basis->computeTripleProductTensor();
89 Cijk = basis->computeLinearTripleProductTensor();
92 parallelParams.
set(
"Number of Spatial Processors", numProc);
105 int gid = determRowMap->
GID(row);
109 int gid = determRowMap->
GID(row);
110 int indices[2] = {gid-1,gid+1};
116 params->
set(
"Scale Operator by Inverse Basis Norms",
false);
117 params->
set(
"Include Mean",
true);
118 params->
set(
"Only Use Linear Terms",
false);
124 for(
int i=0; i<W_sg_blocks->
size(); i++) {
141 op.setupOperator(W_sg_blocks);
144 full_op.PutScalar(0.0);
150 for(
int i=0;i<100;i++) {
168 full_op.
Apply(*x_vec_blocked,*f_vec_blocked);
169 op.Apply(*x_vec_inter,*f_vec_inter);
176 double true_norm = 0.0;
177 f_vec_blk_inter->
NormInf(&true_norm);
178 f_vec_blk_inter->
Update(-1.0,*f_vec_inter,1.0);
181 out <<
"rel error = " <<
error/true_norm <<
" ( " << true_norm <<
" ), ";
182 result &= (
error/true_norm < 1e-14);
ordinal_type size() const
Return size.
void setCoeffPtr(ordinal_type i, const Teuchos::RCP< coeff_type > &c)
Set coefficient i to c.
A container class storing an orthogonal polynomial whose coefficients are vectors,...
virtual void setupOperator(const Teuchos::RCP< Stokhos::EpetraOperatorOrthogPoly > &poly)
Setup operator.
TEUCHOS_UNIT_TEST(interlaced_op, test)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< EpetraExt::BlockVector > getBlockVector()
Get block vector.
int PutScalar(double ScalarConstant)
int NormInf(double *Result) const
int InsertGlobalIndices(int_type GlobalRow, int NumIndices, int_type *Indices)
virtual int Apply(const Epetra_MultiVector &Input, Epetra_MultiVector &Result) const
Wrap Apply() to add a timer.
int PutScalar(double ScalarConstant)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< const EpetraExt::MultiComm > getMultiComm() const
Get global comm.
A container class storing an orthogonal polynomial whose coefficients are vectors,...
int NumMyElements() const
An Epetra operator representing the block stochastic Galerkin operator generated by fully assembling ...
Teuchos::RCP< const Stokhos::CompletePolynomialBasis< int, double > > buildBasis(int num_KL, int porder)
int Update(double ScalarA, const Epetra_MultiVector &A, double ScalarThis)
virtual int NumProc() const=0
TEST_ASSERT(castedDep1->getValuesAndValidators().size()==2)
Teuchos::RCP< const Epetra_BlockMap > getStochasticRowMap() const
Get stochastic row map.
Teuchos::RCP< const EpetraExt::MultiComm > getMultiComm() const
Get global comm.
An Epetra operator representing the block stochastic Galerkin operator generated by fully assembling ...
static void copyToInterlacedVector(const Stokhos::EpetraVectorOrthogPoly &x_sg, Epetra_Vector &x)