Wolfgang,

Thanks for responding. Of course I can explain. So as stated my code 
creates a mesh from 0 to 16 with 5 cells. First from 0 to 4, then 4 to 8, 
then 8 to 12, then 12 to 14, and finally 14 to 16.

The code first outputs all the coordinate of all the face values just by 
iterating over them using the dof_handler cell/face iterator. So it prints:
############# Printing X values of center of faces ################
Face at x_val: 0
Face at x_val: 4
Face at x_val: 4
Face at x_val: 8
Face at x_val: 8
Face at x_val: 12
Face at x_val: 12
Face at x_val: 14
Face at x_val: 14
Face at x_val: 16

Then, it creates a matrix free operator and goes through applying the 
matrix free operator to a vector of zeros. The matrix free operator is 
built to do nothing for the cell and boundary face loops. However, for the 
interior face loops it is just supposed to print the coordinates of the 
quadrature points (since the face is just a point in 1D it should print the 
coordinate of the face). What it prints is:
#######################################################
Matrix Free Face Iteration
#######################################################
x_val: 4
x_val: 8
x_val: 14
x_val: 14

Then just to verify that the matrix free operator didn't change anything 
and I didn't have stray code changing anything I repeat the first part of 
the code that uses the dof_handler and it prints the exact same thing.

So what I expect to be different is this second part with the matrix free 
operator. I would expect it to print:
#######################################################
Matrix Free Face Iteration
#######################################################
x_val: 4
x_val: 8
x_val: 12
x_val: 14

Or basically to have "x_val: 12" anywhere in this section because 12 is the 
coordinate of an interior face of the mesh and is not currently included in 
the output of the code.. This only happens at the face between two cells of 
different refinement levels and only in 1D from my testing.

Thanks for your time,
Sean Johnson
On Wednesday, November 6, 2024 at 4:54:32 PM UTC-7 Wolfgang Bangerth wrote:

>
> On 11/5/24 13:53, Sean Johnson wrote:
> > 
> > In 1D for adaptive meshes, the matrix free operator is not iterating 
> > over the face/point that is between refinement levels.
> > 
> > I attached a code that basically just makes a mesh and refines the last 
> > cell. I use the dof_handler to print out all the coordinates of the 
> > faces. It does iterate over all the faces. However, the matrix free 
> > operator in its face iterator doesn't recognize the point between 
> > refinement levels as a face so I have it print out all the coordinates 
> > of faces and its obviously missing one.
> > 
> > The "mesh" is just a line from [0,16]. First it is divided into 4 cells. 
> > Then the final cell is further refined so there should be faces at: 
> > 0,4,8,12,14,16.
> > 
> > Again, feel free to correct me if I made a dumb mistake somewhere, but I 
> > did try the code in 2D and there were no problems there. The code is 
> > super simplistic and will not give you enough information about 
> > coordinates if you step up to 3D.
>
> Sean:
> I don't know much about the matrix-fee framework, and so can't say much 
> about whether it does what it's supposed to -- someone else will have to 
> chime in here.
>
> But can you describe what the code you attach outputs, and how that 
> differs from what you *expect* it to output? It's often difficult for 
> those who didn't write the code to say what is expected, and how what 
> you get differs from the expectation.
>
> Best
> WB
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/c168d33a-af80-4ba0-80aa-b53f9f284dd5n%40googlegroups.com.

Reply via email to