tianjuxue / jax-am

Additive manufacturing simulation with JAX.
https://jax-am.readthedocs.io/en/latest/
GNU General Public License v3.0
254 stars 56 forks source link

TypeError: get_bound_values() missing 1 required positional argument: 'values' #1

Closed xiaoyuxie-vico closed 1 year ago

xiaoyuxie-vico commented 1 year ago

The issue is caused in this line: https://github.com/tianjuxue/jax-am/blob/78d50084bda3153398c9f9a503c94936468b50f2/src/cfd/setupAM.py#L29

TypeError Traceback (most recent call last) /home/xie/projects/jax-am/src/cfd/examples/AM/AM_basic.ipynb Cell 7 in <cell line: 4>() [2] T0 = np.zeros_like(xc) + T_ref [3] T0_top = T0[:,:,[-1],:] ----> [4] k = update_cond(cond_func,T0,[[1,1,1,1,1,1],[0.,0.,0.,0.,0.,0]],dX) [5] dt = 1e-5 [6] t = 0.

File ~/projects/jax-am/src/cfd/setupAM.py:29, in update_cond(temp_dependent_cond, T, BCs, dX) 28 def update_cond(temp_dependent_cond,T,BCs,dX): ---> 29 T_bc = get_bound_values(T,BCs,dX) 30 cond_surf_x = np.concatenate((temp_dependent_cond((T_bc[0]+T[[0],:,:])/2.), 31 temp_dependent_cond((T[1:,:,:] + T[:-1,:,:])/2.), 32 temp_dependent_cond((T_bc[1]+T[[-1],:,:])/2.)),axis=0) 34 cond_surf_y = np.concatenate((temp_dependent_cond((T_bc[2]+T[:,[0],:])/2.), 35 temp_dependent_cond((T[:,1:,:] + T[:,:-1,:])/2.), 36 temp_dependent_cond((T_bc[3]+T[:,[-1],:])/2.)),axis=1)

TypeError: get_bound_values() missing 1 required positional argument: 'values'