Have you tried this? I think it should work, but it will be faster for you
(and for us) if you just played with stuff and tried whether it actually
works :-)

   - Yay! That actually worked. Thank you all the help. I now have some
   working code to start with.

Regards,
Krishna


On Fri, 13 Mar 2020 at 23:47, Wolfgang Bangerth <[email protected]>
wrote:

> On 3/13/20 5:34 PM, Krishnakumar Gopalakrishnan wrote:
> >
> > Looking at step-7 and adapting it a little bit, does the following code
> look
> > reasonable to mark the boundary ID of the left edge as '1' for later
> setting
> > its flux?
> >
> > for (const auto &cell : triangulation.cell_iterators
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fgroup__CPP11.html%23ga7295c669f32e78c45446ddc236f19136&data=02%7C01%7CWolfgang.Bangerth%40colostate.edu%7C78a1855a0a7a4b3ac25608d7c7a716c5%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637197392773455746&sdata=c5HWHjdx99F5AhA4Si5Zesfqc3krTMVywMf6E7nso2Y%3D&reserved=0
> >())
> > for (const auto &face : cell->face_iterators())
> >      {
> > const auto center = face->center();
> > if (std::fabs(center(0)) < 1e-12)
> >           face->set_boundary_id(1);
> >      }
> >
> >
> > This is based on my assumption that center(0) method of a face iterator
> shall
> > return the actual co-ordinate itself (since in the 1D case, the face
> > degenerates to a single point and its center is the same).
>
> Have you tried this? I think it should work, but it will be faster for you
> (and for us) if you just played with stuff and tried whether it actually
> works :-)
>
>
> > On a related note,
> > when we use the arrow operator, under which page should I look up the
> > documentation. Searching for center() returns a whole lot of results in
> doxygen.
>
> The class in question is TriaAccessor.
>
> Best
>   WB
>
> --
> ------------------------------------------------------------------------
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/fbWdIUNF-SI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/f8095857-cb3a-360c-34e9-a54ba561b27c%40colostate.edu
> .
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CABvf3kYz3mzVcHc2PLRA0t%3D5Tc8Fj%3Dvzk4zeujm3pGqt44gGnA%40mail.gmail.com.

Reply via email to