Jaekwang,
 

> [...] 
>
My governing equation is same with that of step-22, stokes flow 
> -nabla^2 u + grad p = f 
> -grad u = 0 
> but I want to impose 'f',
> To do this, I made function that gives me f value on each point. 
> For example, if I want function of f thats looks like f=(x^2,y^2); 
> I would make function like this...
> [...]
> After that I may consider this 'f' term when I assemble system. 
> but I don't see a way to how I should try modify following read lines of 
> the code from step-22 
> [...]
> const unsigned int component_i = fe.system_to_component_index(i).first;
> local_rhs(i) += fe_values.shape_value(i,q) * rhs_values[q](component_i) * 
> fe_values.JxW(q);  
>
[...]
>
> My 'f' is not '0' any more but it has multiple components. 
> in fact, the weak form of the governing equation '-nabla^2 u + grad p = f 
> ' also should have two components,..(x and y) ....
>
What you are doing already looks correct. In fact, this is how the 
right-hand side is treated in step-22 and is also suitable for a non-zero 
'f'.
The only thing you need to change is the implementation of 'RightHandSide' 
and that looks okay as well (provided you are only considering dim=2).
What is the problem you are observing?

Best,
Daniel

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to