forked from jan/opencl_fdtd
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
d5fd78d493 | |||
fe2f4f4510 | |||
314e36a3cc | |||
a37df3a74f |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,5 +1,9 @@
|
|||||||
.idea/
|
.idea/
|
||||||
__pycache__
|
|
||||||
*.h5
|
*.h5
|
||||||
*.pyc
|
|
||||||
|
__pycache__
|
||||||
|
*.py[cod]
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.egg-info/
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ int p{{r}} = + (int) di{{r}};
|
|||||||
int wrap_{{r}} = (s{{r}} - 1) * (int) di{{r}};
|
int wrap_{{r}} = (s{{r}} - 1) * (int) di{{r}};
|
||||||
if ( {{r}} == 0 ) {
|
if ( {{r}} == 0 ) {
|
||||||
m{{r}} = wrap_{{r}};
|
m{{r}} = wrap_{{r}};
|
||||||
} else if ( {{r}} == s{{r}} - 1 ) {
|
}
|
||||||
|
if ( {{r}} == s{{r}} - 1 ) {
|
||||||
p{{r}} = -wrap_{{r}};
|
p{{r}} = -wrap_{{r}};
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -170,7 +170,7 @@ class Simulation(object):
|
|||||||
ctype = type_to_C(self.arg_type)
|
ctype = type_to_C(self.arg_type)
|
||||||
|
|
||||||
def ptr(arg: str) -> str:
|
def ptr(arg: str) -> str:
|
||||||
return ctype + ' * restrict ' + arg
|
return ctype + ' *' + arg
|
||||||
|
|
||||||
base_fields = OrderedDict()
|
base_fields = OrderedDict()
|
||||||
base_fields[ptr('E')] = self.E
|
base_fields[ptr('E')] = self.E
|
||||||
@ -286,7 +286,7 @@ class Simulation(object):
|
|||||||
alpha_max = pml['cfs_alpha']
|
alpha_max = pml['cfs_alpha']
|
||||||
|
|
||||||
def par(x):
|
def par(x):
|
||||||
scaling = ((x / (pml['thickness'])) ** pml['m'])
|
scaling = (x / pml['thickness']) ** pml['m']
|
||||||
sigma = scaling * sigma_max
|
sigma = scaling * sigma_max
|
||||||
kappa = 1 + scaling * (kappa_max - 1)
|
kappa = 1 + scaling * (kappa_max - 1)
|
||||||
alpha = ((1 - x / pml['thickness']) ** pml['ma']) * alpha_max
|
alpha = ((1 - x / pml['thickness']) ** pml['ma']) * alpha_max
|
||||||
|
Loading…
Reference in New Issue
Block a user