Dear everyone, I would greatly appreciate any assistance you can provide with the following issue.
I am trying to use this function to interpolate the feature ID from FE space 1(linear) to FE space 2(quadratic). (please see the trailing mail for a better understanding of my problem) interpolate() [4/4] template<int <https://www.dealii.org/9.4.0/doxygen/deal.II/classint.html> dim, class InVector , class OutVector , int <https://www.dealii.org/9.4.0/doxygen/deal.II/classint.html> spacedim> void VectorTools::interpolate ( const DoFHandler <https://www.dealii.org/9.4.0/doxygen/deal.II/classDoFHandler.html>< dim, spacedim > & *dof_1*, const DoFHandler <https://www.dealii.org/9.4.0/doxygen/deal.II/classDoFHandler.html>< dim, spacedim > & *dof_2*, const FullMatrix <https://www.dealii.org/9.4.0/doxygen/deal.II/classFullMatrix.html>< double > & *transfer*, const InVector & *data_1*, OutVector & *data_2* ) *my function which i am using in my code is:* VectorTools::interpolate(dof_handler_dream3d, dof_handler_eta, transfer_matrix ,feature_id1_at_all_dof, solution_xi1); VectorTools::interpolate(dof_handler_dream3d, dof_handler_eta, transfer_matrix ,feature_id2_at_all_dof, solution_xi2); *but i am getting error like :* [ 66%] Linking CXX executable PhaseField CMakeFiles/PhaseField.dir/PhaseField.cc.o:PhaseField.cc:function PhaseField::Solid<2>::run(): error: undefined reference to 'void dealii::VectorTools::interpolate<2, std::vector<double, std::allocator<double> >, dealii::Vector<double>, 2>(dealii::DoFHandler<2, 2> const&, dealii::DoFHandler<2, 2> const&, dealii::FullMatrix<double> const&, std::vector<double, std::allocator<double> > const&, dealii::Vector<double>&)' CMakeFiles/PhaseField.dir/PhaseField.cc.o:PhaseField.cc:function PhaseField::Solid<2>::run(): error: undefined reference to 'void dealii::VectorTools::interpolate<2, std::vector<double, std::allocator<double> >, dealii::Vector<double>, 2>(dealii::DoFHandler<2, 2> const&, dealii::DoFHandler<2, 2> const&, dealii::FullMatrix<double> const&, std::vector<double, std::allocator<double> > const&, dealii::Vector<double>&)' collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/PhaseField.dir/build.make:228: PhaseField] Error 1 make[2]: *** [CMakeFiles/Makefile2:90: CMakeFiles/PhaseField.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2 make: *** [Makefile:137: run] Error 2 "make run" terminated with exit code 2. Build might be incomplete. 17:58:08 Build Failed. 4 errors, 63 warnings. (took 20s.439ms) Thank you. On Monday, March 11, 2024 at 5:01:25 PM UTC+5:30 ME20D503 NEWTON wrote: > Dear Prof. Bangerth, > > Thank you for the reply. > > I have successfully managed to read the .vtk file in Deal.II and extract > the feature IDs along with their corresponding coordinate points by > manually parsing the vtk file (using std::getline(file, line)). > > *However, I am now encountering another difficulty for which I require > your guidance.* > > *>> When I use linear elements, I can visualize my initial structure as > desired. However, when I switch to using quadratic elements, five > additional nodes are added to each cell. Since I only have information > about the feature IDs at the four corners of the cell, I lack data > for these extra five nodes. Is there a method to interpolate the feature > IDs for these additional nodes using the four at the corners of the cell?* > > Please refer to the attached figure for a better understanding of my issue. > > Thank you. > On Thursday, March 7, 2024 at 12:38:34 PM UTC+5:30 Wolfgang Bangerth wrote: > >> On 3/5/24 00:46, ME20D503 NEWTON wrote: >> > 1. >> > >> > In the final .vtk file format, I don't have information about the >> element >> > type (linear or quadratic). Is it possible to assign the element type >> in >> > deal.II after reading the .vtk file? >> >> I think you already solved that (along with the next problem), but just >> for >> completeness: the .vtk file only contains the *mesh*. You have to choose >> what >> element to use on it. These are independent questions. >> >> >> > 2. >> > >> > In the final .vtk file format, there is no information regarding the >> scale >> > I'm working with. I intend to create a nanoscale sample, but the >> > dimensions I set in DREAM.3D are unitless. Is it possible to scale it >> down >> > in deal.II after reading the .vtk file? >> >> You will want to use GridTools::scale(). >> >> >> > 3. >> > >> > The final .vtk file includes information like featureId (please see the >> > attached figure). After reading this .vtk file, I want to assign some >> > variables to the featureId. Is it possible to extract the value and >> assign >> > variables to it in deal.II? >> >> The featureId in your .vtk file is associated with nodes. I don't think >> that >> we currently have a way in the library to read those in -- you might want >> to >> check what GridIn::read_vtk() can do for you. If that function doesn't do >> it, >> you will have to either extend it, or write your own function to do that. >> >> Best >> W. >> >> >> -- >> ------------------------------------------------------------------------ >> Wolfgang Bangerth email: bang...@colostate.edu >> www: http://www.math.colostate.edu/~bangerth/ >> >> >> -- 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/e4424cd9-c75a-4aad-bd66-d49caa914bf9n%40googlegroups.com.