Hi Phani,

Hmm… interesting. I think that you may be using the class in a way that we did 
not expect - I think that we intended it to store a struct/class rather than a 
primitive data type. I think that this should be an easy fix, namely that this 
assert (and perhaps others) need to be extended to read something like
(std::is_base_of<DataType, T>::value || std::is_same<DataType, T>::value)

Would you like to try to see if that small change fixes the problem, or else 
would you mind please providing us with a full minimal test case that 
reproduces the problem? In the mean time you could also simply wrap your single 
double in a struct which should circumvent the issue.

Best regards,
Jean-Paul

> On 28 Oct 2017, at 02:31, Phani Motamarri <pha...@umich.edu> wrote:
> 
> Hi,
> 
> I am trying to create a quadrature Point data in the form of CellDataStorage. 
> My quadrature point data are of of type "double" and hence I do the following
> 
>   CellDataStorage<typename DoFHandler<3>::active_cell_iterator,double> 
> rhoQuadData;
>    typename DoFHandler<3>::active_cell_iterator cell_start = 
> dofHandler.begin_active(), cell_end = dofHandler.end(); //// dofHandler is 
> previously created and is associated with the a finite-element mesh
> 
>    rhoQuadData.initialize<double>(cell_start,
>                                                  cell_end,
>                                                  n_q_points);
> 
>   I get a compilation error which says
> 
>    error: static assertion failed with "User's T class should be derived from 
> user's DataType class"
>     static_assert(std::is_base_of<DataType, T>::value,
>     ^
>           detected during:
>             instantiation of "void dealii::CellDataStorage<CellIteratorType, 
> DataType>::initialize(const CellIteratorType &, unsigned int) [with 
> CellIteratorType=dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<3,
>  3>, false>>, DataType=double, T=double]" at line 532
>             instantiation of "void dealii::CellDataStorage<CellIteratorType, 
> DataType>::initialize(const CellIteratorType &, const CellIteratorType &, 
> unsigned int) [with 
> CellIteratorType=dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<3,
>  3>, false>>, DataType=double, T=double]" at line 120 of 
> "/home/phanim/KohnShamCodes/DEALIICode/dft-fe/src/./dft/project.cc
> 
> 
> This is very strange to me as DataType and T are both "double" but still I 
> get this static assertion error. Could you please let me know if I am missing 
> anything here?
> 
> Thanks
> Phani
> 
> -- 
> The deal.II project is located at http://www.dealii.org/ 
> <http://www.dealii.org/>
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> <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 
> <mailto:dealii+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to