Hi Ouyang,
On 07/16/2014 05:15 AM, Ouyang wrote:
Hi there,
I followed the interactive example in sfepy tutorial and wrote my custom simulation script for the block domain with body force (t2 term). That works. But for the point loaded block model (t3 term), I can't make it work. The script stopped at "assert_(mat.shape[-1]==virtual.dim)" of terms_point.py with IndexError: tuple index out of range. Searching the web does not find help information for this.
It is caused by the fact, that the point load has to be given as a special material parameter (= not evaluated in quadrature points, taken "as is", see the term docstring) -> its name has to start with dot.
Try:
f = Material('f', values={'.val': [[0.0,0.0, -100000.0]]})
It works for me.
Cheers, r.
The reason I write the attached custom simulation script is that I failed doing the things below: the "non-custom" script for a point loaded block running with "simple.py" works and gmsh can mesh different geometries. I would like to finish those two things together in python like "os.system('gmsh ........')", and "os.system('simple.py examples/myscript.py") but errors to import config in simple.py got me there since "path" settings for import in simple.py seems a little complicated for me. The custom simulation script might be easier to setup import "path" for me.
Thanks for your help.
ouyang