On Thu, 9 Sep 2010, Tim Kroeger wrote:

> My suggestion for an API in libMesh is as follows:
>
> LinearSolver gets a method
>
> LinearSolver::solve_only_on(const std::set<unsigned int>*const)
>
> after a call to which each call to LinearSolver::solve() will remove
> all dofs not contained in the list from the matrix before actually
> solving.  The default implementation of this will be
> libmesh_not_implemented(), and only for PetscLinearSolver, I will
> implement the solution using MatGetSubMatrix() as Jed pointed out.
> (Optionally, an efficient load balancing using PCFieldSplit() can be
> added later.)
>
> Likewise, System gets a method
>
> System::solve_only_on(const std::set<subdomain_id_type>*const)
>
> which makes System::solve() call LinearSolver::solve_only_on() with
> the correct index set, that is, sucht that it solves on all dofs that
> are associated with at least one elem having a subdomain_id value that
> is contained in the list.
>
> Calling either solve_only_on(NULL) should in both cases restore the
> default behaviour.
>
> libMesh developers, what do you think?

I like it...

I think I'd prefer to have the std::set arguments limited to dof ids
and make it a std::vector for subdomain ids.  That way people could do
a System::solve_only_on for subsets like patches that aren't
predefined as subdomains.

Also, we'd like to have the same functionality for nonlinear solves too, but
it's fine to start with just LinearSolver.

One question, since I haven't followed the thread closely enough: what
are the effective boundary conditions on subset boundaries which don't
correspond to domain boundaries?  The dofs outside the subset would be
treated as fixed, but neighboring dofs would still make their
contributions to the subsystem?
---
Roy

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to