On 4/3/19 8:04 AM, Muhammad Mashhood wrote:
>
> I am trying to apply the Neumann (force)
> BC on the edge using the right_hand_side() function which I modified as
> following:
>
>
> void right_hand_side (const std::vector<Point<dim> > &points, // the active
> cell is also imported when right hand side is called to induce some Neumann BC
> std::vector<Tensor<1, dim> > &values,
> typename DoFHandler<dim>::active_cell_iterator &
> cell_in_rhs)
>
> for (unsigned int f=0; f < GeometryInfo<dim> :: faces_per_cell; ++f)
> {
> if (cell_in_rhs->face(f)->at_boundary() &&
> cell_in_rhs->face(f)->boundary_id() == 3)
> {
> std::cout << "points.size(): "<<
> points.size()<<"
> :"<<std::endl;
> values[0][1] = 2.0;
> values[2][1] = 2.0;
>
> }
> }
>
I don't think I understand this code. The Neumann boundary conditions only
appear in *boundary* integrals. How are you using the function you have here?
For integrals over cells (using FEValues) or integrals over faces
(FEFaceValues)? If it is the latter, you are integrating over *one specific
face* of the current cell, so it makes no sense to loop over all faces *within
this function*.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.