use of "meshworker" for FESystem

31 views
Skip to first unread message

Jaekwang Kim

unread,
Feb 7, 2018, 4:55:19 PM2/7/18
to deal.II User Group

Hi, all.

I am curious about whether i can use  MeshWorker: class for FESystem.

I am trying to solve system, 

that I need to solve 'stokes flow' and then use velocity solution to solve other scalar transport equation using DG method 

that looks like 

I solve for \lambda, and u is known from stokes solver. h(x,y) and f(x,y) is also known.  


So I declared my FESystem as, 


  template <int dim>

    StokesProblem<dim>::StokesProblem (const unsigned int degree)

    :

    degree (degree),

    triangulation (Triangulation<dim>::allow_anisotropic_smoothing),

        fe (FE_Q<dim>(degree+1), dim,

        FE_Q<dim>(degree), 1,

        FE_DGQ<dim>(degree+1), 1),

    dof_handler (triangulation)

    {}



Afte solving stokes system just as in step-22, 

I need mesh-worker after that 

however when I try to reinitialize info_box, I receive errors like 

 template <int dim>

    void StokesProblem<dim>::setup_mesh_worker ()

    {

        std::cout << "Setting up mesh worker ...\n";

        

        MeshWorker::IntegrationInfoBox<dim> info_box;

        const unsigned int n_gauss_points = dof_handler.get_fe().degree+1; // I haven't thought about this.

        

        //Since quadratures for cells, boundary, and interior faces can be selected independently,

        //We have to hand over this three times.

        info_box.initialize_gauss_quadrature(n_gauss_points,

                                             n_gauss_points,

                                             n_gauss_points);

        

        info_box.initialize_update_flags();

        UpdateFlags update_flags = update_quadrature_points |

        update_values            |

        update_gradients;

        info_box.add_update_flags(update_flags, true, true, true, true);

        

        const MappingQ<dim> mapping (degree);

        


        info_box.initialize (fe , mapping); //Note that  ' FESystem<dim> fe'

    }



I am receiving error saying that


An error occurred in line <1198> of file </Users/kimjaekwang/dealii-8.4.1/include/deal.II/dofs/dof_handler.h> in function

    const FiniteElement<dim, spacedim> &dealii::DoFHandler<2, 2>::get_fe() const [dim = 2, spacedim = 2]

The violated condition was: 

    selected_fe!=0

The name and call sequence of the exception was:

    ExcMessage("You are trying to access the DoFHandler's FiniteElement object before it has been initialized.")

Additional Information: 

You are trying to access the DoFHandler's FiniteElement object before it has been initialized.


I would appreciate very much anyone who helps me...

Thanks, 

Jaekwang 

Daniel Arndt

unread,
Mar 25, 2018, 4:13:32 AM3/25/18
to deal.II User Group
Jaekwang,

do you have a minimal compilign example that shows the problem?
Did you call dof_handler.distribute_dofs(fe)?

Best,
Daniel

JAEKWANG KIM

unread,
Mar 26, 2018, 1:15:14 PM3/26/18
to dea...@googlegroups.com
Thanks for the attetion. 
I overcame this problem, though I don’t recognize what was solution now. 
It turns out to be possible…

Thank you for your time 

Jaekwang  



--
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/zDT4ItovbJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages