GithubHelp home page GithubHelp logo

Comments (4)

rquey avatar rquey commented on August 15, 2024

Error : . Could not process '-n from_morpho'.

This comes from the fact that -n from_morpho determines n from -morpho and not -morphooptiini. Just provide the number of seeds in -n...

number of common seeds = 4 != 3
seeds = 7 -5 27 4

This comes from the fact that the seeds are regularly arranged on a grid, leading to a degenerate configuration where more than 4 cells intersect at a vertex. (This only happens for the discrete events where seeds are regularly arranged. This will never happen when there is some level of randomness in the seed coordinates.)

A workaround is to "randomize" the seed coordinates:

gsl-randist 1 32 flat 0 0.00001 > x
gsl-randist 2 32 flat 0 0.00001 > y
gsl-randist 3 32 flat 0 0.00001 > z
paste POSCAR-00002 x y z | awk '{print $1+$4,$2+$5,$3+$6}' > pos

and then

neper -T -n 32 -morphooptiini "coo:file(pos)" -o n32 -per 1
neper -V n32.tess -datacellcol id -datacelltrs 0.5 -dataedgerad 0.001 -cameracoo 8:6:4 -print n32

Still, a possible issue is that the cells will contain tiny edges and faces coming from the randomized seed coordinates, which you can see like this:

neper -T -n 32 -morphooptiini "coo:file(pos)" -o n32 -per 1 -statedge length -statface area
head n32.stedge
head n32.stface

This could be fixed using regularization (-reg 1), but it is not available yet for periodic tessellations.

Some regular tessellations are directly supported by Neper: cubes and truncated octahedra. If I'm correct, you are aiming for truncated dodecahedra here, which are not included.

from neper.

mbaeker avatar mbaeker commented on August 15, 2024

Thanks a lot for the quick answer.
Yes, basically I am trying to create the Wigner-Seitz-cells in an fcc crystal (rhombic dodecahedron)

The tesselation does indeed work after adding some randomness, however after
neper -T -n 32 -morphooptiini "coo:file(POSCAR-00002)" -o n32 -per 1
meshing with
neper -M n32.tess -format 'inp'
fails:

Info : Loading input data...
Info : - Loading tessellation...
Info : [i] Parsing file n32.tess'... Info : [i] Parsed file n32.tess'.
Info : Meshing...
Info : - Preparing... (cl = 0.1575) 100%
Info : - 0D meshing... 100%
Info : - 1D meshing... 100%
Info : - 2D meshing... 100% (0|0.2/99%| 1%| 0%)
Info : - Fixing 2D-mesh pinches...
Info : - 3D meshing... 3% (0|0/ 0%|100%| 0%)Error : > Meshing of poly 1 (1) failed

I've tried playing around with the meshing algorithm, but so far without success.
I also tried to change the element size with -cl, but this ends with a core dump.

It works when I use hex elements, which is probably sufficient for what I need, but if you have any hints how I could create the tet mesh, that would of course be great.
Thanks again

from neper.

rquey avatar rquey commented on August 15, 2024

Meshing struggles with the tiny edges and faces. You can increase the "randomization" distance:

gsl-randist 1 32 flat 0 0.01 > x
gsl-randist 2 32 flat 0 0.01 > y
gsl-randist 3 32 flat 0 0.01 > z
paste POSCAR-00002 x y z | awk '{print $1+$4,$2+$5,$3+$6}' > pos

and then

neper -T -n 32 -morphooptiini "coo:file(pos)" -o n32 -per 1
neper -M n32.tess -pl 10000 -rcl 0.5 -for msh,inp
neper -V n32.tess,n32.msh -dataelsetcol id -dataelt1drad 0.0025 -dataelt3dedgerad 0.001 -showelt1d all -cameracoo 8:6:4 -print n32m

You will notice that the geometry differs slightly from theory.

from neper.

mbaeker avatar mbaeker commented on August 15, 2024

Thanks again, that's very helpful.

from neper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.