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 <deal.II/grid/tria.h> // Here are some functions to generate standard grids: #include <deal.II/grid/grid_generator.h> // Output of grids in various graphics formats: #include <deal.II/grid/grid_out.h> // 设置function的头文件 #include <deal.II/base/point.h> //建立向量的头文件 #include<deal.II/lac/vector.h> //sin cos函数 #include <deal.II/base/function_lib.h> //FullMatrix #include <deal.II/lac/full_matrix.h> #include <deal.II/dofs/dof_tools.h> #include <deal.II/base/quadrature_lib.h> #include <deal.II/fe/fe_system.h> #include <deal.II/numerics/vector_tools.h> #include <deal.II/fe/fe.h> // This is needed for C++ output: #include <iostream> #include <fstream> #include <tuple> //std::tuple std::tuple_size // And this for the declarations of the `std::sqrt` and `std::fabs` functions: #include <cmath> #include <algorithm> 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<GridTools::PeriodicFacePair<typename Triangulation<3>::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); }