siddharth-maddali / hierarchicalsmooth Goto Github PK
View Code? Open in Web Editor NEWImplementation of the hierarchical smooth algorithm applicable to voxelated images of interface networks ( grain boundaries, soap foam, etc. )
License: Other
Implementation of the hierarchical smooth algorithm applicable to voxelated images of interface networks ( grain boundaries, soap foam, etc. )
License: Other
Hi Sid,
Again, thanks for putting upt the C++ version.
I compiled it as instructed and got HierarchicalSmoothFrontEnd.mexmaci64. But Matlab crashes when I try to use HierarchicalSmoothFrontEnd function.
I have checked the function input order and it seems to be HierarchicalSmoothFrontEnd(tri, xdat, fl, ntype) but that didn't work, neither did the order HierarchicalSmoothFrontEnd(tri, xdat, fl, ntype). Also thought about data type and tried to convert tri, fl and ntype intro int32 but the program also crashed. Maybe it's a data shape issue but I'm not that familiar with C++ data.
Can you put up an example about using the C++ file with one of the examples?
Thanks!
Dependabot couldn't find a requirements.txt for this project.
Dependabot requires a requirements.txt to evaluate your project's current Python dependencies. It had expected to find one at the path: /requirements.txt
.
If this isn't a Python project, or if it is a library, you may wish to disable updates for it from within Dependabot.
You can mention @dependabot in the comments below to contact the Dependabot team.
I'd like to use the C++ version, but I'm having some trouble going through the process.
On a supercomputer shell, I'm running into the issue of not having gcc 6.3 installed (apparently the only one supported for MEX functions by MATLAB). The MEX file compiles with gcc 4, but produces an error when I try to use it. The MEX file doesn't compile with gcc 6.4 or 7. Alternatively, I'm considering trying to compile it from an Ubuntu shell, but will have the same issue of needing gcc 6.3.
There are some instructions on installing 6.3: https://www.mathworks.com/matlabcentral/answers/454659-how-can-i-change-my-current-gcc-g-version-to-a-supported-one
I think I'll give this a try, but if you have other suggestions please let me know.
Also, once the MEX file is compiled, I'm assuming it can only be used on Linux 64 instances of MATLAB. Is that correct?
Hi Dr. Maddali,
I am a graduate student in the Materials Department of UCSB and I am very interested in using HierarchicalSmooth. I have some experience with Dream3D and Quick Surface Mesh function, but I am unsure about the process/pipeline needed to create the necessary input files as well as then what to do with the Smoothed Vertex List (array PS).
I appreciate any help you can provide.
Best,
Jonathan
Hello @siddharth-maddali,
Currently, I am trying to set up the C++ version of Hierarchical Smooth but have been unable to generate the static and dynamic libraries libhsmooth.a and libhsmooth.so.
The instructions state, that the the Makefile should be run in the command line. I tried doing this using Visual Studio's (2019) compiler using the Build Tools extension, which operates through the cmd. When I try and run the Makefile I get the following error:
To try and address this I added the .cpp file extension (Makefile.cpp) and tried running it. As a result I got the following error:
I have verified that Build Tools is functioning as expected with other programs. Additionally, I have placed the Eigen and libIGL source codes into the Cpp active directory. However, the errors suggest that the problem is interfacing with the Makefile itself.
What compiler do you recommend using with the Makefile? Do you have any other recommendations on running the Makefile?
Thanks!
Hi siddharth,
Firstly, I would like to thank you for all the effort you commit to the code. Very good implementation for dream. 3d users to smooth out surface mesh of grain boundaries.
However, I ran into a trouble when I tried to go through the tutorial using the Matlab source code. I followed the “ Matlab usage “ on the code webpage to write an executive script to import the microstructure data (input) from the ex2 files and implement the central HierarchicalSmooth routine. The code always ran into an error when implementing the HierarchicalSmooth. m file (Error using triangualation (line 94). The input points must be 2D or 3D coordinates in numpoints-by-ndim format.) I have attached a picture below to better illustrate the issue. I was wondering if this issue has something to do with the Matlab version? I’m using Matlab R2019a.
Could you please advise me on this matter at your best convenience? Any help will be greatly appreciated!
Best Regards,
Siqi
Would it be possible to integrate this method into the DREAM.3D (http://www.github.com/bluequartzsoftware/dream3d)?
Thanks for your help so far. I've been plotting the grains after doing h-smoothing and have been getting some strange results. See for example:
I also get:
109030 of 800612 nodes not smoothed.
which may be related to the quad points being too close together as you mentioned before, or it could be an issue of having a thickness of only 2 voxels in the z-dimension (I have EBSD data from both sides of a sample with a large proportion of through-thickness grains).
Using the sample data produces expected results:
If I apply DREAM.3D's laplacian smoothing filter before doing the hierarchical smoothing, I get the following, where on further inspection, it seems the triangles that "jut" leave concave "divots" in the grain.
with the following workspace:
Name Size Bytes Class Attributes
GrainToPlot 1x1 8 double
fl 1438608x2 23017728 double
ngrains 3348x1 26784 double
s1 1x1 8 matlab.graphics.axis.Axes
s2 1x1 8 matlab.graphics.axis.Axes
tri 1438608x3 34526592 double
trisub 852x3 20448 double
xdat 3x800607 19214568 double
xsmooth 3x800607 19214568 double
One round-about way I might deal with this is turning the 2-stack into a 4-stack by copying the stacks above and below as appropriate and cropping it afterwards, but I'm worried this would have the artificial effect of the grain boundary always being normal to the surface when it's close to the surface.
Another similar approach would be breaking up the interior into multiple voxels, though I'm not sure how I would go about this.
Do you think this is an inherent limitation of the method for this unique use case?
Hi siddharth,
Thank you for the code. Very good concept & implementation.
To perform volumetric meshing, each grain has to be a closed surface. But from the smoothing process we obtain grains on the outer surfaces that are not closed. So after the smoothing process I tried to generate the outer surfaces for these grains, but haven't been able to do it successfully.
I realized that I need to have Triangulation information and its face labels to obtain outer surface. Do you have any suggestion in this regard?
Is it possible to output complete triangulation information of grains on outer surface of RVE ?
Best regards,
MP
This overall is a great code. However, in both the example codes that you provided as well as in my own implementation there appears to be a small number of quadruple LINES, which should not exist.
This is evidenced in the fact that there are areas where four triangles attach to a single edge.
I believe there is a bug in the code that allows this to happen. As this will affect the diffusivity through the smoothed model, it needs to be corrected.
Thank you,
Madeline
I have included an instance of the problem below
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.