Skip to content

Commit

Permalink
Adding default densities to ArbLatticeAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
llaniewski committed Jan 5, 2024
1 parent 9e8cf4f commit e9f5266
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ArbLatticeAccess.hpp.Rt
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ for (s in rows(all_stages)) { ?>
template<class Node>
CudaDeviceFunction void pop<?%s s$suffix ?>(Node& node) const {
<?R
for (d in rows(Density)[s$load.densities]) {
dens = Density;
dens$load = s$load.densities;
for (d in rows(dens)) if (d$load) {
f = rows(Fields)[[match(d$field, Fields$name)]]
dp = c(-d$dx, -d$dy, -d$dz)
cat(paste0(" node.", d$name, " = load_", f$nicename, "<"), paste(dp, collapse=", "), " >();\n")
} else if (!is.na(d$default)) { ?>
<?%s paste("node",d$name,sep=".") ?> = <?%f d$default ?>; <?R
} ?> }
template<class Node>
CudaDeviceFunction void push<?%s s$suffix ?>(const Node& node) const {
Expand Down

0 comments on commit e9f5266

Please sign in to comment.