Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
On Thu, 9 Sep 2010, John Peterson wrote: > On Thu, Sep 9, 2010 at 10:27 AM, Tim Kroeger > wrote: > >> LinearSolver::solve_only_on(const std::set*const) > > Are you sure you don't want to add one more overloaded solve() member > to LinearSolver? ;-) Good idea, and also I would suggest to rename

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
On Thu, 9 Sep 2010, Roy Stogner wrote: > 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*const) >> >> Likewise, System gets a method >> >> System::solve_only_on(cons

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread John Peterson
On Thu, Sep 9, 2010 at 10:27 AM, Tim Kroeger wrote: > My suggestion for an API in libMesh is as follows: > > LinearSolver gets a method > > LinearSolver::solve_only_on(const std::set*const) > Likewise, System gets a method > > System::solve_only_on(const std::set*const) Are you sure you don't wa

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Jed Brown
On Thu, 9 Sep 2010 10:41:29 -0500 (CDT), Roy Stogner wrote: > > On Thu, 9 Sep 2010, Tim Kroeger wrote: > > > System::solve_only_on(const std::set*const) You might want this to contain a communicator (i.e. be equivalent to a PETSc IS) and an ordering (as Roy says) so that the same API can provi

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Roy Stogner
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*const) > > after a call to which each call to LinearSolver::solve() will remove > all dofs not contained in the list from the m

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
On Thu, 9 Sep 2010, Tim Kroeger wrote: > On Thu, 9 Sep 2010, Jed Brown wrote: > >> On Thu, 9 Sep 2010 15:27:42 +0200 (CEST), Tim Kroeger >> wrote: >>> Dear all, >>> >>> Let X be a computational domain, covered by a Mesh on which an >>> EquationSystems object is based on. Let X2 be a subset of X

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Jed Brown
On Thu, 9 Sep 2010 16:47:38 +0200 (CEST), Tim Kroeger wrote: > As far as I understand, this allows me to specify a partition of X2 > into some subsets and then select solvers/preconditioners for these > subsets as well as a global method to combine them. However, I assume > that this will *no

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
On Thu, 9 Sep 2010, David Knezevic wrote: > On 09/09/2010 10:06 AM, Tim Kroeger wrote: >> >> On Thu, 9 Sep 2010, David Knezevic wrote: >> >>> You can specify variables that are defined only on X2 by specifying the >>> appropriate subdomain id(s) when you add the variable to the system. See >>> add

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
On Thu, 9 Sep 2010, Jed Brown wrote: > On Thu, 9 Sep 2010 16:14:39 +0200 (CEST), Tim Kroeger > wrote: >>> Do you want to assemble X, or are you really only working with X2? >> >> Most probably, my assmble method will loop over X but skip every >> element that is not contained in X2. This seems

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Jed Brown
On Thu, 9 Sep 2010 16:14:39 +0200 (CEST), Tim Kroeger wrote: > > Do you want to assemble X, or are you really only working with X2? > > Most probably, my assmble method will loop over X but skip every > element that is not contained in X2. This seems to be the easiest > assemble method at the

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread David Knezevic
On 09/09/2010 10:06 AM, Tim Kroeger wrote: > Dear David, > > On Thu, 9 Sep 2010, David Knezevic wrote: > >> You can specify variables that are defined only on X2 by specifying the >> appropriate subdomain id(s) when you add the variable to the system. See >> add_variable in system.h > > Thank you f

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
Dear Jed, On Thu, 9 Sep 2010, Jed Brown wrote: > On Thu, 9 Sep 2010 15:27:42 +0200 (CEST), Tim Kroeger > wrote: >> Dear all, >> >> Let X be a computational domain, covered by a Mesh on which an >> EquationSystems object is based on. Let X2 be a subset of X, given by >> the union of selected gr

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
Dear David, On Thu, 9 Sep 2010, David Knezevic wrote: > You can specify variables that are defined only on X2 by specifying the > appropriate subdomain id(s) when you add the variable to the system. See > add_variable in system.h Thank you for your reply. How does this solution behave if the s

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread Jed Brown
On Thu, 9 Sep 2010 15:27:42 +0200 (CEST), Tim Kroeger wrote: > Dear all, > > Let X be a computational domain, covered by a Mesh on which an > EquationSystems object is based on. Let X2 be a subset of X, given by > the union of selected grid elements (which are, say, marked by certain > value

Re: [Libmesh-users] Solve on part of domain

2010-09-09 Thread David Knezevic
Hi Tim, You can specify variables that are defined only on X2 by specifying the appropriate subdomain id(s) when you add the variable to the system. See add_variable in system.h David On 09/09/2010 09:27 AM, Tim Kroeger wrote: > Dear all, > > Let X be a computational domain, covered by a Mes

[Libmesh-users] Solve on part of domain

2010-09-09 Thread Tim Kroeger
Dear all, Let X be a computational domain, covered by a Mesh on which an EquationSystems object is based on. Let X2 be a subset of X, given by the union of selected grid elements (which are, say, marked by certain values of subdomain_id). Assume I want (at some point in my application) to sol