xref: /libCEED/tests/t521-operator-f.f90 (revision 52d6035f927efec34920a771ebaa7a03e4ffa966)
1*52d6035fSJeremy L Thompson!-----------------------------------------------------------------------
2*52d6035fSJeremy L Thompson!
3*52d6035fSJeremy L Thompson! Header with common subroutine
4*52d6035fSJeremy L Thompson!
5*52d6035fSJeremy L Thompson      include 't310-basis-f.h'
6*52d6035fSJeremy L Thompson!-----------------------------------------------------------------------
7*52d6035fSJeremy L Thompson      subroutine setup(ctx,q,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,&
8*52d6035fSJeremy L Thompson&           u15,u16,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,ierr)
9*52d6035fSJeremy L Thompson      real*8 ctx
10*52d6035fSJeremy L Thompson      real*8 u1(1)
11*52d6035fSJeremy L Thompson      real*8 u2(1)
12*52d6035fSJeremy L Thompson      real*8 v1(1)
13*52d6035fSJeremy L Thompson      integer q,ierr
14*52d6035fSJeremy L Thompson
15*52d6035fSJeremy L Thompson      do i=1,q
16*52d6035fSJeremy L Thompson        v1(i)=u1(i)*(u2(i+q*0)*u2(i+q*3)-u2(i+q*1)*u2(i+q*2))
17*52d6035fSJeremy L Thompson      enddo
18*52d6035fSJeremy L Thompson
19*52d6035fSJeremy L Thompson      ierr=0
20*52d6035fSJeremy L Thompson      end
21*52d6035fSJeremy L Thompson!-----------------------------------------------------------------------
22*52d6035fSJeremy L Thompson      subroutine mass(ctx,q,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,&
23*52d6035fSJeremy L Thompson&           u15,u16,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,ierr)
24*52d6035fSJeremy L Thompson      real*8 ctx
25*52d6035fSJeremy L Thompson      real*8 u1(1)
26*52d6035fSJeremy L Thompson      real*8 u2(1)
27*52d6035fSJeremy L Thompson      real*8 v1(1)
28*52d6035fSJeremy L Thompson      integer q,ierr
29*52d6035fSJeremy L Thompson
30*52d6035fSJeremy L Thompson      do i=1,q
31*52d6035fSJeremy L Thompson        v1(i)=u2(i)*u1(i)
32*52d6035fSJeremy L Thompson      enddo
33*52d6035fSJeremy L Thompson
34*52d6035fSJeremy L Thompson      ierr=0
35*52d6035fSJeremy L Thompson      end
36*52d6035fSJeremy L Thompson!-----------------------------------------------------------------------
37*52d6035fSJeremy L Thompson      program test
38*52d6035fSJeremy L Thompson
39*52d6035fSJeremy L Thompson      include 'ceedf.h'
40*52d6035fSJeremy L Thompson
41*52d6035fSJeremy L Thompson      integer ceed,err,i,j,k
42*52d6035fSJeremy L Thompson      integer erestrictxtet,erestrictutet,erestrictxitet,erestrictuitet,&
43*52d6035fSJeremy L Thompson&             erestrictxhex,erestrictuhex,erestrictxihex,erestrictuihex
44*52d6035fSJeremy L Thompson      integer bxtet,butet,bxhex,buhex
45*52d6035fSJeremy L Thompson      integer qf_setuptet,qf_masstet,qf_setuphex,qf_masshex
46*52d6035fSJeremy L Thompson      integer op_setuptet,op_masstet,op_setuphex,op_masshex,op_setup,op_mass
47*52d6035fSJeremy L Thompson      integer qdatatet,qdatahex,x,u,v
48*52d6035fSJeremy L Thompson      integer nelemtet,nelemhex,ptet,phex,qtet,qhex,d
49*52d6035fSJeremy L Thompson      integer row,col,offset
50*52d6035fSJeremy L Thompson      parameter(nelemtet=6)
51*52d6035fSJeremy L Thompson      parameter(ptet=6)
52*52d6035fSJeremy L Thompson      parameter(qtet=4)
53*52d6035fSJeremy L Thompson      parameter(nelemhex=6)
54*52d6035fSJeremy L Thompson      parameter(phex=3)
55*52d6035fSJeremy L Thompson      parameter(qhex=4)
56*52d6035fSJeremy L Thompson      parameter(d=2)
57*52d6035fSJeremy L Thompson      integer ndofs,nqptstet,nqptshex,nqpts,nx,ny,nxtet,nytet,nxhex
58*52d6035fSJeremy L Thompson      parameter(nx=3)
59*52d6035fSJeremy L Thompson      parameter(ny=3)
60*52d6035fSJeremy L Thompson      parameter(nxtet=3)
61*52d6035fSJeremy L Thompson      parameter(nytet=1)
62*52d6035fSJeremy L Thompson      parameter(nxhex=3)
63*52d6035fSJeremy L Thompson      parameter(ndofs=(nx*2+1)*(ny*2+1))
64*52d6035fSJeremy L Thompson      parameter(nqptstet=nelemtet*qtet)
65*52d6035fSJeremy L Thompson      parameter(nqptshex=nelemhex*qhex*qhex)
66*52d6035fSJeremy L Thompson      parameter(nqpts=nqptstet+nqptshex)
67*52d6035fSJeremy L Thompson      integer indxtet(nelemtet*ptet),indxhex(nelemhex*phex*phex)
68*52d6035fSJeremy L Thompson      real*8 arrx(d*ndofs)
69*52d6035fSJeremy L Thompson      integer*8 voffset
70*52d6035fSJeremy L Thompson
71*52d6035fSJeremy L Thompson      real*8 qref(d*qtet)
72*52d6035fSJeremy L Thompson      real*8 qweight(qtet)
73*52d6035fSJeremy L Thompson      real*8 interp(ptet*qtet)
74*52d6035fSJeremy L Thompson      real*8 grad(d*ptet*qtet)
75*52d6035fSJeremy L Thompson
76*52d6035fSJeremy L Thompson      real*8 hv(ndofs)
77*52d6035fSJeremy L Thompson      real*8 total
78*52d6035fSJeremy L Thompson
79*52d6035fSJeremy L Thompson      character arg*32
80*52d6035fSJeremy L Thompson
81*52d6035fSJeremy L Thompson      external setup,mass
82*52d6035fSJeremy L Thompson
83*52d6035fSJeremy L Thompson      call getarg(1,arg)
84*52d6035fSJeremy L Thompson
85*52d6035fSJeremy L Thompson      call ceedinit(trim(arg)//char(0),ceed,err)
86*52d6035fSJeremy L Thompson
87*52d6035fSJeremy L Thompson! DoF Coordinates
88*52d6035fSJeremy L Thompson      do i=0,ny*2
89*52d6035fSJeremy L Thompson        do j=0,nx*2
90*52d6035fSJeremy L Thompson          arrx(i+j*(ny*2+1)+0*ndofs+1)=1.d0*i/(2*ny)
91*52d6035fSJeremy L Thompson          arrx(i+j*(ny*2+1)+1*ndofs+1)=1.d0*j/(2*nx)
92*52d6035fSJeremy L Thompson        enddo
93*52d6035fSJeremy L Thompson      enddo
94*52d6035fSJeremy L Thompson
95*52d6035fSJeremy L Thompson      call ceedvectorcreate(ceed,d*ndofs,x,err)
96*52d6035fSJeremy L Thompson      call ceedvectorsetarray(x,ceed_mem_host,ceed_use_pointer,arrx,err)
97*52d6035fSJeremy L Thompson
98*52d6035fSJeremy L Thompson! Qdata Vectors
99*52d6035fSJeremy L Thompson      call ceedvectorcreate(ceed,nqptstet,qdatatet,err)
100*52d6035fSJeremy L Thompson      call ceedvectorcreate(ceed,nqptshex,qdatahex,err)
101*52d6035fSJeremy L Thompson
102*52d6035fSJeremy L Thompson! Tet Elements
103*52d6035fSJeremy L Thompson      do i=0,2
104*52d6035fSJeremy L Thompson        col=mod(i,nx)
105*52d6035fSJeremy L Thompson        row=i/nx
106*52d6035fSJeremy L Thompson        offset=col*2+row*(nx*2+1)*2
107*52d6035fSJeremy L Thompson
108*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+1)=2+offset
109*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+2)=9+offset
110*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+3)=16+offset
111*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+4)=1+offset
112*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+5)=8+offset
113*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+6)=0+offset
114*52d6035fSJeremy L Thompson
115*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+7)=14+offset
116*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+8)=7+offset
117*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+9)=0+offset
118*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+10)=15+offset
119*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+11)=8+offset
120*52d6035fSJeremy L Thompson        indxtet(i*2*ptet+12)=16+offset
121*52d6035fSJeremy L Thompson      enddo
122*52d6035fSJeremy L Thompson
123*52d6035fSJeremy L Thompson! -- Restrictions
124*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreate(ceed,nelemtet,ptet,ndofs,d,ceed_mem_host,&
125*52d6035fSJeremy L Thompson     & ceed_use_pointer,indxtet,erestrictxtet,err)
126*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreateidentity(ceed,nelemtet,ptet,nelemtet*ptet,&
127*52d6035fSJeremy L Thompson     & d,erestrictxitet,err)
128*52d6035fSJeremy L Thompson
129*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreate(ceed,nelemtet,ptet,ndofs,1,ceed_mem_host,&
130*52d6035fSJeremy L Thompson     & ceed_use_pointer,indxtet,erestrictutet,err)
131*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreateidentity(ceed,nelemtet,qtet,nqptstet,1,&
132*52d6035fSJeremy L Thompson     & erestrictuitet,err)
133*52d6035fSJeremy L Thompson
134*52d6035fSJeremy L Thompson! -- Bases
135*52d6035fSJeremy L Thompson      call buildmats(qref,qweight,interp,grad)
136*52d6035fSJeremy L Thompson      call ceedbasiscreateh1(ceed,ceed_triangle,d,ptet,qtet,interp,grad,qref,&
137*52d6035fSJeremy L Thompson     & qweight,bxtet,err)
138*52d6035fSJeremy L Thompson      call buildmats(qref,qweight,interp,grad)
139*52d6035fSJeremy L Thompson      call ceedbasiscreateh1(ceed,ceed_triangle,1,ptet,qtet,interp,grad,qref,&
140*52d6035fSJeremy L Thompson     & qweight,butet,err)
141*52d6035fSJeremy L Thompson
142*52d6035fSJeremy L Thompson! -- QFunctions
143*52d6035fSJeremy L Thompson      call ceedqfunctioncreateinterior(ceed,1,setup,&
144*52d6035fSJeremy L Thompson     &__FILE__&
145*52d6035fSJeremy L Thompson     &//':setup'//char(0),qf_setuptet,err)
146*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_setuptet,'_weight',1,ceed_eval_weight,err)
147*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_setuptet,'dx',d,ceed_eval_grad,err)
148*52d6035fSJeremy L Thompson      call ceedqfunctionaddoutput(qf_setuptet,'rho',1,ceed_eval_none,err)
149*52d6035fSJeremy L Thompson
150*52d6035fSJeremy L Thompson      call ceedqfunctioncreateinterior(ceed,1,mass,&
151*52d6035fSJeremy L Thompson     &__FILE__&
152*52d6035fSJeremy L Thompson     &//':mass'//char(0),qf_masstet,err)
153*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_masstet,'rho',1,ceed_eval_none,err)
154*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_masstet,'u',1,ceed_eval_interp,err)
155*52d6035fSJeremy L Thompson      call ceedqfunctionaddoutput(qf_masstet,'v',1,ceed_eval_interp,err)
156*52d6035fSJeremy L Thompson
157*52d6035fSJeremy L Thompson! -- Operators
158*52d6035fSJeremy L Thompson! ---- Setup Tet
159*52d6035fSJeremy L Thompson      call ceedoperatorcreate(ceed,qf_setuptet,ceed_null,ceed_null,op_setuptet,&
160*52d6035fSJeremy L Thompson     & err)
161*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuptet,'_weight',erestrictxitet,&
162*52d6035fSJeremy L Thompson     & ceed_notranspose,bxtet,ceed_vector_none,err)
163*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuptet,'dx',erestrictxtet,&
164*52d6035fSJeremy L Thompson     & ceed_notranspose,bxtet,ceed_vector_active,err)
165*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuptet,'rho',erestrictuitet,&
166*52d6035fSJeremy L Thompson     & ceed_notranspose,ceed_basis_collocated,qdatatet,err)
167*52d6035fSJeremy L Thompson! ---- Mass Tet
168*52d6035fSJeremy L Thompson      call ceedoperatorcreate(ceed,qf_masstet,ceed_null,ceed_null,op_masstet,&
169*52d6035fSJeremy L Thompson     & err)
170*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masstet,'rho',erestrictuitet,&
171*52d6035fSJeremy L Thompson     & ceed_notranspose,ceed_basis_collocated,qdatatet,err)
172*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masstet,'u',erestrictutet,&
173*52d6035fSJeremy L Thompson     & ceed_notranspose,butet,ceed_vector_active,err)
174*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masstet,'v',erestrictutet,&
175*52d6035fSJeremy L Thompson     & ceed_notranspose,butet,ceed_vector_active,err)
176*52d6035fSJeremy L Thompson
177*52d6035fSJeremy L Thompson! Hex Elements
178*52d6035fSJeremy L Thompson      do i=0,nelemhex-1
179*52d6035fSJeremy L Thompson        col=mod(i,nx)
180*52d6035fSJeremy L Thompson        row=i/nx
181*52d6035fSJeremy L Thompson        offset=(nxtet*2+1)*(nytet*2)*(1+row)+col*2
182*52d6035fSJeremy L Thompson        do j=0,phex-1
183*52d6035fSJeremy L Thompson          do k=0,phex-1
184*52d6035fSJeremy L Thompson            indxhex(phex*(phex*i+k)+j+1)=offset+k*(nxhex*2+1)+j
185*52d6035fSJeremy L Thompson          enddo
186*52d6035fSJeremy L Thompson        enddo
187*52d6035fSJeremy L Thompson      enddo
188*52d6035fSJeremy L Thompson
189*52d6035fSJeremy L Thompson! -- Restrictions
190*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreate(ceed,nelemhex,phex*phex,ndofs,d,&
191*52d6035fSJeremy L Thompson     & ceed_mem_host,ceed_use_pointer,indxhex,erestrictxhex,err)
192*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreateidentity(ceed,nelemhex,phex*phex,&
193*52d6035fSJeremy L Thompson     & nelemhex*phex*phex,d,erestrictxihex,err)
194*52d6035fSJeremy L Thompson
195*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreate(ceed,nelemhex,phex*phex,ndofs,1,&
196*52d6035fSJeremy L Thompson     & ceed_mem_host,ceed_use_pointer,indxhex,erestrictuhex,err)
197*52d6035fSJeremy L Thompson      call ceedelemrestrictioncreateidentity(ceed,nelemhex,qhex*qhex,nqptshex,&
198*52d6035fSJeremy L Thompson     & 1,erestrictuihex,err)
199*52d6035fSJeremy L Thompson
200*52d6035fSJeremy L Thompson! -- Bases
201*52d6035fSJeremy L Thompson      call ceedbasiscreatetensorh1lagrange(ceed,d,d,phex,qhex,ceed_gauss,&
202*52d6035fSJeremy L Thompson     & bxhex,err)
203*52d6035fSJeremy L Thompson      call ceedbasiscreatetensorh1lagrange(ceed,d,1,phex,qhex,ceed_gauss,&
204*52d6035fSJeremy L Thompson     & buhex,err)
205*52d6035fSJeremy L Thompson
206*52d6035fSJeremy L Thompson! -- QFunctions
207*52d6035fSJeremy L Thompson      call ceedqfunctioncreateinterior(ceed,1,setup,&
208*52d6035fSJeremy L Thompson     &__FILE__&
209*52d6035fSJeremy L Thompson     &//':setup'//char(0),qf_setuphex,err)
210*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_setuphex,'_weight',1,ceed_eval_weight,err)
211*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_setuphex,'dx',d,ceed_eval_grad,err)
212*52d6035fSJeremy L Thompson      call ceedqfunctionaddoutput(qf_setuphex,'rho',1,ceed_eval_none,err)
213*52d6035fSJeremy L Thompson
214*52d6035fSJeremy L Thompson      call ceedqfunctioncreateinterior(ceed,1,mass,&
215*52d6035fSJeremy L Thompson     &__FILE__&
216*52d6035fSJeremy L Thompson     &//':mass'//char(0),qf_masshex,err)
217*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_masshex,'rho',1,ceed_eval_none,err)
218*52d6035fSJeremy L Thompson      call ceedqfunctionaddinput(qf_masshex,'u',1,ceed_eval_interp,err)
219*52d6035fSJeremy L Thompson      call ceedqfunctionaddoutput(qf_masshex,'v',1,ceed_eval_interp,err)
220*52d6035fSJeremy L Thompson
221*52d6035fSJeremy L Thompson! -- Operators
222*52d6035fSJeremy L Thompson! ---- Setup Hex
223*52d6035fSJeremy L Thompson      call ceedoperatorcreate(ceed,qf_setuphex,ceed_null,ceed_null,op_setuphex,&
224*52d6035fSJeremy L Thompson     & err)
225*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuphex,'_weight',erestrictxihex,&
226*52d6035fSJeremy L Thompson     & ceed_notranspose,bxhex,ceed_vector_none,err)
227*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuphex,'dx',erestrictxhex,&
228*52d6035fSJeremy L Thompson     & ceed_notranspose,bxhex,ceed_vector_active,err)
229*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_setuphex,'rho',erestrictuihex,&
230*52d6035fSJeremy L Thompson     & ceed_notranspose,ceed_basis_collocated,qdatahex,err)
231*52d6035fSJeremy L Thompson! ---- Mass Hex
232*52d6035fSJeremy L Thompson      call ceedoperatorcreate(ceed,qf_masshex,ceed_null,ceed_null,op_masshex,&
233*52d6035fSJeremy L Thompson     & err)
234*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masshex,'rho',erestrictuihex,&
235*52d6035fSJeremy L Thompson     & ceed_notranspose,ceed_basis_collocated,qdatahex,err)
236*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masshex,'u',erestrictuhex,&
237*52d6035fSJeremy L Thompson     & ceed_notranspose,buhex,ceed_vector_active,err)
238*52d6035fSJeremy L Thompson      call ceedoperatorsetfield(op_masshex,'v',erestrictuhex,&
239*52d6035fSJeremy L Thompson     & ceed_notranspose,buhex,ceed_vector_active,err)
240*52d6035fSJeremy L Thompson
241*52d6035fSJeremy L Thompson! Composite Operators
242*52d6035fSJeremy L Thompson      call ceedcompositeoperatorcreate(ceed,op_setup,err)
243*52d6035fSJeremy L Thompson      call ceedcompositeoperatoraddsub(op_setup,op_setuptet,err)
244*52d6035fSJeremy L Thompson      call ceedcompositeoperatoraddsub(op_setup,op_setuphex,err)
245*52d6035fSJeremy L Thompson
246*52d6035fSJeremy L Thompson      call ceedcompositeoperatorcreate(ceed,op_mass,err)
247*52d6035fSJeremy L Thompson      call ceedcompositeoperatoraddsub(op_mass,op_masstet,err)
248*52d6035fSJeremy L Thompson      call ceedcompositeoperatoraddsub(op_mass,op_masshex,err)
249*52d6035fSJeremy L Thompson
250*52d6035fSJeremy L Thompson! Apply Setup Operator
251*52d6035fSJeremy L Thompson      call ceedoperatorapply(op_setup,x,ceed_null,ceed_request_immediate,err)
252*52d6035fSJeremy L Thompson
253*52d6035fSJeremy L Thompson! Apply Mass Operator
254*52d6035fSJeremy L Thompson      call ceedvectorcreate(ceed,ndofs,u,err)
255*52d6035fSJeremy L Thompson      call ceedvectorsetvalue(u,1.d0,err)
256*52d6035fSJeremy L Thompson      call ceedvectorcreate(ceed,ndofs,v,err)
257*52d6035fSJeremy L Thompson
258*52d6035fSJeremy L Thompson      call ceedoperatorapply(op_mass,u,v,ceed_request_immediate,err)
259*52d6035fSJeremy L Thompson
260*52d6035fSJeremy L Thompson! Check Output
261*52d6035fSJeremy L Thompson      call ceedvectorgetarrayread(v,ceed_mem_host,hv,voffset,err)
262*52d6035fSJeremy L Thompson      total=0.
263*52d6035fSJeremy L Thompson      do i=1,ndofs
264*52d6035fSJeremy L Thompson        total=total+hv(voffset+i)
265*52d6035fSJeremy L Thompson      enddo
266*52d6035fSJeremy L Thompson      if (abs(total-1.)>1.0d-10) then
267*52d6035fSJeremy L Thompson        write(*,*) 'Computed Area: ',total,' != True Area: 1.0'
268*52d6035fSJeremy L Thompson      endif
269*52d6035fSJeremy L Thompson      call ceedvectorrestorearrayread(v,hv,voffset,err)
270*52d6035fSJeremy L Thompson
271*52d6035fSJeremy L Thompson! Cleanup
272*52d6035fSJeremy L Thompson      call ceedqfunctiondestroy(qf_setuptet,err)
273*52d6035fSJeremy L Thompson      call ceedqfunctiondestroy(qf_masstet,err)
274*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_setuptet,err)
275*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_masstet,err)
276*52d6035fSJeremy L Thompson      call ceedqfunctiondestroy(qf_setuphex,err)
277*52d6035fSJeremy L Thompson      call ceedqfunctiondestroy(qf_masshex,err)
278*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_setuphex,err)
279*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_masshex,err)
280*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_setup,err)
281*52d6035fSJeremy L Thompson      call ceedoperatordestroy(op_mass,err)
282*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictutet,err)
283*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictxtet,err)
284*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictuitet,err)
285*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictxitet,err)
286*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictuhex,err)
287*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictxhex,err)
288*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictuihex,err)
289*52d6035fSJeremy L Thompson      call ceedelemrestrictiondestroy(erestrictxihex,err)
290*52d6035fSJeremy L Thompson      call ceedbasisdestroy(butet,err)
291*52d6035fSJeremy L Thompson      call ceedbasisdestroy(bxtet,err)
292*52d6035fSJeremy L Thompson      call ceedbasisdestroy(buhex,err)
293*52d6035fSJeremy L Thompson      call ceedbasisdestroy(bxhex,err)
294*52d6035fSJeremy L Thompson      call ceedvectordestroy(x,err)
295*52d6035fSJeremy L Thompson      call ceedvectordestroy(u,err)
296*52d6035fSJeremy L Thompson      call ceedvectordestroy(v,err)
297*52d6035fSJeremy L Thompson      call ceedvectordestroy(qdatatet,err)
298*52d6035fSJeremy L Thompson      call ceedvectordestroy(qdatahex,err)
299*52d6035fSJeremy L Thompson      call ceeddestroy(ceed,err)
300*52d6035fSJeremy L Thompson      end
301*52d6035fSJeremy L Thompson!-----------------------------------------------------------------------
302