> From: Kirk, Benjamin (JSC-EG) [mailto:[EMAIL PROTECTED]
> Sent: Tue 9/30/2008 8:45 PM
> To: Adam Arbree; libmesh-users@lists.sourceforge.net
> Subject: Re: [Libmesh-users] (no subject)


> One of the more hackish ways to handle the situation would be to only declare
> one system and use a static counter inside your assemble() function to
> actually assemble (and thus solve) the different systems.  Roy or John??

Static may not even be required.  I think a single system with 3
different matrix assembly "branches" is what you want.

for (qp)
  for (i)
    for (j)
      switch (system_num) // A variable you define to order the 3 systems
      case 1:
        K(i,j) += something; break;
      case 2:
        K(i,j) += something else; break;
      end switch
    end j
  end i
end qp

I've done this in the past to assemble different right-hand side
vectors depending on whether I was solving the main system or an
auxiliary arclength continuation system of equations.  It should be
straightforward to extend that to the matrix assembly itself as in the
pseudocode above.

Of course, this litters the code with switch blocks, but I think the
DoF savings would be worth it.  You will also need to add extra
vectors to the system before initialization to store the extra rhs's
and solutions, if say there is a 1-way coupling between the different
systems.

-- 
John

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to