Modification of step 26

32 views
Skip to first unread message

Retired Replicant.

unread,
Dec 12, 2015, 9:17:46 AM12/12/15
to deal.II User Group
Hi
I want to modify the HeatEquation in step 26 to a nonlinear heat equation.

I derived a class Coeff frm the function class that the makematrix tool accepts as a prameter, now I want the solution to be visible to Coeff so that I can calculate the new Diffusion Coefficient based on the value of the solution at that point. How can I access the value of the solution ?

How is that possible ?
thanks in advance.

RAJAT ARORA

unread,
Dec 12, 2015, 2:39:49 PM12/12/15
to deal.II User Group
Hi, 

I am also new to deal.ii. I tried solving a non-linear equation in which I passed a vector, which just contained values of solution vector at the Gauss points.
You can easily do so by using 

FEValues<dim> fe_values(fe, quadrature formula, <all flags here>). 
Then, use the get_function_values to get the nodal solution vector local to the cell. You can send this vector to the function for calculating the values of coefficient.

I hope this helps.

-Rajat
Reply all
Reply to author
Forward
0 new messages