yes R the sizes are same.
Something very strange happened, when I used ipython to run it in debug mode ...
It completed the simulation and gave me the output.
again when I ran via python command it threw the error.
How is it possible? :O
On Wednesday, 14 August 2013 21:14:40 UTC+5:30, Robert Cimrman wrote:Any luck?
BTW. does the code work for a 3D mesh? But firstly try the following:
The convect_build_vtg(): ERR_Switch message means that the dim variable (should
be space dimension) is not 2 or 3, which should not happen.
- set a debugger breakpoint in ConvectTerm.get_fargs() just above the return
statement. Use "from sfepy.base.base import debug; debug()" for an
ipython-based pdb shell.
- print shapes as follows:
124 from sfepy.base.base import debug; debug()
--> 125 return grad, val_qp, vg, fmode
126
ipdb> grad.shape
(5000, 9, 2, 2)
ipdb> val_qp.shape
(5000, 9, 2, 1)
ipdb> fmode
False
ipdb> print vg
CMapping: mode: volume, n_el 5000, n_qp 9, dim: 2, n_ep: 9
ipdb> print vg.bf
vg.bf vg.bfg
ipdb> print vg.bfg.shape
(5000, 9, 2, 9)
ipdb> c
convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00)
> ...sfepy-git/sfepy/terms/termsNavierStokes.py(125)get_fargs()
124 from sfepy.base.base import debug; debug()
--> 125 return grad, val_qp, vg, fmode
126
ipdb> grad.shape
(5000, 9, 2, 2)
ipdb> val_qp.shape
(5000, 9, 2, 1)
ipdb> fmode
True
ipdb> print vg
CMapping: mode: volume, n_el 5000, n_qp 9, dim: 2, n_ep: 9
ipdb> print vg.bfg.shape
(5000, 9, 2, 9)
ipdb> c
convdiff: rezidual: 0.14 [s]
convdiff: solve: 3.57 [s]
convdiff: matrix: 0.60 [s]
convdiff: linear system not solved! (err = 3.600155e-03 < 1.000000e-10)
> ...sfepy-git/sfepy/terms/termsNavierStokes.py(125)get_fargs()
124 from sfepy.base.base import debug; debug()
--> 125 return grad, val_qp, vg, fmode
126
Are your sizes same as the above?
r.
On 08/11/2013 07:51 PM, Robert Cimrman wrote:
> Hi Ankit,
>
> On Sat, 10 Aug 2013, Ankit Mahato wrote:
>
>> Hi R,
>>
>> I tried mem_checkIntegrity inside the functions but it is not printing
>> any debugging result.
>> mem_checkIntegrity(421,"convect_build_vtg","termsNavierStokes.c","~/sfepy/sfepy/
>> terms/extmods");
>> mem_checkIntegrity(546,"term_ns_asm_convect","termsNavierStokes.c","~/sfepy/sfep
>> y/terms/extmods");
>>
>> Am I adding it correctly?
>
> Use the macro without arguments (see sfepy/fem/extmods/common.h for definition):
>
> check_memory_integrity();
>
> and do not forget to rebuild the sources.
>
> After adding it to convect_build_vtg()
>
> ...
> default:
> errput( ErrHead "ERR_Switch\n" );
> return( RET_Fail );
> }
> check_memory_integrity();
> return( RET_OK );
> }
> ...
>
>
> and typing "make", I get tons of
>
> checking memory integrity in
> sfepy/terms/extmods, sfepy/terms/extmods/termsNavierStokes.c,
> convect_build_vtg(), 476:
> allocated memory: 8 records, usage: 52032, max: 52032
> memory OK.
>
> - trying with the examples/navier_stokes/navier_stokes2d.py
>
>
> Also try changing the debug flags in site_cfg.py:
>
> debug_flags = '-DDEBUG_FMF'
>
> or even
>
> debug_flags = '-DDEBUG_FMF -DDEBUG_MESH'
>
> r.
>