[petsc-users] Integrate command line arguments -bv_type vecs -bv_type mat to python code

Jose E. Roman jroman at dsic.upv.es
Wed Apr 3 06:12:13 CDT 2019

You could just do


before E.setFromOptions()


> El 3 abr 2019, a las 13:05, Jan Grießer via petsc-users <petsc-users at mcs.anl.gov> escribió:
> Hello, everybody,
> I use Splec4py to solve the lowest eigenvalues and corresponding eigenvectors of systems up to 20 Mio x 20 Mio. My problem so far was that the base was too big. On advice here in the forum I always added -bv_type vecs -bv_type mat to the command line, what solved my problems. I don't always want to execute these two commands on the command line, but I want to define them directly in the python code before E.solve() is called. However, I'm not quite sure how to call these functions correctly in Python. 
> Currently I do it like this
>  bv = SLEPc.BV().create()
> bv.setType(VECS),
> bv.setType(Mat), E.setBV(bv)
> Could you tell me if that's correct? 
> Thank you very much in advance!

More information about the petsc-users mailing list