[aspect-devel] cannot allocate an object of abstract type ‘aspect::MaterialModel::Simpler<3>’
Lev Karatun
lev.karatun at gmail.com
Tue Feb 14 21:10:19 PST 2017
Hi Wolfgang,
on the branch I'm talking about all the changes are within the plugins and
tests folders. Here's the full error message:
In file included from
>> /home/lev/aspect/aspect_new_release/include/aspect/material_model/interface.h:25:0,
>
> from
>> /home/lev/aspect/aspect_new_release/include/aspect/material_model/simpler.h:24,
>
> from
>> /home/lev/aspect/aspect_new_release/source/material_model/simpler.cc:22:
>
> /home/lev/aspect/aspect_new_release/include/aspect/plugins.h: In
>> instantiation of ‘static InterfaceClass*
>> aspect::internal::Plugins::RegisterHelper<InterfaceClass,
>> ModelClass>::factory() [with InterfaceClass =
>> aspect::MaterialModel::Interface<2>; ModelClass =
>> aspect::MaterialModel::Simpler<2>]’:
>
> /home/lev/aspect/aspect_new_release/include/aspect/plugins.h:76:30:
>> required from ‘aspect::internal::Plugins::RegisterHelper<InterfaceClass,
>> ModelClass>::RegisterHelper(void (*)(const string&, const string&, void
>> (*)(dealii::ParameterHandler&), InterfaceClass* (*)()), const char*, const
>> char*) [with InterfaceClass = aspect::MaterialModel::Interface<2>;
>> ModelClass = aspect::MaterialModel::Simpler<2>; std::string =
>> std::basic_string<char>]’
>
> /home/lev/aspect/aspect_new_release/source/material_model/simpler.cc:141:5:
>> required from here
>
> /home/lev/aspect/aspect_new_release/include/aspect/plugins.h:86:33: error:
>> cannot allocate an object of abstract type
>> ‘aspect::MaterialModel::Simpler<2>’
>
> return new ModelClass();
>
> ^
>
> In file included from
>> /home/lev/aspect/aspect_new_release/source/material_model/simpler.cc:22:0:
>
> /home/lev/aspect/aspect_new_release/include/aspect/material_model/simpler.h:43:11:
>> note: because the following virtual functions are pure within
>> ‘aspect::MaterialModel::Simpler<2>’:
>
> class Simpler : public Interface<dim>
>
> ^
>
> In file included from
>> /home/lev/aspect/aspect_new_release/include/aspect/material_model/simpler.h:24:0,
>
> from
>> /home/lev/aspect/aspect_new_release/source/material_model/simpler.cc:22:
>
> /home/lev/aspect/aspect_new_release/include/aspect/material_model/interface.h:657:24:
>> note: double aspect::MaterialModel::Interface<dim>::reference_density()
>> const [with int dim = 2]
>
> virtual double reference_density () const = 0;
>
> ^
>
>
>
Best regards,
Lev Karatun.
2017-02-14 18:54 GMT-05:00 Wolfgang Bangerth <bangerth at tamu.edu>:
> On 02/14/2017 01:34 PM, Lev Karatun wrote:
>
>> Hi all,
>>
>> I was updating Aspect to the recent version (with plugins on top of it)
>> but I'm getting the following error when trying to compile it:
>> /home/lev/aspect/aspect_new_release/include/aspect/plugins.h:86:33:
>> error: cannot allocate an object of abstract type
>> ‘aspect::MaterialModel::Simpler<3>’
>> return new ModelClass();
>>
>
> There should be another piece of text after that that says something along
> the lines "...because the following function is abstract: ...". Can you
> post that as well?
>
> Do you have any changes in your code base compared to the upstream
> repository?
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bangerth at colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20170215/d75ddfb5/attachment.html>
More information about the Aspect-devel
mailing list