Re: [petsc-users] nghosts in 'DMMoabLoadFromFile'

2021-05-20 Thread Vijay S. Mahadevan
Dear vikram, Yes if you are running in serial or if you do not require any ghost layers, initialize the parameter input to zero. Otherwise, it should specify the the number of ghost layers of elements you need when running in parallel. I'm not well at the moment but will update the documentation

Re: [petsc-users] SNESFAS for an unstructured mesh

2016-06-29 Thread Vijay S. Mahadevan
>> Thanks for your response. Is DMMoad is other special kind of data structure >> in Petsc? DMMoab is a concrete implementation of the DM object, which uses MOAB mesh database underneath. > Would it be possible to use FAS without using petsc DM/DMPlex by adding extra > code? If you have your o

Re: [petsc-users] SNESFAS for an unstructured mesh

2016-06-29 Thread Vijay S. Mahadevan
Khai, There is DMMoab in PETSc that can handle unstructured meshes and I am currently refining and preparing a PR to PETSc that includes features to support geometric multigrid. I do not have an example yet to use FAS as a solver but can create one for an unstructured grid. Are there any particula

[petsc-users] AIJ ftn-kernels update

2015-02-03 Thread Vijay S. Mahadevan
When using configure options: --with-fortran-kernels=1 --with-fortran=1, the build fails with the following errors. /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c: In function 'PetscErrorCode MatMultTransposeAdd_SeqAIJ(Mat, Vec, Vec, Vec)': /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.

Re: [petsc-users] Need to create $PREFIX/include explicitly

2015-01-29 Thread Vijay S. Mahadevan
t.h slepcsys.h slepc.h slepceps.h slepcblaslapack.h slepcnep.h >> slepcmath.h slepcversion.h slepcvec.h slepcrg.h slepcds.h slepcfn.h >> slepcrgtypes.h >> sh: 1: /usr/software/petsc/dev/ubuntu_standalone_dbg/bin/bfort: not found >> >> vijaysm@tachyon ~/code/slepc (master) > ls

Re: [petsc-users] Need to create $PREFIX/include explicitly

2015-01-29 Thread Vijay S. Mahadevan
petsclogformat.py petscnagupgrade.py petscnagupgrade.pyc Again, let me know if you need any of the log files for either PETSc or SLEPc. Thanks, Vijay On Wed, Jan 28, 2015 at 10:30 PM, Vijay S. Mahadevan wrote: >> BTW: I also updated some routines in moab.cxx for changes in how we hand

Re: [petsc-users] Need to create $PREFIX/include explicitly

2015-01-28 Thread Vijay S. Mahadevan
at 9:29 PM, Barry Smith wrote: > Fixed in master and next. Thanks for reporting it. > >Barry > > BTW: I also updated some routines in moab.cxx for changes in how we handle > setfromoptions in master > >> On Jan 28, 2015, at 7:39 PM, Vijay S. Mahadevan wrote: >&

[petsc-users] Need to create $PREFIX/include explicitly

2015-01-28 Thread Vijay S. Mahadevan
With the current master, when using a prefix, configuration fails with the following error message. I've not attached configure.log since its around 7MB (but definitely can send that if that helps further deciphering the issue). The problem here seems to be that $PREFIX/include is not created (whil

Re: [petsc-users] Config option --download-suitesparse fails

2014-03-19 Thread Vijay S. Mahadevan
=== Vijay On Wed, Mar 19, 2014 at 8:39 PM, Vijay S. Mahadevan wrote: > Thanks Satish. Will pull and try now. > > On Wed, Mar 19, 2014 at 8:28 PM, Satish Balay wrote: >> The tarball is now at our ftp server - so configure

Re: [petsc-users] Config option --download-suitesparse fails

2014-03-19 Thread Vijay S. Mahadevan
a backup url at our ftp server. >> >> Shri - if you have a acopy of the suitesparse tarball - I can place it >> at our ftp site >> >> Satish >> >> On Wed, 19 Mar 2014, Vijay S. Mahadevan wrote: >> >> > I think someone at UFL messed up the webspa

[petsc-users] Config option --download-suitesparse fails

2014-03-19 Thread Vijay S. Mahadevan
I think someone at UFL messed up the webspace that hosts Suitesparse. The locations are not recognized by the server. I can't even find a manual download link at their site. Google redirects me to the same 403 error page too. For the time being, is it possibly mirrored at one of the ANL systems fo

Re: [petsc-users] question about the PETSc Vec object and C++ destructors

2014-02-05 Thread Vijay S. Mahadevan
The simplest fix would be to implement the copy constructor/assignment overload for the object and increase the reference count of vector v. On object destruction, the VecDestroy will dereference accordingly until the last object which will actually free the vector allocation. http://www.mcs.anl.g

Re: [petsc-users] Error when using TSSetRHSJacobian+DMSetMatrixPreallocateOnly

2013-09-18 Thread Vijay S. Mahadevan
will think about this some more. > The "user matrix" must have been assembled otherwise it would have stopped > above. It did. Vijay On Wed, Sep 18, 2013 at 11:17 AM, Barry Smith wrote: > > On Sep 18, 2013, at 10:52 AM, "Vijay S. Mahadevan" wrote: > >>>

Re: [petsc-users] Error when using TSSetRHSJacobian+DMSetMatrixPreallocateOnly

2013-09-18 Thread Vijay S. Mahadevan
> DMPlex does it. I was just thinking about how you managed this in DMPlex. I will take a look at this implementation. Vijay On Wed, Sep 18, 2013 at 12:10 PM, Matthew Knepley wrote: > On Wed, Sep 18, 2013 at 10:06 AM, Vijay S. Mahadevan > wrote: >> >> >U

Re: [petsc-users] Error when using TSSetRHSJacobian+DMSetMatrixPreallocateOnly

2013-09-18 Thread Vijay S. Mahadevan
ing. Vijay On Wed, Sep 18, 2013 at 10:46 AM, Barry Smith wrote: > >The code did not "crash", it ended with an error message > > > On Sep 18, 2013, at 10:32 AM, "Vijay S. Mahadevan" wrote: > >> All, >> >> When I call DMSetMatrixPreallo

[petsc-users] Error when using TSSetRHSJacobian+DMSetMatrixPreallocateOnly

2013-09-18 Thread Vijay S. Mahadevan
All, When I call DMSetMatrixPreallocateOnly and then TSSetRHSJacobian without a matrix input argument (NULL instead), then the code crashes during TSSolve and more specifically during MatDuplicate. This is replicable with src/ts/examples/tutorials/ex2.c. Here's the error with stack trace. [0]PETS

Re: [petsc-users] Setting block size for MPI vectors

2013-08-27 Thread Vijay S. Mahadevan
ke the more general route and this was a specific use case that I needed only recently. Hence the reason for the thread and the original confusion. On Tue, Aug 27, 2013 at 6:35 PM, Barry Smith wrote: > > On Aug 27, 2013, at 6:21 PM, "Vijay S. Mahadevan" wrote: > >>>

Re: [petsc-users] Setting block size for MPI vectors

2013-08-27 Thread Vijay S. Mahadevan
>We've debated back and forth this. The WithArray() version has to take the > block size because it has to instantiate the vector at that point because it > needs a place to put the array pointer. Understood. But since VecCreateMPI is creating the vector completely too, should it not know t

Re: [petsc-users] Setting block size for MPI vectors

2013-08-27 Thread Vijay S. Mahadevan
VecSetType() > > the reason is that the Vec may be constructed differently based on these > options but the VecCreateMPI() is suppose to produce an already constructed > Vec. > > Barry > > > On Aug 27, 2013, at 4:45 PM, "Vijay S. Mahadevan" wrote: &g

[petsc-users] Setting block size for MPI vectors

2013-08-27 Thread Vijay S. Mahadevan
I am trying to create an MPI vector and then trying to set the block size after the initial creation. But I receive an error in PetscLayoutSetBlockSize. Since there is no explicit block size argument during construction, I call VecSetBlockSize afterwards. The relevant code and error are below. Is

[petsc-users] Extracting Vec from VecNest

2013-02-27 Thread Vijay S. Mahadevan
Always give the full error message and use error checking for PETSc functions. (CHKERRQ, CHKERRABORT) The VecGetSubVector routine expects the entire index set for the component vector you need i.e., size of isset should be equal to size of the vector. Instead you are asking for the reference to th

[petsc-users] VecSetType and ghosted vectors

2011-10-19 Thread Vijay S. Mahadevan
>> My rationale:?I have abstracted a C++ class called PetscLinearSolver that >> is supposed to wrap all the complex ksp & co functionality in an easy to use >> C++ class. I don't see why you would have to create your own vector here. If PetscLinearSolver is a wrapper around KSP object, and x, b ar

[petsc-users] Some questions regarding VecNest type.

2011-10-12 Thread Vijay S. Mahadevan
rent, and it provides the ability to update/change the block references after creation, I can't ask for more. On Wed, Oct 12, 2011 at 4:41 PM, Jed Brown wrote: > On Wed, Oct 12, 2011 at 16:26, Vijay S. Mahadevan > wrote: >> >> Not fun, yes, but two different code paths a

[petsc-users] Some questions regarding VecNest type.

2011-10-12 Thread Vijay S. Mahadevan
sual VecCreate+SetFromOptions doesn't seem to do the trick. Or am I missing some call here ? (Code attached) Petsc doesn't seem to like VecSetType(x, VECNEST) either. I get an error "Unknown vector type: nest!". On Wed, Oct 12, 2011 at 3:28 PM, Jed Brown wrote: > On Wed, Oct

[petsc-users] Some questions regarding VecNest type.

2011-10-12 Thread Vijay S. Mahadevan
need some input when I get there. If you are talking about the compile time switch, then yes, that was a little painful. But hopefully pure petsc will give me some peace ! On Wed, Oct 12, 2011 at 3:03 PM, Jed Brown wrote: > On Wed, Oct 12, 2011 at 14:53, Vijay S. Mahadevan > wrote: >>

[petsc-users] Some questions regarding VecNest type.

2011-10-12 Thread Vijay S. Mahadevan
hed to petsc-ext and used only Krylov solves with block diagonal lu/ilu preconditioners. And those worked very nicely for my problems. On Wed, Oct 12, 2011 at 2:34 PM, Jed Brown wrote: > On Wed, Oct 12, 2011 at 14:08, Vijay S. Mahadevan > wrote: >> >> > vecnest.c:639 ? >

[petsc-users] Some questions regarding VecNest type.

2011-10-12 Thread Vijay S. Mahadevan
tions but only compile time since I was using petsc-ext. Perhaps this is the most optimal way forward. I have just started playing around with the examples and hopefully the tests will clarify some of my issues. Thanks. On Wed, Oct 12, 2011 at 7:58 AM, Jed Brown wrote: > On Tue, Oct 11, 2

[petsc-users] Some questions regarding VecNest type.

2011-10-11 Thread Vijay S. Mahadevan
yway, thanks for the pointers ! Oh and an unrelated question: I couldn't find what replaced the Vec/Mat-Valid routines that existed in 3.0. Currently is there a routine to check if a Vec/Mat has called its setup yet ? Vijay On Tue, Oct 11, 2011 at 1:19 PM, Jed Brown wrote: > On Tue, Oc

[petsc-users] Some questions regarding VecNest type.

2011-10-11 Thread Vijay S. Mahadevan
I understand that the Vec/Mat Nest types in the current release of petsc are designed to be similar in philosophy to Dave May's petsc-ext "block" vectors and matrices. I have some existing code based on petsc-ext and am trying to figure out the amount of work involved to make a transition from pets

[petsc-users] question about contexts

2011-09-30 Thread Vijay S. Mahadevan
You should be able to do this: #undef __FUNCT__ #define __FUNCT__ "StiffnessMatrixMultiplication" PetscErrorCode StiffnessMatrixMultiplication(Mat A, Vec x, Vec y) { MyClass* ctx ; // ... ierr = MatShellGetContext(A, (void**) &ctx);CHKERRQ(ierr); Mat foo; foo = c

[petsc-users] SLEPc generalized eigenvalue problem question?

2011-08-01 Thread Vijay S. Mahadevan
> 2) What is EPS? Eigenvalue Problem Solver (SLEPc). The "best" eigensolver is problem dependent. You can use arpack if you have configured slepc with it or else use Krylov-schur to test the convergence. There are also Davidson family of solvers implemented in slepc which are quite effective for s

[petsc-users] Conditional Constraints

2011-07-31 Thread Vijay S. Mahadevan
oupled ODE+constraint might not have worked. On Sun, Jul 31, 2011 at 11:14 PM, Jed Brown wrote: > On Sun, Jul 31, 2011 at 22:11, Vijay S. Mahadevan > wrote: >> >> I saw from the documentation that the GL methods were capable of >> handling DAE systems. But the intentio

[petsc-users] Conditional Constraints

2011-07-31 Thread Vijay S. Mahadevan
s does not seem like an option. I was probably just shooting in the dark there but it just seemed like a neat idea. Vijay On Fri, Jul 29, 2011 at 4:40 PM, Jed Brown wrote: > On Mon, Jul 25, 2011 at 23:40, Vijay S. Mahadevan > wrote: >> >> I was also going to ask w

[petsc-users] Conditional Constraints

2011-07-26 Thread Vijay S. Mahadevan
Shri, Would it rather be more appropriate to call it a constrained minimizer then ? I have looked at TAO before and hence my curiosity in the new solver. I shall look at the reference you suggested before asking any more naive questions. Thanks, Vijay On Jul 25, 2011 11:43 PM, "Shri" wrote: > >

[petsc-users] Conditional Constraints

2011-07-25 Thread Vijay S. Mahadevan
nstraints). Essentially for each equation F_i(x) at the solution x* either F_i(x*) is 0 or x_i is on the constraint and F_i(x*) is of a particular sign. I am not the person to ask about good references on this topic, I know there are lots of books and papers on the topic. > > Barry > > &g

[petsc-users] Conditional Constraints

2011-07-25 Thread Vijay S. Mahadevan
Barry/Shri, Is the new VI SNES type in general terms a constrained nonlinear solver ? In other words, given a certain constraint as a function of the variables of interest, does it find the optimal solution that both minimizes the residual and satisfy the constraint ? I have been looking at L-BFGS

[petsc-users] To store the matrix.

2011-07-14 Thread Vijay S. Mahadevan
mean the PetscBinaryRead/Write approach for storing in matlab readable binary ? On Thu, Jul 14, 2011 at 1:45 PM, Jed Brown wrote: > On Thu, Jul 14, 2011 at 13:39, Vijay S. Mahadevan > wrote: >> >> I think the format is useful to serialize a matrix into MATLAB format. > > Y

[petsc-users] To store the matrix.

2011-07-14 Thread Vijay S. Mahadevan
Jed, I think the format is useful to serialize a matrix into MATLAB format. Typically, you could do something like nnz = 1 ; index = zeros(nnz,3); index = [ 1 1 1.0 ]; A = spconvert(index); I am unsure if PETSC_VIEWER_MATLAB already provides this functionality for matrices. The document for the

[petsc-users] Question for time dependent problems

2011-07-06 Thread Vijay S. Mahadevan
Barry, >> Do not call MatZeroEntries on a freshly created matrix (that destroys the preallocation pattern) so skip the MatZeroEntries the first time. I found an earlier thread ( http://lists.mcs.anl.gov/pipermail/petsc-users/2011-April/008566.html) where you said that it would not destroy the pre

[petsc-users] MatCopy and MatSetValue consume most 99 percentage of runtime

2011-04-20 Thread Vijay S. Mahadevan
Thanks for the clarification Jed. But zeroing more entries than necessary would still trigger malloc calls. Would it not ? Vijay On Apr 20, 2011 5:05 AM, "Jed Brown" wrote: > On Wed, Apr 20, 2011 at 05:08, Vijay S. Mahadevan wrote: > >> Barry, just to confirm, are you sayi

[petsc-users] MatCopy and MatSetValue consume most 99 percentage of runtime

2011-04-19 Thread Vijay S. Mahadevan
> ? Don't call MatCopy() on anything that you have NOT fully filled up, same > with MatDiagonalSet() and MatZeroEntries(). You should only do those > operations on matrices that you have filled up and called MatAssembly on > already. You can use MatDiagonalSet() directly on a naked matrix but on

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
st all the memory bandwidth, adding more cores in the computation helps >>> very little because it is completely starved for memory bandwidth. >>> >>> ? Barry >>> >>> * perhaps something in the OS is not configured correctly and thus not >>> allowing access to all the memory bandwidth, but this seems unlikely. >>> >>> On Feb 3, 2011, at 4:29 PM, Vijay S. Mahadevan wrote: >>> >>> > Barry, >>> > >>> > The outputs are attached. I do... >>> >>> > >>> >> > >

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
seems unlikely. > > On Feb 3, 2011, at 4:29 PM, Vijay S. Mahadevan wrote: > >> Barry, >> >> The outputs are attached. I do not see a big difference from the >> earlier results as you mentioned. >> >> Let me know if there exist a similar benchmark

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
probably not a great way to do it, but better than nothing. Please > try that one. > > ? ?Thanks > > > ? Barry > > > On Feb 3, 2011, at 1:41 PM, Vijay S. Mahadevan wrote: > >> Barry, >> >> Thanks for the quick reply. I ran the benchmark/stream/B

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
rk is able to utilize the memory bandwidth. > Run that and send us the output (run with just 2 threads). > > ? Barry > > > On Feb 3, 2011, at 12:05 PM, Vijay S. Mahadevan wrote: > >> Matt, >> >> I apologize for the incomplete information. Find attached the >

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
let me know. VIjay On Thu, Feb 3, 2011 at 11:42 AM, Matthew Knepley wrote: > On Thu, Feb 3, 2011 at 11:37 AM, Vijay S. Mahadevan > wrote: >> >> Barry, >> >> Sorry about the delay in the reply. I did not have access to the >> system to test out what you

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-03 Thread Vijay S. Mahadevan
Vijay On Thu, Feb 3, 2011 at 11:10 AM, Barry Smith wrote: > > On Feb 2, 2011, at 11:13 PM, Vijay S. Mahadevan wrote: > >> Barry, >> >> I understand what you are saying but which example/options then is the >> best one to compute the scalability in a multi-c

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-02 Thread Vijay S. Mahadevan
u run > -dmmg_nlevels 5 -pc_type jacobi you will get great speed up with 2 processors > but crummy speed. > > ?Barry > > > > On Feb 2, 2011, at 6:17 PM, Vijay S. Mahadevan wrote: > >> Barry, >> >> Please find attached the patch for the minor change to contro

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-02 Thread Vijay S. Mahadevan
any good parallel performance > with less than at least 10,000 unknowns per process. > > ? Barry > > On Feb 2, 2011, at 5:38 PM, Vijay S. Mahadevan wrote: > >> Here's the performance statistic on 1 and 2 processor runs. >> >> /usr/lib/petsc/linux-gnu

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-02 Thread Vijay S. Mahadevan
.046e+03 1.0 I am not entirely sure if I can make sense out of that statistic but if there is something more you need, please feel free to let me know. Vijay On Wed, Feb 2, 2011 at 5:15 PM, Matthew Knepley wrote: > On Wed, Feb 2, 2011 at 5:04 PM, Vijay S. Mahadevan > wrote:

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-02 Thread Vijay S. Mahadevan
maybe either I or the configure process is missing. All ideas are much appreciated. Vijay On Wed, Feb 2, 2011 at 4:53 PM, Matthew Knepley wrote: > On Wed, Feb 2, 2011 at 4:46 PM, Vijay S. Mahadevan > wrote: >> >> Hi, >> >> I am trying to configure my petsc install with

[petsc-users] Configuring petsc with MPI on ubuntu quad-core

2011-02-02 Thread Vijay S. Mahadevan
Hi, I am trying to configure my petsc install with an MPI installation to make use of a dual quad-core desktop system running Ubuntu. But eventhough the configure/make process went through without problems, the scalability of the programs don't seem to reflect what I expected. My configure options

[petsc-users] Monotonic convergence in FGMRES.

2010-12-21 Thread Vijay S. Mahadevan
ed). > > ? Barry > > > On Dec 21, 2010, at 2:46 PM, Vijay S. Mahadevan wrote: > >>> Yes but look at the true residual norm it is huge and indicates the >>> residual is not really getting small. >> Ah yes. I was reading the output wrongly. Thanks for pointi

[petsc-users] Monotonic convergence in FGMRES.

2010-12-21 Thread Vijay S. Mahadevan
I find any other curious behavior. Vijay On Tue, Dec 21, 2010 at 2:30 PM, Barry Smith wrote: > > ?Yes but look at the true residual norm it is huge and indicates the residual > is not really getting small. > > ?Barry > > On Dec 21, 2010, at 2:26 PM, Vijay S. Mahadevan wrote: &

[petsc-users] Monotonic convergence in FGMRES.

2010-12-21 Thread Vijay S. Mahadevan
Barry, I tried with the true_residual_norm option and it gives me the exact same convergence as the one I have shown before. 45 KSP Residual norm 2.511364148934e-07 45 KSP preconditioned resid norm 2.511364148934e-07 true resid norm 1.865039278877e+02 ||Ae||/||Ax|| 2.699481989705e+02 46 KSP

[petsc-users] Monotonic convergence in FGMRES.

2010-12-21 Thread Vijay S. Mahadevan
. Vijay On Tue, Dec 21, 2010 at 1:10 PM, Jed Brown wrote: > On Tue, Dec 21, 2010 at 19:53, Vijay S. Mahadevan > wrote: >> >> I am running a linear problem discretized with FEM on a diffusion >> reaction system, with discontinuous source distribution. When I run

[petsc-users] Monotonic convergence in FGMRES.

2010-12-21 Thread Vijay S. Mahadevan
Hi all, I am running a linear problem discretized with FEM on a diffusion reaction system, with discontinuous source distribution. When I run FGMRes with geometric multigrid as its preconditioner, I notice that every time after the restart in fgmres, the new residual is orders of magnitude higher

[petsc-users] Use of MatRestrict/MatInterpolate with PCMG.

2010-12-16 Thread Vijay S. Mahadevan
te it if you can let me know. Thanks. Vijay On Wed, Dec 15, 2010 at 9:16 PM, Barry Smith wrote: > > ?If you explicitly provide both then you are ok. If you provide one and not > the other it will fail silently with a bad algorithm. > > > ?Barry > > On Dec 15, 2010, a

[petsc-users] Use of MatRestrict/MatInterpolate with PCMG.

2010-12-15 Thread Vijay S. Mahadevan
, at 8:16 PM, Vijay S. Mahadevan wrote: > >> Barry, >> >> Thanks for the prompt change ! I do not work on the development >> version but I can update these matrix routines alone. >> >>> ?Note it can still glitch if the restricted size is exactly the original >

[petsc-users] Use of MatRestrict/MatInterpolate with PCMG.

2010-12-15 Thread Vijay S. Mahadevan
you are not using petsc-dev. >> >> ? I'll try to get it down in the next few hours but it may take a little >> longer. >> >> >> ? Barry >> >> On Dec 15, 2010, at 6:06 PM, Vijay S. Mahadevan wrote: >> >>> Hi, >>> >>> I

[petsc-users] Use of MatRestrict/MatInterpolate with PCMG.

2010-12-15 Thread Vijay S. Mahadevan
Hi, I have an implementation issue with the MatRestrict/Interpolate functions. The problem is that one of my coarser levels (with PCMG) has higher dofs than the finest level. This does not always happen and requires a weird fine mesh system (in a sense) that uses multi-grid, but the idea is that t

[petsc-users] Is PCMG a generic PC object ?

2010-12-07 Thread Vijay S. Mahadevan
Jed, that worked perfectly. I had a hunch this is what's needed but glad to see all issues resolved. Again, thanks for the help. Vijay On Tue, Dec 7, 2010 at 4:07 AM, Jed Brown wrote: > On Tue, Dec 7, 2010 at 07:42, Vijay S. Mahadevan wrote: >> >> When I use PCMG as a preco

[petsc-users] Is PCMG a generic PC object ?

2010-12-07 Thread Vijay S. Mahadevan
d and make a wrong assumption here ? I've been stuck on this for a while and looking at DMMG implementation didn't help with my problem either. Any help is much appreciated. Vijay On Fri, Dec 3, 2010 at 2:37 PM, Vijay S. Mahadevan wrote: > The custom residual makes sense now. I can

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
question here. Thanks and have a great day. Vijay On Fri, Dec 3, 2010 at 2:16 PM, Jed Brown wrote: > On Fri, Dec 3, 2010 at 21:09, Vijay S. Mahadevan wrote: >> >> Ah, I misunderstood your explanation earlier. If I do provide the >> restriction/prolongation along with a fine-grid

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
residual is.. Wouldn?t PCMGDefaultResidual compute the residual with just MatMult operation defined (b-Ax) for every level ? Why do I need a custom residual operator ? On Fri, Dec 3, 2010 at 1:56 PM, Jed Brown wrote: > On Fri, Dec 3, 2010 at 20:53, Vijay S. Mahadevan wrote: >> >> So this

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
for all the help Jed. I will post here again if I have more questions. Vijay On Fri, Dec 3, 2010 at 1:27 PM, Jed Brown wrote: > On Fri, Dec 3, 2010 at 20:20, Vijay S. Mahadevan wrote: >> >> This is fine and I am more than happy to hand these to Petsc. I do >> have the

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
he KSP/PC operators at every level and replace them with the correct shell matrices. But I am not sure what is the recommended procedure here. All comments/suggestions welcome. Vijay On Fri, Dec 3, 2010 at 12:34 PM, Jed Brown wrote: > On Fri, Dec 3, 2010 at 19:29, Vijay S. Mahadevan wro

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
operator and R and optionally P, you can use >>> Galerkin coarsening by calling >>> PCMGSetGalerkin() or via the command line arg -pc_mg_galerkin >>> Also, if you don't specify the prolongation, petsc will use P = R^T. >>> >>> >>> Cheers, >>

[petsc-users] Is PCMG a generic PC object ?

2010-12-03 Thread Vijay S. Mahadevan
t; Galerkin coarsening by calling >> PCMGSetGalerkin() or via the command line arg -pc_mg_galerkin >> Also, if you don't specify the prolongation, petsc will use P = R^T. >> >> >> Cheers, >> ?Dave >> >> >> On 3 December 2010 06:02, Vijay S. Mahadev

[petsc-users] Is PCMG a generic PC object ?

2010-12-02 Thread Vijay S. Mahadevan
Hi all, I was wondering whether the MG preconditioner object is generic enough to work out of the box like say ILU or SOR. To elaborate on this, if I can provide the number of levels, restriction and prolongation operators for each level and the system operators along with vectors allocated for s

[petsc-users] Shell matrix and MatMultAdd.

2010-12-02 Thread Vijay S. Mahadevan
, 2010 at 6:37 PM, Barry Smith wrote: > > On Dec 2, 2010, at 3:02 PM, Vijay S. Mahadevan wrote: > >>> ? I suggest making a shell MatMultAdd_Mine() that does everything then >>> also code a MatMult_Mine() that zeros the output vector and then calls >>> directly M

[petsc-users] Shell matrix and MatMultAdd.

2010-12-02 Thread Vijay S. Mahadevan
uggestion. I will implement the MatMultAdd in this way. Puristically speaking though, this does reverse the dependency between the two routines ! Vijay On Thu, Dec 2, 2010 at 2:51 PM, Barry Smith wrote: > > On Dec 2, 2010, at 2:45 PM, Vijay S. Mahadevan wrote: > >> Hi all, &g

[petsc-users] Shell matrix and MatMultAdd.

2010-12-02 Thread Vijay S. Mahadevan
Hi all, There is probably some minor inconsistency in my understanding but is there a fundamental difference between the following two options ? // Option 1 ierr = MatMult(A, solution, temporaryvec) ;CHKERRQ(ierr); ierr = VecAXPY(rhs, 1.0, temporaryvec) ;CHKERRQ(ierr); // Option 2 ierr = MatMultA

problem with -snes_mf_operator option

2008-03-27 Thread Vijay S. Mahadevan
problem, > >Barry > > I have added this information to the manual page for SNESSetJacobian() > > > > On Mar 26, 2008, at 4:14 PM, Vijay S. Mahadevan wrote: > > Hi all, > > > > I have a nonlinear solver test code that can use a user specified > &

problem with -snes_mf_operator option

2008-03-26 Thread Vijay S. Mahadevan
gt; example > and it works. I recommend you try > > cd src/snes/examples/tutorials > make ex5 > ./ex5 -snes_monitor -snes_view > ./ex5 -snes_monitor -snes_view -snes_mf > ./ex5 -snes_monitor -snes_view -snes_mf_operator > > Thanks, > > Matt >

problem with -snes_mf_operator option

2008-03-26 Thread Vijay S. Mahadevan
; If this is indeed the case for you - I'll respin 2.3.3 tarball with > the the updated bfort. > > Satish > > > > On Wed, 26 Mar 2008, Vijay S. Mahadevan wrote: > > > Hi all, > > > > I have a nonlinear solver test code that can use a user sp

problem with -snes_mf_operator option

2008-03-26 Thread Vijay S. Mahadevan
Hi all, I have a nonlinear solver test code that can use a user specified Jacobian function directly, set using SNESSetJacobian. Now if I use -snes_mf option, the solution scheme depends only on the residual and the convergence is equivalent to the case when using the real Jacobian matrix itself.

SNESSetApplicationContext usage

2008-03-25 Thread Vijay S. Mahadevan
-users at mcs.anl.gov [mailto:owner-petsc-users at > mcs.anl.gov] > On Behalf Of Matthew Knepley > Sent: Tuesday, March 25, 2008 9:16 PM > To: petsc-users at mcs.anl.gov > Subject: Re: SNESSetApplicationContext usage > > On Tue, Mar 25, 2008 at 8:54 PM, Vijay S. Mahadevan >

SNESSetApplicationContext usage

2008-03-25 Thread Vijay S. Mahadevan
cationContext usage > > On Tue, Mar 25, 2008 at 8:54 PM, Vijay S. Mahadevan > wrote: > > Hi, > > > > I am trying to use the SNESSetApplicationContext function to set an > object > > as a user application context. This is being done after the SNESSolve

SNESSetApplicationContext usage

2008-03-25 Thread Vijay S. Mahadevan
Hi, I am trying to use the SNESSetApplicationContext function to set an object as a user application context. This is being done after the SNESSolve was already called once on the SNES object, using a NULL application context. For some reason, after the SNESSetApplicationContext call, the applica

Creating a new vector based on a already distributed set of Vecs

2008-03-23 Thread Vijay S. Mahadevan
t: Re: Creating a new vector based on a already distributed set of > Vecs > > > On Mar 23, 2008, at 2:59 PM, Vijay S. Mahadevan wrote: > > Hi all, > > > > I am sure the subject line wasn?t too explanatory and so here goes. > > > > I have a system which alread

Creating a new vector based on a already distributed set of Vecs

2008-03-23 Thread Vijay S. Mahadevan
ey > Sent: Sunday, March 23, 2008 3:13 PM > To: petsc-users at mcs.anl.gov > Subject: Re: Creating a new vector based on a already distributed set of > Vecs > > 2008/3/23 Vijay S. Mahadevan : > > Hi all, > > > > I am sure the subject line wasn't too explanato

Creating a new vector based on a already distributed set of Vecs

2008-03-23 Thread Vijay S. Mahadevan
v] On Behalf Of Matthew Knepley Sent: Sunday, March 23, 2008 3:13 PM To: petsc-users at mcs.anl.gov Subject: Re: Creating a new vector based on a already distributed set of Vecs 2008/3/23 Vijay S. Mahadevan : > Hi all, > > I am sure the subject line wasn't too explanatory and so here

Creating a new vector based on a already distributed set of Vecs

2008-03-23 Thread Vijay S. Mahadevan
Hi all, I am sure the subject line wasn?t too explanatory and so here goes. I have a system which already has a Vec object created and distributed on many processors based on domain decomposition. I could have several such systems, each with a solution vector and a residual vector pertaining to

PCGetType question

2008-02-08 Thread Vijay S. Mahadevan
Hi all, I?ve been trying to figure out how exactly to find out the PCType for a given PC context. Here?s the sample code I?ve been trying to execute but to no avail. Method 1: PetscTruth isshell ; PetscTypeCompare((PetscObject)pc, PCSHELL, &isshell);