Skip to content

Commit

Permalink
Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Sep 20, 2023
1 parent 83e0d22 commit b1d5df5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/src/example2-c.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int main(int argc, char** argv) {
// Build FMM translation operators
void* fmm = PVFMMCreateVolumeFMMD(mult_order, cheb_deg, PVFMMStokesVelocity, comm);

// test1(fmm, kdim0, kdim1, cheb_deg, comm);
//test1(fmm, kdim0, kdim1, cheb_deg, comm);
test2(fmm, kdim0, kdim1, cheb_deg, comm);

PVFMMDestroyVolumeFMMD(&fmm);
Expand Down
2 changes: 2 additions & 0 deletions python/examples/example2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ def fn_input(coord, out):
-L * r_2
) + 2 * L * np.exp(-L * r_2) * (c[2] - 0.5)


c_sig = types.void(
types.CPointer(types.double),
types.int64,
types.CPointer(types.double),
types.voidptr,
)


# see https://numba.readthedocs.io/en/stable/user/cfunc.html
@numba.cfunc(c_sig, nopython=True)
def fn_input_C(coord_, n, out_, _ctx):
Expand Down
6 changes: 3 additions & 3 deletions python/src/pvfmm/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def nodes_to_coeff(
) -> np.ndarray:
is_double = node_val.dtype == np.float64
Ncoef = (cheb_deg + 1) * (cheb_deg + 2) * (cheb_deg + 3) // 6
# XXX: is this valid?
# TODO: is this the valid size of the output array?
coeff = np.empty(Ncoef * N_leaf * dof, dtype=node_val.dtype)

get_function_dtype("PVFMMNodes2Coeff", node_val.dtype)(
Expand Down Expand Up @@ -203,7 +203,7 @@ def from_function(
cheb_deg: int,
data_dim: int,
fn: Union[ffi.double_volume_callback, ffi.float_volume_callback],
context: ctypes.c_void_p, # TODO: investigate
context: ctypes.c_void_p,
trg_coord: np.ndarray,
comm: MPI.Comm,
tol: float,
Expand Down Expand Up @@ -315,7 +315,7 @@ def get_coefficients(self) -> np.ndarray:
if self._used_kernel is None:
raise ValueError(
"Cannot get coefficients of an un-evaluated tree"
) # TODO: true?
) # TODO: is this true? what is the contract of this class
n_leaf = self.leaf_count()
(_kdim0, kdim1) = KERNEL_DIMS[self._used_kernel]
coeff = np.empty(n_leaf * self.n_coeff * kdim1, dtype=self.dtype)
Expand Down

0 comments on commit b1d5df5

Please sign in to comment.