Skip to content

Commit

Permalink
Updating param_quad.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cooper committed Aug 10, 2023
1 parent 664e54b commit 2af6bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_quadconv/utils/quadrature.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def param_quad(input_points, num_points, ratio=[], base=[], const=False):
for i in range(spatial_dim):
#linearly spaced nodes
if base[i] == None:
nodes.append(torch.linspace(coord_min[i], coord_max[i], num_points*ratio[i]))
nodes.append(torch.linspace(coord_min[i], coord_max[i], round(num_points*ratio[i])))

#logarithmically spaced nodes
else:
p = torch.logspace(0, 1, steps=num_points*ratio[i], base=base[i])
p = torch.logspace(0, 1, steps=round(num_points*ratio[i]), base=base[i])
p = coord_min[i] + ((coord_max[i]-coord_min[i])/(base[i]-1))*(p-1)

nodes.append(p)
Expand Down

0 comments on commit 2af6bbe

Please sign in to comment.