3
$\begingroup$

I am trying to run the element mesh generator DistMeshfrom FEMAddOns package by using version Mathematica 13.2 under Ubuntu 20.04.

Needs["FEMAddOns`"]
DistMesh[Disk[]]

and got the next messages:

enter image description here enter image description here

and so on... I have tested all the others functions from FEMAddOns and they work properly with version 13.2. Previously I used DistMesh with version Mathematica 12.0 and there were no such problems. Thanks in advance for any advice for overcoming this issue.

$\endgroup$
1
  • $\begingroup$ Confirmed this is a bug, I'll try to update the code in the next few days. But pull requests are welcome of course. $\endgroup$
    – user21
    Commented Feb 1, 2023 at 12:28

1 Answer 1

6
$\begingroup$

Update: The bug is fixed in FEMAddOns version 1.4.6 and if you grab the latest version with

ResourceFunction["FEMAddOnsInstall"][]

things should behave normally.


This is a bug. As a quick work around try this:

Needs["FEMAddOns`"]

Clear[DistMesh`Private`greaterEqualZeroPosition]
DistMesh`Private`greaterEqualZeroPosition[th_] := 
  Flatten[SparseArray[1 - UnitStep[th]]["NonzeroPositions"]];

DistMesh[Disk[]]

I'll push a proper fix in the next few days. Sorry about that.

$\endgroup$
2
  • $\begingroup$ thanks a lot for support! $\endgroup$ Commented Feb 2, 2023 at 20:21
  • $\begingroup$ It was an excellent idea to implement DistMesh in Mathematica. $\endgroup$ Commented Feb 2, 2023 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.