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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
! Initialisation of the level set function
! $Header$
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
subroutine EHFinder_SetSym(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
CCTK_INT, dimension(3) :: sym
sym = 1
call SetCartSymVN(ierr,cctkGH,sym,'ehfinder::f')
if ( ierr .gt. 0 ) then
call CCTK_WARN(1,'Failed to register symmetry for the level set function')
end if
call SetCartSymVN(ierr,cctkGH,sym,'ehfinder::sc')
if ( ierr .gt. 0 ) then
call CCTK_WARN(1,'Failed to register symmetry for sc')
end if
! call SetCartSymVN(ierr,cctkGH,sym,'ehfinder::rep_mask')
! if ( ierr .gt. 0 ) then
! call CCTK_WARN(1,'Failed to register symmetry for the level reparametrization mask')
! end if
return
end subroutine EHFinder_SetSym
subroutine EHFinder_ApplySymAll(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
call CartSymVN(ierr,cctkGH,'ehfinder::f')
# include "include/physical_part.h"
if ( symx ) then
eh_mask(ngx:1:-1,:,:) = eh_mask(ngx+1:ngx+ngx,:,:)
rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:)
end if
if ( symy ) then
eh_mask(:,ngy:1:-1,:) = eh_mask(:,ngy+1:ngy+ngy,:)
rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:)
end if
if ( symz ) then
eh_mask(:,:,ngz:1:-1) = eh_mask(:,:,ngz+1:ngz+ngz)
rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz)
end if
return
end subroutine EHFinder_ApplySymAll
subroutine EHFinder_ApplySymF(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
call CartSymVN(ierr,cctkGH,'ehfinder::f')
return
end subroutine EHFinder_ApplySymF
subroutine EHFinder_ApplySymRep(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
# include "include/physical_part.h"
if ( symx ) then
rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:)
end if
if ( symy ) then
rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:)
end if
if ( symz ) then
rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz)
end if
return
end subroutine EHFinder_ApplySymRep
subroutine EHFinder_ApplySymFRep(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
# include "include/physical_part.h"
call CartSymVN(ierr,cctkGH,'ehfinder::f')
if ( symx ) then
rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:)
end if
if ( symy ) then
rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:)
end if
if ( symz ) then
rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz)
end if
return
end subroutine EHFinder_ApplySymFRep
subroutine EHFinder_ApplySymMask(CCTK_ARGUMENTS)
use EHFinder_mod
implicit none
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
# include "include/physical_part.h"
if ( symx ) then
eh_mask(ngx:1:-1,:,:) = eh_mask(ngx+1:ngx+ngx,:,:)
end if
if ( symy ) then
eh_mask(:,ngy:1:-1,:) = eh_mask(:,ngy+1:ngy+ngy,:)
end if
if ( symz ) then
eh_mask(:,:,ngz:1:-1) = eh_mask(:,:,ngz+1:ngz+ngz)
end if
return
end subroutine EHFinder_ApplySymMask
|