Hello,
I’m trying to get the coordinates for a RT space. I’ve tried the following:
mesh Th = square(1,1);
fespace RTm(Th, RT1);
int ndofRTmK = RTm.ndofK;
real[int] dofPmd(ndofRTmK);
  for(int i=0;i<ndofRTmK;i++){
   dofPmd(i) = RTm(0,i);
  }
  cout << dofPmd << "\n";
  RTm [tX, tY] = [x, y];
  real[int,int] coorddofPmd(ndofRTmK,2);
  for(int i= 0; i <ndofRTmK; i++){
   coorddofPmd(i,0) = tX[][i];
   coorddofPmd(i,1) = tY[][i];
  }
cout << coorddofPmd << "\n";
but the values are all wrong. Can anyone help?
             
            
              
            
           
          
            
              
                cmd  
              
                  
                    May 10, 2023,  7:43am
                   
                  2 
               
             
            
              I think you will need two vectors to get this:
  RTm [tx1, tx2] = [x, x];
  RTm [ty1, ty2] = [y, y];
 
            
              
            
           
          
            
              
                marchywka  
              
                  
                    May 10, 2023,  9:52am
                   
                  3 
               
             
            
              I’ve had problems with this but I guess you could put x into a scalar fespace
Although for better insight it may be best to create a simple varf on a small mesh
varf seedof([a,b],[va,vb],tgv=-1) = int2d(Th)(a*va)+int2d(Th)(tX*va)
+int2d(Th)(b*vb)+int2d(Th)(tY*vb);
matrix A=seedof(RTm,RTm);
cout<<A<<endl; cout.flush;
real[int] b =seedof(0,RTm);
cout<<b<<endl; cout.flush;