Hi all,
I have started some refactoring of the terms, aiming at better interactive usability.
Things like this already work:
t1 = Term.new('dw_lin_elastic_iso(m.lam, m.mu, v, u)', 'auto', omega, m=m, v=v, u=u)
print t1
terms = t1 - (3 * t1 - 2 * t1) * 4 + t1 * 2.4j
print terms
Things like this are going to be possible:
eq = Equation(t1 + Term('lin_volume_force', 1, gamma2, f, v))
eqs = Equations([eq], [fix_u])
pb = ProblemDefinition('problem', eqs, nls, ls, ts=None) pb.time_update(ebcs=[fix_u, shift_u]) pb.solve() pb.save_solution('results.vtk')
- i.e. it will be possible to build equations from individual terms using arithmetical operators.
The "work in progress" implementation can be found at [1], for the brave, see tests/test_high_level.py
I try not to break current examples - by some decent hammering all the tests pass except three...
Comments welcome! r.
All tests pass now, so I merged the branch to master, to get more "testing exposure" :)
r.
On 06/10/10 18:11, Robert Cimrman wrote:
Hi all,
I have started some refactoring of the terms, aiming at better interactive usability.
Things like this already work:
t1 = Term.new('dw_lin_elastic_iso(m.lam, m.mu, v, u)', 'auto', omega, m=m, v=v, u=u)
print t1
terms = t1 - (3 * t1 - 2 * t1) * 4 + t1 * 2.4j
print terms
Things like this are going to be possible:
eq = Equation(t1 + Term('lin_volume_force', 1, gamma2, f, v))
eqs = Equations([eq], [fix_u])
pb = ProblemDefinition('problem', eqs, nls, ls, ts=None) pb.time_update(ebcs=[fix_u, shift_u]) pb.solve() pb.save_solution('results.vtk')
- i.e. it will be possible to build equations from individual terms using arithmetical operators.
The "work in progress" implementation can be found at [1], for the brave, see tests/test_high_level.py
I try not to break current examples - by some decent hammering all the tests pass except three...
Comments welcome! r.
participants (1)
-
Robert Cimrman