def test_no_BC(self): #expected is from: #np.dot(np.sin(outz[:,np.newaxis] * m[np.newaxis,:]), v_E_Igamv_the) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=0), np.array([[ 1.15273015, 1.15273015], [ 2.03881352, 2.03881352]]))
def test_top_vs_time_drn_1(self): #expected is from: #test no_bc + top_vs time interplolated at tvals and depth z (mag vs depth is uniform top to bottom) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=1, top_vs_time = [self.top_vs_time]), np.array([[ 1+1.15273015, 2+1.15273015], [ 1+2.03881352, 2+2.03881352]]))
def test_top_vs_time_drn_0(self): #expected is from: #test no_bc + top_vs time interplolated at tvals and depth z (mag_vs_depth reduces to zero at bottom) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=0, top_vs_time = [self.top_vs_time]), np.array([[ 1*0.8+1.15273015, 2*0.8+1.15273015], [ 1*0.6+2.03881352, 2*0.6+2.03881352]]))
def test_bot_vs_time_top_vs_time_drn_1_double_loads(self): #expected is from: #test no_bc + top_vs_time and bot_vs time interplolated at tvals and depth z (mag_vs_depth is uniform from top plus reduces to zero at top) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=1, top_vs_time = [self.top_vs_time, self.top_vs_time], bot_vs_time = [self.bot_vs_time, self.bot_vs_time]), np.array([[ 2+2*0.2+1.15273015, 4+4*0.2+1.15273015], [ 2+2*0.4+2.03881352, 4+4*0.4+2.03881352]]))
def test_bot_vs_time_drn_0_omega_phase(self): #expected is from: #test no_bc + bot_vs time interplolated at tvals and depth z (mag_vs_depth reduces to zero at top) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=0, bot_vs_time = [self.bot_vs_time], bot_omega_phase=[self.omega_phase]), np.array([[ 1*0.2*np.cos(1*1+2)+1.15273015, 2*0.2*np.cos(1*3+2)+1.15273015], [ 1*0.4*np.cos(1*1+2)+2.03881352, 2*0.4*np.cos(1*3+2)+2.03881352]]))
def test_top_vs_time_drn_0_omega_phase(self): #expected is from: #test no_bc + cos(omega*t+phase) multiplied top_vs time interplolated at tvals and depth z (mag_vs_depth reduces to zero at bottom) assert_allclose(dim1sin_f(self.m, self.outz, self.tvals, self.v_E_Igamv_the, drn=0, top_vs_time = [self.top_vs_time], top_omega_phase=[self.omega_phase]), np.array([[ 1*0.8*np.cos(1*1+2)+1.15273015, 2*0.8*np.cos(1*3+2)+1.15273015], [ 1*0.6*np.cos(1*1+2)+2.03881352, 2*0.6*np.cos(1*3+2)+2.03881352]]))