Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import assimulo.explicit_ode as ode
  2. import assimulo.problem as apr
  3. import assimulo.solvers as aso
  4.  
  5. class FEM_ODE(ode.Explicit_ODE):
  6.  
  7. def __init__(self, p,t,v=None):
  8. self.p=p
  9. self.v=v
  10. self.t=t
  11. def rhs(x,t):
  12. if(v==None):
  13. return p*x
  14. else:
  15. return p*x[0:len[x]/2]+v*x[len[x]/2,len[x]]
  16.  
  17. ode.Explicit_ODE.__init__(apr.Explicit_Problem(rhs))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement