« first day (2425 days earlier)      last day (2360 days later) » 

08:15
@b3m2a1 About 4 years ago, I played with Julia for a little while when I came to a bottleneck in speeding up my Mathematica code, but ended up with improving my compiling skill. But who knows? Perhaps they managed to make major advances these years.
08:46
Question: Can anyone give a generated example of a 3D MeshRegion consisting of Hexahedrons or similar?
Context: A 2D MeshRegion may consist of polygons of any shape. In 3D, only a limited number of cell shape types are allowed. I have only seen DiscretizeRegion produce tetrahedral elements. But Hexahedron, Pyramid and Prism are also technically allowed. While I could manually construct a MeshRegion out of these, I do not think I've ever seen them in practical applications. Which functions return MeshRegions with such elements?
I want this for testing purposes, to make sure my functions will handle such mesh regions.
@HenrikSchumacher You might know the answer ^
09:04
One is ArrayMesh.
@b3m2a1 There is a Mathematica interface but I don't know if it works. It's built on a separate MathLink interface. I once tried to get it working and failed. I did not spend much time on it.
@Szabolcs Indeed, applications of hex-meshes can rarely be found in Mathematica. k = 3; MengerMesh[k, 3] is one of the few examples I know.
@Szabolcs `Needs["NDSolve`FEM`"];
MeshRegion[ToElementMesh[Cuboid[], "MeshOrder" -> 1]]` is another.
Meshing more general regions by hexahedra is (although very desirable from a numerical stand point) a very delicate task. So I am not surprised by the design decision to do like John Lennon said: Let it be.
CantorMesh is a further example.
@Henrik Have you ever seen Prism or Pyramid being generated?
I should also check if it is possible to mix these elements.
It's possible to mix different dimensional ones.
09:19
@Szabolcs Never. Must have been a pain to implement the support for them.
I once thought that this generality has been introduced to support the "MeshRegion" property of PolyhedronData. But even PolyhedronData["Cube", "MeshRegion"] retuns a tetrahedralized mesh.
Actually, because MeshRegion enforces the faces of quads to be planer, Hexahedron, Pyramid, and Prism are utterly useless.
I think, ElementMesh is much more usuable in that respect.
 
4 hours later…
13:12
@rm-rf I'm using your pygments plugin with minted in LaTeX. The lexer and style is installed in the python directory and everything works. I can change colors in the style.py and see the changes in my document. Is there a way to define a style local to my document? If not, is there a way to define an additional style class with a separate name? Just putting an additional class in the syle file like you with MathematicaNotebookStyle doesn't seem to work.
When I see this right, I can simply create another mystyle.py and put it in the pygments directory. Would it be possible to have this local in my LaTeX source folder?
 
1 hour later…
14:28
@b3m2a1 It seemed like all the scientific computing hipsters I know were crazy about Julia so I gave it a shot recently. Of course there must be a learning curve, so it won't be as easy as Mathematica for me, but the most painful thing was: there's no way to clear variables.
I'm used to interacting with MMA, messing around, fixing my mistakes, etc. With Julia I had to restart the kernel all the time.
There must be a better way, but I could only find other newbs with the same complaint and no solution.
So, I'm officially obsolete now.
 
2 hours later…
16:25
@halirutan I think the right way to do this would be to 1) create a new Pygments style and 2) register it as a plugin. That way, you won't have to hack the source and it is reproducible. With this, you can have the style sources in your LaTeX project folder and you just install it once to your python distribution to work alongside the default pygments + mma plugin.
This is, in fact, what the mma pygments plugin does — it registers new lexers and new styles to work alongside the vanilla pygments. See setup.py for the entry points where we declare them. You can copy most of the code there, remove the lexer, change the corresponding stylesheets and give it a new package name.
 
1 hour later…
17:50
@rm-rf Thanks, I'll look into it.

« first day (2425 days earlier)      last day (2360 days later) »