Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FE_DGQ::memory_consumption() is not implmented #9102

Closed
peterrum opened this issue Nov 27, 2019 · 1 comment · Fixed by #9183
Closed

FE_DGQ::memory_consumption() is not implmented #9102

peterrum opened this issue Nov 27, 2019 · 1 comment · Fixed by #9183

Comments

@peterrum
Copy link
Member

The method FE_DGQ::memory_consumption() is not implemented:

dealii/source/fe/fe_dgq.cc

Lines 822 to 828 in fe4975c

template <int dim, int spacedim>
std::size_t
FE_DGQ<dim, spacedim>::memory_consumption() const
{
Assert(false, ExcNotImplemented());
return 0;
}

so that the following program fails:

#include <deal.II/dofs/dof_handler.h>

#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria.h>

#include <deal.II/fe/fe_dgq.h>

using namespace dealii;

const int dim    = 2;
const int degree = 2;

int main()
{
    
    if(false)
    {
      Triangulation<dim> tria;
      GridGenerator::hyper_cube(tria);
    
      FE_DGQ<dim> fe(degree);
      DoFHandler<dim> dof_handler(tria);
      dof_handler.distribute_dofs (fe);
    
      // failing
      std::cout << dof_handler.memory_consumption () << std::endl;
    }
    
    if(true)
    {
      FE_DGQ<dim> fe(degree);
      
      // failing
      std::cout << fe.memory_consumption () << std::endl;
    }
    
}

Is there a particular reason we cannot use the implementation from FiniteElement?

@bangerth
Copy link
Member

bangerth commented Dec 3, 2019

What is the error message you get? Does one of the intermediate classes intercept the virtual function and produce an error of its own?

I believe that we should just implement this in the last class before FE_DGQ that actually stores data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants