Jost, For looping on the boundaries, you'll have to write an extra lambda amd pass that to the MeshWorker. You can look at step 12 or 74 for this. Also following this cause I want to know what are the MeshWorker alternatives since I am relying heavily on it in my code
Best, Abbas On Thursday, August 3, 2023 at 3:11:48 PM UTC+2 jost....@googlemail.com wrote: > Thanks for the quick response! > > Would you suggest me to read more tutorials on how the MeshWorker works to > fix this issue then or try to set up my program without a MeshWorker? I > thought I had set it up correctly and tried already for a while to figure > out what I did wrong. Also I Initially only started using the MeshWorker > because it seemed to be recommended in Step-72 and I thought following the > recommendations is probably the best and easiest way. Now I am not so sure > anymore about it. > > Best, > > Jost > > Wolfgang Bangerth schrieb am Donnerstag, 3. August 2023 um 14:49:44 UTC+2: > >> On 8/3/23 04:54, 'Jost Arndt' via deal.II User Group wrote: >> > >> > for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f) >> > { >> > if >> > (cell->face(f)->at_boundary())//(face->at_boundary()) >> > { >> > std::cout << "reached line >> 1032" << >> > std::endl; >> > const auto &fe_face_values = >> > scratch_data.reinit(cell, f); >> > std::cout << "reached line >> 1034" << >> > std::endl; >> > /* here integration using >> > fe_face_value should happen*/ >> > >> > but the last cout never gets executed, but the code crashes. I get a >> long but >> > cryptic (to me?) stacktrace but also the following error message: >> > >> > >> > An error occurred in line <3044> of file <./source/fe/fe_values.cc> in >> function >> > dealii::FEValuesBase<dim, spacedim>::FEValuesBase(unsigned int, >> unsigned int, >> > dealii::UpdateFlags, const dealii::Mapping<dim, spacedim>&, const >> > dealii::FiniteElement<dim, spacedim>&) [with int dim = 2; int spacedim >> > = 2] >> > The violated condition was: >> > n_q_points > 0 >> > Additional information: >> > There is nothing useful you can do with an FEValues object when >> using >> > a quadrature formula with zero quadrature points! >> > >> > From here I am quite unsure what I did wrong or how else to create the >> > FEFaceValues Object? I would be really thankful about any hint! >> >> The error likely means that MeshWorker hasn't initialized the >> FEFaceValues >> object. Nobody knows any more how MeshWorker really works, and so we try >> to >> discourage use of that framework. But I do know that MeshWorker allows >> you to >> not only loop over the cells, but also the faces of a triangulation. That >> is >> the recommended way to deal with face integrals (rather than dealing with >> these face integrals as part of cell integration -- because you want to >> make >> sure that you visit each face only once, rather than twice in your >> approach) >> and if you tell MeshWorker that you also want to use a face worker, then >> it >> should (?) initialize the FEFaceValues object as well. >> >> Best >> W. >> >> -- >> ------------------------------------------------------------------------ >> Wolfgang Bangerth email: bang...@colostate.edu >> 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 dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/90721349-725a-49e7-976c-7d989be0812bn%40googlegroups.com.