MeshWorker + Hanging Nodes + assemble all faces from interior side

46 views
Skip to first unread message

Scott Miller

unread,
Jun 13, 2013, 1:27:01 AM6/13/13
to dea...@googlegroups.com
Hi,

I have another MeshWorker problem that I am trying to work through.  I am currently trying to assemble all face terms from the interior side of the element; this means that each face is visited twice (well, for conforming meshes).  The problem I ran into is that MeshWorker only assembles face terms from the more refined side.  I added some code (below, line ~187 of meshworker/loop.h) to enable assembling a face term from the coarser element side.  This code will compile and run fine, but my test results do not look good; that is, it looks like the fluxes are not being assemble correctly.  I have attached a picture of what *should* be a uniformly zero solution.

Any thoughts?  Notice anything I may have done wrong in this code?

Thanks.

-Scott


/************* Code snippet, starts at line 187 of meshworker/loop.h ***********/
              else if (!unique_faces_only && neighbor->has_children()) 
                { 
                // Since we are now dealing with assembling 
                // each face itself (i.e. !unique_faces_only),
                // we must deal with assembly the current face 
                // when the neighbor is more refined
                  const unsigned int neighbor2=cell->neighbor_of_neighbor(face_no);
for (unsigned int subface_no=0;
subface_no < face->n_children();
++subface_no)
   {
    TriaIterator<typename ITERATOR::AccessorType>
      neighbor_child
      = cell->neighbor_child_on_subface (face_no, subface_no);
   
     const typename ITERATOR::AccessorType::Container::face_iterator 
     nface = neighbor_child->face(neighbor2);
     Assert (nface == face->child(subface_no), ExcInternalError());
     Assert (neighbor_child->has_children() == false, 
         ExcInternalError());
              dof_info.interior_face_available[face_no] = true;
                      dof_info.exterior_face_available[face_no] = true;
                      
                      dof_info.interior[face_no].reinit(
                        cell, face, face_no, subface_no);
                      info.subface.reinit(dof_info.interior[face_no]);
                      dof_info.exterior[face_no].reinit(neighbor_child, nface, neighbor2);
                      info.neighbor.reinit(dof_info.exterior[face_no]);
                      
                      face_worker(dof_info.interior[face_no], dof_info.exterior[face_no],
                              info.subface, info.neighbor);
}//subfaces
                }
               else {
                  // Neighbor is....
/****************************************************************************************************************/
meshworker_hangingnode_test.png

Guido Kanschat

unread,
Jun 13, 2013, 7:01:25 AM6/13/13
to deal. II user group

Hi Scott,

I am at a conference with only limited access (cell phone). Thus, please excuse I can only attempt a preliminary answer.

The reason I only assembled in the refined side was, that the sub face values were only needed on the cell, but on the neighbors. Have you checked that the data you generate gets stored as expected? The assembler may not expect the data as it is produced this way.

Best, Guido

--
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 dealii+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Scott Miller

unread,
Jun 13, 2013, 8:54:03 PM6/13/13
to dea...@googlegroups.com
Hi Guido,

I found that the problem with using subfaces on the current cell is that the reinit(cell, face_iterator, face_no, surface_no) calls would zero the data already calculated on previous subfaces.  My hack of a solution was to add an additional flag to the reinit function saying whether or not to zero the data.  

I have attached a patch with my local changes to meshworker/loop.h and meshworker/dof_info.h

Thanks,
Scott
meshworker.patch
Reply all
Reply to author
Forward
0 new messages