Startpage >> Main >> RieszRep

Riesz Rep

This piece of code sets up the Riesz Representation of RHS . Click to go back

How the code goes...

Z is the Riesz Representation of \(L: V\to \mathbb{R}\) when

$$(Z,v)_V = L(v),\quad \forall v\in V$$

Compute the matrix of the scalar product

varf Vhscalarproduct(xi,w)=int3d(Th3)(dx(xi)*dx(w)+dy(xi)*dy(w)+dz(xi)*dz(w))+int3d(Th3)(xi*w*invvol);
//
// Scalar product matrix 
//                        
matrix Ascalarproduct=Vhscalarproduct(Vh,Vh);
set(Ascalarproduct,solver=sparsesolver);

Compute the right hand side

//
// RHS is   L(V)=int_O(fh*V)+int_{border 100} (qh*V)
//
// Var form to obtain RHS
//
varf r(unused,w)=int3d(Th3)(fh*w )+int2d(Th3,100)(qh*w );
//
// Vector rhs
//
Vh rhs;
rhs[]=r(0,Vh);// right hand side matrix

Finally invert and obtain the vector Z

/
// computation of Riesz representation for RHS of original problem
//
Vh Rieszf;
Rieszf[]=Ascalarproduct^-1*rhs[];
cout<<"Riesz representation of rhs made "<<endl;

Click to go back

Page last modified on July 01, 2014, at 05:57 PM