Praveen - all right. I will give it a shot at using ResidualSimple then. Thanks!
Anybody used the Functional assembler? Would that fit better in my case?

-- Mihai




________________________________
Von: Praveen C <[email protected]>
An: mihai alexe <[email protected]>
CC: deal.ii <[email protected]>
Gesendet: Sonntag, den 6. Februar 2011, 22:46:00 Uhr
Betreff: Re: [deal.II] calculating integral functional using MeshFramework




On Mon, Feb 7, 2011 at 7:26 AM, mihai alexe <[email protected]> wrote:

Hi all,
>
>I am trying to evaluate an integral-type functional, say \int_\Omega -(\Delta 
>q) 
>* delta_q dx (+ some other boundary/volume terms) where \Delta is the 
>Laplacian. 
>I'm looking into the MeshWorker framework for this... which class would be the 
>best choice to put together this integral given that both q and delta_q are 
>known (I have them as Vector<double> and Function<dim>, respectively). I have 
>tried doing things with MeshWorker::Assembler::ResidualSimple, but I cannot 
>initialize it with a dummy Vector<double>. Instead, it wants a NamedData 
>object 
>whose purpose I don't quite understand.
>
>

I have used MeshWorker to compute the right hand side like this
 // Attach rhs vector to assembler
MeshWorker::Assembler::ResidualSimple<Vector<double>>
 
      assembler;  
   NamedData<Vector<double>*>rhs;
 
   Vector<double>*data =&right_hand_side;
 
   rhs.add (data,"RHS");
 
   assembler.initialize (rhs);

 
All steps above are necessary, though I too dont understand their purpose.

praveen

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to