Dear Dr. Bangerth,
I am currently working on generating a synthetic microstructure of polycrystalline material using Dream3D, an open-source software (accessible at https://dream3d.bluequartz.net/). My intention is to import this microstructure into Deal.II for further simulations, such as discretization and solving phase field equations.
However, I'm facing some confusion regarding the appropriate file format for exporting from Dream3D to Deal. II. Additionally, I've come across another open-source software, PRISM-PF (https://prisms-center.github.io/phaseField/), which has successfully achieved a similar process and is built upon Deal. II.
I would greatly appreciate any guidance or insights you could provide on this matter.
Thank you.
I'm working on processing a .vtk file exported from DREAM.3D using PRISMS-PF scripts(https://github.com/prisms-center/phaseField/tree/master/applications/grainGrowth_dream3d) to convert it into a .vtk file format with UNSTRUCTURED_GRID dataset, making it compatible with deal.II.
Here are my specific doubts:
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?
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?
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?
Dear Bangerth,
I've successfully solved points 1 and 2.
However, I'm encountering difficulties with point 3. Could you assist me in understanding how to extract the feature IDs from the .vtk file after reading it in dealii, and then perform further operations based on these feature IDs in dealii?
Thank you.
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.
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);
[ 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.