Meshworker in dim=2, spacedim = 3

34 views
Skip to first unread message

Bonito Andrea

unread,
Apr 14, 2017, 11:47:22 AM4/14/17
to deal.II User Group
All:

I am trying to have the meshworker going for a problem set on a hyper surface. 
As far as I can tell, it seems that this feature is already incorporated but cannot understand the implementation of 

template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>

  void integration_loop(ITERATOR begin,

                        typename identity<ITERATOR>::type end,

                        DoFInfo<dim, spacedim> &dof_info,

                        IntegrationInfoBox<dim, spacedim> &box,

                        const LocalIntegrator<dim, spacedim> &integrator,

                        ASSEMBLER &assembler,

                        const LoopControl &lctrl = LoopControl())

  {

    std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> cell_worker;

    std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> boundary_worker;

    std_cxx11::function<void (DoFInfo<dim> &, DoFInfo<dim> &,

                              IntegrationInfo<dim, spacedim> &,

                              IntegrationInfo<dim, spacedim> &)> face_worker;

    if (integrator.use_cell)

      cell_worker = std_cxx11::bind(&LocalIntegrator<dim, spacedim>::cell, &integrator, std_cxx11::_1, std_cxx11::_2);


... 


The DoFInfo argument of LocalIntegrator<dim, spacedim>::cell  contains two templates <dim,spacedim>, which seems logical. However, the DoFinfo in cell_worker only takes a single template <dim>.
This creates an error at the compilation.

Am I missing something or the DoFInfo in cell_worker (and boundary_worker) should be DoFInfo<dim,spacedim> &     ?

Thanks in advance,
Andrea





Wolfgang Bangerth

unread,
Apr 14, 2017, 1:25:32 PM4/14/17
to dea...@googlegroups.com
On 04/14/2017 09:47 AM, Bonito Andrea wrote:
> *
> *
>
> template<intdim, intspacedim, classITERATOR, classASSEMBLER>
>
> voidintegration_loop(ITERATOR begin,
>
> typenameidentity<ITERATOR>::type end,
>
> DoFInfo<dim, spacedim> &dof_info,
>
> IntegrationInfoBox<dim, spacedim> &box,
>
> constLocalIntegrator<dim, spacedim> &integrator,
>
> ASSEMBLER &assembler,
>
> constLoopControl&lctrl = LoopControl())
>
> {
>
> std_cxx11::function<void(DoFInfo<dim>&, IntegrationInfo<dim,
> spacedim>&)> cell_worker;
>
> std_cxx11::function<void(DoFInfo<dim>&, IntegrationInfo<dim,
> spacedim>&)> boundary_worker;
>
> std_cxx11::function<void(DoFInfo<dim> &, DoFInfo<dim> &,
>
> IntegrationInfo<dim, spacedim> &,
>
> IntegrationInfo<dim, spacedim> &)>
> face_worker;
>
> if(integrator.use_cell)
>
> cell_worker = std_cxx11::bind(&LocalIntegrator<dim,
> spacedim>::cell, &integrator, std_cxx11::_1, std_cxx11::_2);
>
>
> ...
>
>
> The DoFInfo argument of LocalIntegrator<dim, spacedim>::cell contains
> two templates <dim,spacedim>, which seems logical. However, the DoFinfo
> in cell_worker only takes a single template <dim>.
> This creates an error at the compilation.
>
> Am I missing something or the DoFInfo in cell_worker (and
> boundary_worker) should be DoFInfo<dim,spacedim> & ?

I bet it has never been tested. You're right that it looks wrong. If you
make this change by hand, does it work?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Bonito Andrea

unread,
Apr 14, 2017, 2:55:17 PM4/14/17
to deal.II User Group
Unfortunately, I am using the dmg version and do not have access to the source files...

I might have to convince Luca to try it.

Andrea

Wolfgang Bangerth

unread,
Apr 14, 2017, 5:39:45 PM4/14/17
to dea...@googlegroups.com
On 04/14/2017 12:55 PM, Bonito Andrea wrote:
> Unfortunately, I am using the dmg version and do not have access to the
> source files...
>
> I might have to convince Luca to try it.

Alternatively, can you create a small program that shows the compiler
error? It doesn't have to do anything useful, just set up the necessary
data structures and then call the function that gives the error.

Someone else could then try with your little program. If you open a bug
report at https://github.com/dealii/dealii/issues/new I bet someone will
take a look at it within just a couple of days (but may not be able to
fix all downstream problems, if there is more to do than just add the
one template argument).

Bonito Andrea

unread,
Apr 15, 2017, 1:18:19 PM4/15/17
to deal.II User Group, bang...@colostate.edu
done, thanks.

Daniel Arndt

unread,
Apr 17, 2017, 11:02:37 AM4/17/17
to deal.II User Group, bang...@colostate.edu
Andrea,

This should be fixed upstream now. Have a look at PR #4265 [1].

Best, 
Daniel

Andrea Bonito

unread,
Apr 18, 2017, 10:36:07 AM4/18/17
to dea...@googlegroups.com, andrea.b...@gmail.com, Wolfgang Bangerth
Many thanks. 

Andrea

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

Reply all
Reply to author
Forward
0 new messages