[deal.II] Re: hp fem error assigning Fourier
Hi Ishan! You are correct: We opted for a more versatile approach in transforming solutions into Fourier or Legendre series with deal.II 9.2. Glad you figured it out! Marc -- 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/4e2f4bba-e2a6-4269-acb1-21bf03b2126co%40googlegroups.com.
[deal.II] Re: hp fem error assigning Fourier
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, 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 >>> #include >>> #include >>> #include >>> >>> using namespace dealii; >>> >>> namespace hpfe{ >>> template >>> class HPSolver >>> { >>> public: >>> HPSolver( >>> const unsigned int max_fe_degree); >>> //virtual ~HPSolver(); >>> >>> const hp::FECollection& get_fe_collection(); >>> const hp::QCollection& get_face_quadrature_collection(); >>> >>> protected: >>> hp::FECollection fe_collection; >>> hp::QCollection quadrature_collection; >>> hp::QCollection face_quadrature_collection; >>> hp::QCollection fourier_q_collection; >>> std::unique_ptr> fourier; >>> std::vector ln_k; >>> Table>fourier_coefficients; >>> }; >>> >>> template >>> HPSolver::HPSolver( >>> const unsigned int max_degree) >>> { >>> for (unsigned int degree=2; degree <= max_degree; ++degree) >>>{ >>> fe_collection.push_back(FE_Q(degree)); >>> quadrature_collection.push_back(QGauss(degree+1)); >>> face_quadrature_collection.push_back(QGauss(degree+1)); >>>} >>> const unsigned int N = max_degree; >>> QGauss<1> base_quadrature(2); >>> QIterated quadrature(base_quadrature, N); >>> for (unsigned int i = 0; i < fe_collection.size(); i++) >>>fourier_q_collection.push_back(quadrature); >>> std::vector n_coefficients_per_direction(fe_collection. >>> size(), N); >>> fourier = std::make_unique>(n_coefficients_per_ >>> direction, fe_collection, fourier_q_collection); >>> //resize(fourier_coefficients, N); >>> } >>> } >>> template class hpfe::HPSolver<3, Vector> ; >>> >>> 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&, 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 > class HPSolver > { > public: > HPSolver( > const unsigned int max_fe_degree); > virtual ~HPSolver(); > > const hp::FECollection& get_fe_collection(); > const hp::QCollection& get_face_quadrature_collection(); > > protected: > hp::FECollection fe_collection; > hp::QCollection quadrature_collection; > hp::QCollection face_quadrature_collection; > hp::QCollection fourier_q_collection; > std::unique_ptr> fourier; > std::vector ln_k; > Table>fourier_coefficients; > }; > > template > HPSolver::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(degree)); > quadrature_collection.push_back(QGauss(degree+1)); > face_quadrature_collection.push_back(QGauss(degree+1)); > } > const unsigned int N = max_fe_degree; > QGauss<1> base_quadrature(2); > QIterated quadrature(base_quadrature, N); > for (unsigned int i = 0; i < fe_collection.size(); i++) > fourier_q_collection.push_back(quadrature); > std::vector > n_coefficients_per_direction(fe_collection.size(), N); > fourier = > std_cxx14::make_unique>(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,
[deal.II] Re: hp fem error assigning Fourier
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 >> #include >> #include >> #include >> >> using namespace dealii; >> >> namespace hpfe{ >> template >> class HPSolver >> { >> public: >> HPSolver( >> const unsigned int max_fe_degree); >> //virtual ~HPSolver(); >> >> const hp::FECollection& get_fe_collection(); >> const hp::QCollection& get_face_quadrature_collection(); >> >> protected: >> hp::FECollection fe_collection; >> hp::QCollection quadrature_collection; >> hp::QCollection face_quadrature_collection; >> hp::QCollection fourier_q_collection; >> std::unique_ptr> fourier; >> std::vector ln_k; >> Table>fourier_coefficients; >> }; >> >> template >> HPSolver::HPSolver( >> const unsigned int max_degree) >> { >> for (unsigned int degree=2; degree <= max_degree; ++degree) >>{ >> fe_collection.push_back(FE_Q(degree)); >> quadrature_collection.push_back(QGauss(degree+1)); >> face_quadrature_collection.push_back(QGauss(degree+1)); >>} >> const unsigned int N = max_degree; >> QGauss<1> base_quadrature(2); >> QIterated quadrature(base_quadrature, N); >> for (unsigned int i = 0; i < fe_collection.size(); i++) >>fourier_q_collection.push_back(quadrature); >> std::vector n_coefficients_per_direction(fe_collection. >> size(), N); >> fourier = std::make_unique>(n_coefficients_per_ >> direction, fe_collection, fourier_q_collection); >> //resize(fourier_coefficients, N); >> } >> } >> template class hpfe::HPSolver<3, Vector> ; >> >> 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&, 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 class HPSolver { public: HPSolver( const unsigned int max_fe_degree); virtual ~HPSolver(); const hp::FECollection& get_fe_collection(); const hp::QCollection& get_face_quadrature_collection(); protected: hp::FECollection fe_collection; hp::QCollection quadrature_collection; hp::QCollection face_quadrature_collection; hp::QCollection fourier_q_collection; std::unique_ptr> fourier; std::vector ln_k; Table>fourier_coefficients; }; template HPSolver::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(degree)); quadrature_collection.push_back(QGauss(degree+1)); face_quadrature_collection.push_back(QGauss(degree+1)); } const unsigned int N = max_fe_degree; QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, N); for (unsigned int i = 0; i < fe_collection.size(); i++) fourier_q_collection.push_back(quadrature); std::vector n_coefficients_per_direction(fe_collection.size(), N); fourier = std_cxx14::make_unique>(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/59bc6f2b-6fbc-4fd9-840f-6f491004450bo%40googlegroups.com.
[deal.II] Re: hp fem error assigning Fourier
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 > #include > #include > #include > > using namespace dealii; > > namespace hpfe{ > template > class HPSolver > { > public: > HPSolver( > const unsigned int max_fe_degree); > //virtual ~HPSolver(); > > const hp::FECollection& get_fe_collection(); > const hp::QCollection& get_face_quadrature_collection(); > > protected: > hp::FECollection fe_collection; > hp::QCollection quadrature_collection; > hp::QCollection face_quadrature_collection; > hp::QCollection fourier_q_collection; > std::unique_ptr> fourier; > std::vector ln_k; > Table>fourier_coefficients; > }; > > template > HPSolver::HPSolver( > const unsigned int max_degree) > { > for (unsigned int degree=2; degree <= max_degree; ++degree) >{ > fe_collection.push_back(FE_Q(degree)); > quadrature_collection.push_back(QGauss(degree+1)); > face_quadrature_collection.push_back(QGauss(degree+1)); >} > const unsigned int N = max_degree; > QGauss<1> base_quadrature(2); > QIterated quadrature(base_quadrature, N); > for (unsigned int i = 0; i < fe_collection.size(); i++) >fourier_q_collection.push_back(quadrature); > std::vector n_coefficients_per_direction(fe_collection.size > (), N); > fourier = std::make_unique>(n_coefficients_per_ > direction, fe_collection, fourier_q_collection); > //resize(fourier_coefficients, N); > } > } > template class hpfe::HPSolver<3, Vector> ; > > 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&, 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 >>> class HPSolver >>> { >>> public: >>> HPSolver( >>> const unsigned int max_fe_degree); >>> virtual ~HPSolver(); >>> >>> const hp::FECollection& get_fe_collection(); >>> const hp::QCollection& get_face_quadrature_collection(); >>> >>> protected: >>> hp::FECollection fe_collection; >>> hp::QCollection quadrature_collection; >>> hp::QCollection face_quadrature_collection; >>> hp::QCollection fourier_q_collection; >>> std::unique_ptr> fourier; >>> std::vector ln_k; >>> Table>fourier_coefficients; >>> }; >>> >>> template >>> HPSolver::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(degree)); >>> quadrature_collection.push_back(QGauss(degree+1)); >>> face_quadrature_collection.push_back(QGauss(degree+1)); >>> } >>> const unsigned int N = max_fe_degree; >>> QGauss<1> base_quadrature(2); >>> QIterated quadrature(base_quadrature, N); >>> for (unsigned int i = 0; i < fe_collection.size(); i++) >>> fourier_q_collection.push_back(quadrature); >>> std::vector >>> n_coefficients_per_direction(fe_collection.size(), N); >>> fourier = >>> std_cxx14::make_unique>(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/8fdb3fe9-05db-4cc6-a789-12950800b256o%40googlegroups.com.
[deal.II] Re: hp fem error assigning Fourier
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 #include #include #include using namespace dealii; namespace hpfe{ template class HPSolver { public: HPSolver( const unsigned int max_fe_degree); //virtual ~HPSolver(); const hp::FECollection& get_fe_collection(); const hp::QCollection& get_face_quadrature_collection(); protected: hp::FECollection fe_collection; hp::QCollection quadrature_collection; hp::QCollection face_quadrature_collection; hp::QCollection fourier_q_collection; std::unique_ptr> fourier; std::vector ln_k; Table>fourier_coefficients; }; template HPSolver::HPSolver( const unsigned int max_degree) { for (unsigned int degree=2; degree <= max_degree; ++degree) { fe_collection.push_back(FE_Q(degree)); quadrature_collection.push_back(QGauss(degree+1)); face_quadrature_collection.push_back(QGauss(degree+1)); } const unsigned int N = max_degree; QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, N); for (unsigned int i = 0; i < fe_collection.size(); i++) fourier_q_collection.push_back(quadrature); std::vector n_coefficients_per_direction(fe_collection.size (), N); fourier = std::make_unique>(n_coefficients_per_ direction, fe_collection, fourier_q_collection); //resize(fourier_coefficients, N); } } template class hpfe::HPSolver<3, Vector> ; 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&, 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 >> class HPSolver >> { >> public: >> HPSolver( >> const unsigned int max_fe_degree); >> virtual ~HPSolver(); >> >> const hp::FECollection& get_fe_collection(); >> const hp::QCollection& get_face_quadrature_collection(); >> >> protected: >> hp::FECollection fe_collection; >> hp::QCollection quadrature_collection; >> hp::QCollection face_quadrature_collection; >> hp::QCollection fourier_q_collection; >> std::unique_ptr> fourier; >> std::vector ln_k; >> Table>fourier_coefficients; >> }; >> >> template >> HPSolver::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(degree)); >> quadrature_collection.push_back(QGauss(degree+1)); >> face_quadrature_collection.push_back(QGauss(degree+1)); >> } >> const unsigned int N = max_fe_degree; >> QGauss<1> base_quadrature(2); >> QIterated quadrature(base_quadrature, N); >> for (unsigned int i = 0; i < fe_collection.size(); i++) >> fourier_q_collection.push_back(quadrature); >> std::vector >> n_coefficients_per_direction(fe_collection.size(), N); >> fourier = >> std_cxx14::make_unique>(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/18f66ec5-7283-476e-b643-63b693ca10f7o%40googlegroups.com.
[deal.II] Re: hp fem error assigning Fourier
Dear Ihsan, I have no problem to compile the following code (your code with minor adjustments): #include #include #include #include using namespace dealii; template class HPSolver { public: HPSolver( const unsigned int max_fe_degree); //virtual ~HPSolver(); const hp::FECollection& get_fe_collection(); const hp::QCollection& get_face_quadrature_collection(); protected: hp::FECollection fe_collection; hp::QCollection quadrature_collection; hp::QCollection face_quadrature_collection; hp::QCollection fourier_q_collection; std::unique_ptr> fourier; std::vector ln_k; Table>fourier_coefficients; }; template HPSolver::HPSolver( const unsigned int max_degree) { for (unsigned int degree=2; degree <= max_degree; ++degree) { fe_collection.push_back(FE_Q(degree)); quadrature_collection.push_back(QGauss(degree+1)); face_quadrature_collection.push_back(QGauss(degree+1)); } const unsigned int N = max_degree; QGauss<1> base_quadrature(2); QIterated quadrature(base_quadrature, N); for (unsigned int i = 0; i < fe_collection.size(); i++) fourier_q_collection.push_back(quadrature); std::vector n_coefficients_per_direction(fe_collection.size (), N); fourier = std::make_unique>( n_coefficients_per_direction, fe_collection, fourier_q_collection); //resize(fourier_coefficients, N); } int main() { HPSolver<3,Vector > solver(3); } So my guess is that you have forgotten: `#include https://www.dealii.org/developer/doxygen/deal.II/fe__series_8h_source.html> >`? Hope this helps! Peter 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&, 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 > class HPSolver > { > public: > HPSolver( > const unsigned int max_fe_degree); > virtual ~HPSolver(); > > const hp::FECollection& get_fe_collection(); > const hp::QCollection& get_face_quadrature_collection(); > > protected: > hp::FECollection fe_collection; > hp::QCollection quadrature_collection; > hp::QCollection face_quadrature_collection; > hp::QCollection fourier_q_collection; > std::unique_ptr> fourier; > std::vector ln_k; > Table>fourier_coefficients; > }; > > template > HPSolver::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(degree)); > quadrature_collection.push_back(QGauss(degree+1)); > face_quadrature_collection.push_back(QGauss(degree+1)); > } > const unsigned int N = max_fe_degree; > QGauss<1> base_quadrature(2); > QIterated quadrature(base_quadrature, N); > for (unsigned int i = 0; i < fe_collection.size(); i++) > fourier_q_collection.push_back(quadrature); > std::vector > n_coefficients_per_direction(fe_collection.size(), N); > fourier = > std_cxx14::make_unique>(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/8312e8f9-6237-4c24-a452-6c445a609b73o%40googlegroups.com.