Re: [deal.II] There are some mistake about the function ”GridTools::collect_periodic_faces()"

2024-04-17 Thread Daniel Arndt
I meant

#include 

Best,
Daniel

Daniel Arndt

8:43 AM (0 minutes ago)


to dealii

On Wed, Apr 17, 2024 at 8:43 AM Daniel Arndt  wrote:
>
> You will have to include
>
> #include 
>
> Best,
> Daniel
>
> On Wed, Apr 17, 2024 at 7:21 AM Xue Yu  wrote:
> >
> > Dear deal.ii community,
> >
> > first of all, a big thank you for all the effort going into this
> > software.
> > With reference to step-45, I am solving the homogenization problem with 
> > dealii software.
> > After drawing a grid for a 3D cuboid cell, a periodic boundary condition 
> > with equal displacement of opposite sides is created. My version of dealii 
> > is 9.4.0
> > But i meet an error while make run as following:
> > error: ‘collect_periodic_faces’ is not a member of ‘dealii::GridTools
> > And my code is attached. I've already added the corresponding header file, 
> > so why do I still have this problem? Could you please give me a debug 
> > direction?
> >
> > --
> > 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/4ad2f5e1-1015-44fb-8309-cf10166e1a55n%40googlegroups.com.

-- 
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/CAOYDWb%2BfowryaxicNCLmRZhodsdC8MCypRpJshB%3DOav9-nMs9g%40mail.gmail.com.


Re: [deal.II] There are some mistake about the function ”GridTools::collect_periodic_faces()"

2024-04-17 Thread Daniel Arndt
You will have to include

#include 

Best,
Daniel

On Wed, Apr 17, 2024 at 7:21 AM Xue Yu  wrote:
>
> Dear deal.ii community,
>
> first of all, a big thank you for all the effort going into this
> software.
> With reference to step-45, I am solving the homogenization problem with 
> dealii software.
> After drawing a grid for a 3D cuboid cell, a periodic boundary condition with 
> equal displacement of opposite sides is created. My version of dealii is 9.4.0
> But i meet an error while make run as following:
> error: ‘collect_periodic_faces’ is not a member of ‘dealii::GridTools
> And my code is attached. I've already added the corresponding header file, so 
> why do I still have this problem? Could you please give me a debug direction?
>
> --
> 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/4ad2f5e1-1015-44fb-8309-cf10166e1a55n%40googlegroups.com.

-- 
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/CAOYDWbJ9AQ%3DMgmfh-SyKFDsQDnMLbhWH%2BXQzWLmE3KJ%2BmX685A%40mail.gmail.com.


[deal.II] There are some mistake about the function ”GridTools::collect_periodic_faces()"

2024-04-17 Thread Xue Yu
Dear deal.ii community,

first of all, a big thank you for all the effort going into this
software.
With reference to step-45, I am solving the homogenization problem with 
dealii software. 
After drawing a grid for a 3D cuboid cell, a periodic boundary condition 
with equal displacement of opposite sides is created. My version of dealii 
is 9.4.0
But i meet an error while make run as following:
error: ‘collect_periodic_faces’ is not a member of ‘dealii::GridTools
And my code is attached. I've already added the corresponding header file, 
so why do I still have this problem? Could you please give me a debug 
direction?

-- 
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/4ad2f5e1-1015-44fb-8309-cf10166e1a55n%40googlegroups.com.
#include 
// Here are some functions to generate standard grids:
#include 
// Output of grids in various graphics formats:
#include 
// 设置function的头文件
#include 
//建立向量的头文件
#include
//sin cos函数
#include 
//FullMatrix
#include 
#include 
#include 
#include 
#include 
#include 
// This is needed for C++ output:
#include 
#include 
#include   //std::tuple   std::tuple_size
// And this for the declarations of the `std::sqrt` and `std::fabs` functions:
#include 
#include 

using namespace dealii;
using namespace std;

int main()
{
Triangulation<3> tria;
unsigned int repetition = 2; 
double xmin = -1.0, xmax = 1.0; 
GridGenerator::subdivided_hyper_cube(tria, repetition, xmin, xmax);

std::vector::cell_iterator>> periodicity_vector;
GridTools::collect_periodic_faces(tria, 0, 1, 0, periodicity_vector); //x
GridTools::collect_periodic_faces(tria, 2, 3, 1, periodicity_vector); //y
GridTools::collect_periodic_faces(tria, 4, 5, 2, periodicity_vector); //z
tria.add_periodicity(periodicity_vector);

}