-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy patht302-basis-f.f90
69 lines (60 loc) · 1.98 KB
/
t302-basis-f.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
!-----------------------------------------------------------------------
program test
implicit none
include 'ceedf.h'
integer ceed,err,i,j
integer b
real*8 collograd1d(16), collograd1d2(36)
character arg*32
call getarg(1,arg)
call ceedinit(trim(arg)//char(0),ceed,err)
! Already collocated, GetCollocatedGrad will return grad1d
call ceedbasiscreatetensorh1lagrange(ceed,1,1,4,4,ceed_gauss_lobatto,b,&
& err)
call ceedbasisgetcollocatedgrad(b,collograd1d,err)
do i=1,16
if (abs(collograd1d(i))<1.0D-14) then
collograd1d(i) = 0
endif
enddo
do i=0,3
write(*,'(A,I1,A,F12.8,F12.8,F12.8,F12.8,F12.8,F12.8)')&
& 'collograd[',i,']:',(collograd1d(j+4*i),j=1,4)
call flush(6)
enddo
call ceedbasisdestroy(b,err)
! Q = P, not already collocated
call ceedbasiscreatetensorh1lagrange(ceed,1,1,4,4,ceed_gauss,b,err)
call ceedbasisgetcollocatedgrad(b,collograd1d,err)
do i=1,16
if (abs(collograd1d(i))<1.0D-14) then
! LCOV_EXCL_START
collograd1d(i) = 0
! LCOV_EXCL_STOP
endif
enddo
do i=0,3
write(*,'(A,I1,A,F12.8,F12.8,F12.8,F12.8,F12.8,F12.8)')&
& 'collograd[',i,']:',(collograd1d(j+4*i),j=1,4)
call flush(6)
enddo
call ceedbasisdestroy(b,err)
! Q = P + 2, not already collocated
call ceedbasiscreatetensorh1lagrange(ceed,1,1,4,6,ceed_gauss,b,err)
call ceedbasisgetcollocatedgrad(b,collograd1d2,err)
do i=1,36
if (abs(collograd1d2(i))<1.0D-14) then
! LCOV_EXCL_START
collograd1d2(i) = 0
! LCOV_EXCL_STOP
endif
enddo
do i=0,5
write(*,'(A,I1,A,F12.8,F12.8,F12.8,F12.8,F12.8,F12.8)')&
& 'collograd[',i,']:',(collograd1d2(j+6*i),j=1,6)
call flush(6)
enddo
call ceedbasisdestroy(b,err)
call ceeddestroy(ceed,err)
end
!-----------------------------------------------------------------------