Javier,

values on the faces of cells, in particular the boundary of the
domain, are accessed through objects of type FEFaceValues.

Alternatively, if you use the MeshWorker interface, they are used
extensively in tutorial step 39.

Best,
Guido

On Fri, Nov 4, 2011 at 4:04 PM, Javier Muñoz <[email protected]> wrote:
> Hi
>
> I've been working and studying deal.ii for 3 or 4 months. So far I been
> able to set up a simple time dependent model of heat diffusion with free
> and fixed boundary conditions. I also was able to establish material
> properties based on material id's.
>
> My question might be very simple. I want to set up a function to
> calculate the heat flux in the surface based on a given 'external
> temperature' (read from a external file) and the temperature over that
> surface (i.e. newtons law of cooling). Based on step 7 I have this piece
> of code:
>
> typename DoFHandler<dim>::active_cell_iterator
>   cell = dof_handler.begin (),
>   endc = dof_handler.end ();
>     for (;cell != endc; ++cell)
>       {
>        cell_rhs = 0;
>        for (unsigned int face = 0;
>             face<GeometryInfo<dim>::faces_per_cell;
>             ++face)
>             if (cell->face(face)->at_boundary()
>                 &&
>                (cell->face(face)->boundary_indicator () == 2))
>                    {
>                    fe_face_values.reinit (cell,face);
>                    for (unsigned int q_point = 0;
>                         q_point < n_face_q_points;
>                         ++q_point)
>                         {
>                          const double neumann_value
>                              = 'problematic-function';
>                          for (unsigned int i = 0;
>                               i < dofs_per_cell;
>                               ++i)
>                                  cell_rhs (i) += (neumann_value *
>                                  fe_face_values.shape_value(i,q_point)*
>                                  fe_face_values.JxW (q_point));
>                          }
>                     }
>             cell -> get_dof_indices (local_dof_indices);
>             for (unsigned int i = 0; i<dofs_per_cell; ++i)
>                 {
>                   system_rhs(local_dof_indices [i]) += cell_rhs (i);
>                 }
>       }
>
> Here I'm trying to establish the neumann boundary condition but in order
> to determine the heat flux I need to know the value of temperature over
> the face. Are these values the degrees of freedom over the surface? If
> so, can I obtain them using get_dof_values (although I don't know
> exactly how)?
>
> I'll appreciate any clue you could give me.
>
> Regards
> Javier Muñoz
>
> _______________________________________________
> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
>



-- 
Guido Kanschat, Department of Mathematics, Texas A&M University

In accordance with the Texas Public Information Act all email sent to
and from my Texas A&M email account can be obtained through a Public
Information Request. If you do not want your correspondence public,
please arrange a phone conversation with me.
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to