goodluck1982 / SpaceGroupIrep

A mathematica package for irreducible representations of space group
GNU General Public License v3.0
51 stars 20 forks source link

showBZDemo: This error is because RegionIntersection cannot work well for certain parameters in mathematica v11.2, but this problem does not occur in v12.0. #9

Closed hongyi-zhao closed 2 years ago

hongyi-zhao commented 2 years ago

I tried to run showBZDemo["CubiBody"], but failed as follows:

image

image

As you can see, Mathematica says:

showBZDemo: This error is because RegionIntersection cannot work well for certain parameters in mathematica v11.2, but this problem does not occur in v12.0.

But the version I'm using is 12.3:

image

The above examples come from the usage shown here and here. Any hints for this problem will be highly appreciated.

Regards, HZ

hongyi-zhao commented 2 years ago

Upgrading to the latest version solves this problem:

Clear["*`"]
<< SpaceGroupIrep`
BCHighSymKpt // Keys // InputForm
showBZDemo["CubiBody"]
showBZDemo["TetrBody(b)"]

image

image

image

goodluck1982 commented 2 years ago

In fact, showBZDemo works fine under version 11.2 with default basic vectors. e.g.

showBZDemo["OrthBody(c)"]

The RegionIntersection related problem only occurs when user-specified basic vectors are used, such as

showBZDemo["OrthBody(c)",  BasicVectors["OrthBody"] /. {a -> 2, b -> 3.2, c -> 5}]

It's strange that the error occurs without use-specified basic vectors, and it's especially strange that it works in v12.0 but not in v12.3. Confronting such bug originated from the underlying code of the language itself, I feel very helpless.

hongyi-zhao commented 2 years ago

Confronting such bug originated from the underlying code of the language itself, I feel very helpless.

This is why open-source based implementations of scientific software projects are so popular in academia and relatively easy to solve low-level code problems.