[petsc-users] Eigenvalue Problem, Dirichlet BC and DMPlex

Matthew Knepley knepley at gmail.com
Fri Apr 19 20:57:01 CDT 2013


On Fri, Apr 19, 2013 at 7:36 PM, Dharmendar Reddy
<dharmareddy84 at gmail.com>wrote:

> Hello,
>          I need to assemble the operators for an eigenvalue problem.
> Consider for example a 1D Schrodinger equation
>
> -div(grad(psi)) = E psi   for x in [0, L] and psi(0) = 0 and psi(L) = 0
>
> I understand how to get the 1D mesh into a DM object.
>
> I was thinking to create the default section using 1 scalar field per node
> add boundary points.
>
> Use DMCreateMatrix to get the operators.
>
> Now if i do element by element assembly,
> Do i need to use matsetclosure or masetvalues?
>

MatSetClosure() just calls GetTransitiveClosure()+SectionGetOffset() to
translate points to indices, and then calls MatSetValues(). In some sense,
its a convenience method.


> how are the elements with boundary nodes handled ?
>

You choose. If you want boundary dofs eliminated, use the mechanism in the
PetscSection.
Otherwise, use the linear algebra tools like MatZeroRowsColumns().


> Are the values for boundary nodes ignored ?
>

See above.

    Matt


> I will pass the assembled operators to slepc to solve the eigenvalue
> problem.
>
> Thanks
> Reddy
>
>
>
> --
> -----------------------------------------------------
> Dharmendar Reddy Palle
> Graduate Student
> Microelectronics Research center,
> University of Texas at Austin,
> 10100 Burnet Road, Bldg. 160
> MER 2.608F, TX 78758-4445
> e-mail: dharmareddy84 at gmail.com
> Phone: +1-512-350-9082
> United States of America.
> Homepage: https://webspace.utexas.edu/~dpr342
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130419/b635c165/attachment.html>


More information about the petsc-users mailing list