Hi Peter, 

yes, it is solved now. Thanks Peter. 

In deal.ii 9.2.0 the implementation detail of FESeries::Fourier constructor 
can take the first argument  of std::vector<unsigned int>, meanwhile in 
deal.ii 9.1 only unsigned int.

BR, 
Ihsan

On Monday, June 8, 2020 at 10:10:18 AM UTC+2, peterrum wrote:
>
> Dear Ihsan,
>
> is the issue solved now? I have compiled your code with the current 
> version of deal.II and it works.
>
> Peter 
>
> On Monday, 8 June 2020 09:56:21 UTC+2, A.Z Ihsan wrote:
>>
>> Oops, i was wrong. I followed the deal.ii 9.2.0 tutorial meanwhile in my 
>> local deal.ii version is 9.1.
>> There is a couple different implementation in terms of FESeries::Fourier.
>>
>> On Friday, June 5, 2020 at 12:25:47 PM UTC+2, A.Z Ihsan wrote:
>>>
>>> Hi Peter, 
>>> thank you for the answer. Actually i did put the fe_series.h. 
>>> I forgot to mention that the problem arise when i use template 
>>> specialization by the end the implementation
>>>
>>> #include <deal.II/hp/fe_values.h>
>>> #include <deal.II/fe/fe_series.h>
>>> #include <deal.II/fe/fe_q.h>
>>> #include <deal.II/lac/vector.h>
>>>
>>> using namespace dealii;
>>>
>>> namespace hpfe{
>>> template <int dim, typename VectorType>
>>> class HPSolver
>>> {
>>> public:
>>>  HPSolver(
>>>      const unsigned int max_fe_degree);
>>>  //virtual ~HPSolver();
>>>
>>>     const hp::FECollection<dim>& get_fe_collection();
>>>  const hp::QCollection<dim-1>& get_face_quadrature_collection();   
>>>  
>>> protected:
>>>  hp::FECollection<dim> fe_collection;
>>>  hp::QCollection<dim> quadrature_collection;
>>>  hp::QCollection<dim-1> face_quadrature_collection;
>>>  hp::QCollection<dim>  fourier_q_collection;
>>>  std::unique_ptr<FESeries::Fourier<dim>> fourier;
>>>  std::vector<double>                     ln_k;
>>>  Table<dim, std::complex<double>>        fourier_coefficients;
>>> };
>>>
>>> template <int dim, typename VectorType>
>>> HPSolver<dim, VectorType>::HPSolver(
>>>  const unsigned int max_degree)
>>> {
>>>  for (unsigned int degree=2; degree <= max_degree; ++degree)
>>>    {
>>>      fe_collection.push_back(FE_Q<dim>(degree));
>>>      quadrature_collection.push_back(QGauss<dim>(degree+1));
>>>      face_quadrature_collection.push_back(QGauss<dim-1>(degree+1));
>>>    }
>>>  const unsigned int N = max_degree;
>>>  QGauss<1>      base_quadrature(2);
>>>  QIterated<dim> quadrature(base_quadrature, N);
>>>  for (unsigned int i = 0; i < fe_collection.size(); i++)
>>>    fourier_q_collection.push_back(quadrature);
>>>  std::vector<unsigned int> n_coefficients_per_direction(fe_collection.
>>> size(), N);
>>>  fourier = std::make_unique<FESeries::Fourier<dim>>(n_coefficients_per_
>>> direction, fe_collection, fourier_q_collection);
>>>  //resize(fourier_coefficients, N);
>>> }
>>> }
>>> template class hpfe::HPSolver<3, Vector<double>> ;
>>>
>>> can you try once more?
>>>
>>> BR, 
>>> ihsan
>>>
>>>
>>>> On Friday, 5 June 2020 10:40:29 UTC+2, A.Z Ihsan wrote:
>>>>>
>>>>>
>>>>> Hi All, 
>>>>>
>>>>> I am trying to implement hp-fem into my problem according to the 
>>>>> step-27. But, i have an error when i am trying to compile, 
>>>>>
>>>>> error: no matching function for call to 'dealii::FESeries::Fourier<3, 
>>>>>> 3>::Fourier(std::vector<unsigned int>&, dealii::hp::FECollection<3, 3>&, 
>>>>>> dealii::hp::QCollection<3>&)'
>>>>>>      { return unique_ptr<_Tp>(new 
>>>>>> _Tp(std::forward<_Args>(__args)...)); }
>>>>>
>>>>>
>>>>> i believe there is a mistake in assigning fourier, but i copied the 
>>>>> step-27 exactly. 
>>>>> Here is the code snippet... could someone help me?
>>>>>
>>>>> template <int dim, typename VectorType>
>>>>> class HPSolver
>>>>> {
>>>>> public:
>>>>>     HPSolver(
>>>>>         const unsigned int max_fe_degree);
>>>>>     virtual ~HPSolver();
>>>>>
>>>>>     const hp::FECollection<dim>& get_fe_collection();
>>>>>     const hp::QCollection<dim-1>& get_face_quadrature_collection();   
>>>>>  
>>>>> protected:
>>>>>     hp::FECollection<dim> fe_collection;
>>>>>     hp::QCollection<dim> quadrature_collection;
>>>>>     hp::QCollection<dim-1> face_quadrature_collection;
>>>>>     hp::QCollection<dim>  fourier_q_collection;
>>>>>     std::unique_ptr<FESeries::Fourier<dim>> fourier;
>>>>>     std::vector<double>                     ln_k;
>>>>>     Table<dim, std::complex<double>>        fourier_coefficients;
>>>>> };
>>>>>
>>>>> template <int dim, typename VectorType>
>>>>> HPSolver<dim, VectorType>::HPSolver(
>>>>>     const unsigned int max_degree,
>>>>>     :
>>>>>     max_fe_degree(max_degree)
>>>>> {
>>>>>     for (unsigned int degree=2; degree <= max_fe_degree; ++degree)
>>>>>       {
>>>>>         fe_collection.push_back(FE_Q<dim>(degree));
>>>>>         quadrature_collection.push_back(QGauss<dim>(degree+1));
>>>>>         face_quadrature_collection.push_back(QGauss<dim-1>(degree+1));
>>>>>       }
>>>>>     const unsigned int N = max_fe_degree;
>>>>>     QGauss<1>      base_quadrature(2);
>>>>>     QIterated<dim> quadrature(base_quadrature, N);
>>>>>     for (unsigned int i = 0; i < fe_collection.size(); i++)
>>>>>       fourier_q_collection.push_back(quadrature);
>>>>>     std::vector<unsigned int> 
>>>>> n_coefficients_per_direction(fe_collection.size(), N);
>>>>>     fourier = 
>>>>> std_cxx14::make_unique<FESeries::Fourier<dim>>(n_coefficients_per_direction,
>>>>>  
>>>>> fe_collection, fourier_q_collection);
>>>>>     resize(fourier_coefficients, N);
>>>>> }
>>>>>
>>>>> BR, 
>>>>> Ihsan
>>>>>
>>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e727a6be-029d-476c-a418-689412e15196o%40googlegroups.com.

Reply via email to