To those who might be following in my footsteps and encounter similar 
questions:

   - For understanding how accessors/iterators work, the following page was 
   indispensible: 
   https://dealii.org/developer/doxygen/deal.II/group__Iterators.html -- I 
   don't know how I missed it the first time around
   - For transferring bulk fields to surface fields and vice-versa, the 
   GridGenerator::extract_boundary_mesh does *not* keep the dof orientation 
   between the surface cells and the bulk cell faces from which they were 
   extracted
   - However, the map that it returns can be coupled with a DoFHandler loop 
   to construct a DoF map between the extracted surface field and bulk fields, 
   which makes data transfer between the two painless once it's done
   - If all else fails, you can do a one-time comparison of support points 
      to build the DOF map, see the documentation for 
      DoFTools::map_to_support_points
      
I found that this approach was easier than the periodic boundary condition 
approach, although both worked.

Thanks, Simon and David!
Corbin

On Saturday, May 1, 2021 at 9:36:02 PM UTC-4 Corbin Foucart wrote:

> Thank you, Simon and David. Both answers were helpful. I will try 
> implementing it both ways for practice.
>
> Best,
> Corbin
>
> On Thursday, April 29, 2021 at 8:40:48 AM UTC-4 [email protected] wrote:
>
>> Corbin,
>>
>> if you only ever need the DoF mapping periodic 
>> DoFTools::make_periodicity_constrainst (
>> https://www.dealii.org/current/doxygen/deal.II/namespaceDoFTools.html#a03324e6e060c6a55191b2c60ad871eab)
>>  
>> sound like the right tool for you to use.
>> Just create a separate AffineConstraints object to be filled and hand it 
>> to that function. Then, you can loop through the filled object to either 
>> use it as a map directly or you can create a separate data structure. Note 
>> that the constraints might not be in the order (bottom -> top) you need 
>> them to be. So you might need to adjust that yourself.
>>
>> Best,
>> Daniel
>>
>>
>> Am Do., 29. Apr. 2021 um 04:48 Uhr schrieb Corbin Foucart <
>> [email protected]>:
>>
>>> Hi all,
>>>
>>> I'm looking to map DoF from the bottom of an extruded volumetric mesh to 
>>> the corresponding DOF on the surface of the mesh. Right now, I'm saving the 
>>> cell "number"/ID of each cell in the bottom layer of the volume mesh, and 
>>> want to match it with a surface cell by comparing their centers
>>>
>>>    - I could loop over all the volume cells until I find the one 
>>>    matching the surface cell center, but as I have the cell numbers, I 
>>> would 
>>>    rather access the cell center from the cell id (which looks to me like 
>>> an 
>>>    unsigned int)
>>>    - something like get_cell(cell_id)->center  --- is this possible?
>>>    - Alternatively, I was thinking that a periodic boundary condition 
>>>    linking the bottom of the volume mesh with the top might be able to 
>>> achieve 
>>>    the same thing, but I wasn't sure how to go about setting it up
>>>
>>> Any pointers would be appreciated!
>>> Corbin
>>>
>>> -- 
>>> 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/122e1b62-e672-446b-8c25-ce6012c1fe3fn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/dealii/122e1b62-e672-446b-8c25-ce6012c1fe3fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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/c56ca4f3-4436-435b-be5b-9c16dc8c5287n%40googlegroups.com.

Reply via email to