Future enhancements for the Finite Element Method

How should the finite element method (FEM) framework in the language be extended to be more useful?

With the release of version 12.0 alI fundamental FEM solvers (linear, nonlinear, stationary, transient, harmonic, parametric, eigensolver) are implemented. As many of you know I am a developer of the FEM in Mathematica. As such I do not have questions about the language or framework to ask here; my primary purpose on this site is to help you make the most of the FEM framework. However, I would like to give people on this site that are actively using the FEM framework a voice in what you think could be useful extensions/improvements for the framework.

What are suggestions for improvement or missing functionality that you think would make your work with the FEM easier?

When you write an answer, please try to be as specific as you can, possibly show code that illustrates the problem. Limit your answer to one item. Try to be reasonable. With up votes given to various suggestions I will hopefully get an idea what is useful to most people and can prioritize accordingly. Also, please understand that I can not give a commitment that everything requested will/can be implemented and it may take some time before things requested actually see the light of day in the product.

How to add front-end to the free Wolfram Engine in Mac OS?

I have read the instructions in the link below. However I still have no idea how to do it.

https://github.com/WolframResearch/WolframLanguageForJupyter

And then I found that the solution in Windows is given below but it does not work on my mac

How to add front-end to the free Wolfram Engine?

Could anyone with successful installation please share your solution? Thank you very much!

Why aren’t the arrow displayed when using Show?

I have been trying to combine different plots using Show. Everything looks fine, but the Arrow from one of the plots does not show. What am I doing wrong here?

qw = Plot[y /. Solve[(x/20)^2 + (y/10)^2 == 1], {x, -36, 35},  AspectRatio -> Automatic, PlotRange -> {{-37, 35}, {-16, 16}},  PlotStyle -> {RGBColor["#123c69"]}, Ticks -> Automatic,  Axes -> True]; Aq = Plot[-a/((x^4)) - b, {x, -21, -35},  PlotRange -> {{-36, -21}, {-6.5, -9.5}},  PlotStyle -> {RGBColor["#ac3b61"]},  Epilog -> {RGBColor["#ac3b61"],  Arrow[{{-35, -((3151 Sqrt[7])/     1250)}, {-35.7, -6.640033236810056}}]}]; Show[qw, Aq] 

Why aren’t the arrow displayed when using Show?

I have been trying to combine different plots using Show. Everything looks fine, but the Arrow from one of the plots does not show. What am I doing wrong here?

qw = Plot[y /. Solve[(x/20)^2 + (y/10)^2 == 1], {x, -36, 35},  AspectRatio -> Automatic, PlotRange -> {{-37, 35}, {-16, 16}},  PlotStyle -> {RGBColor["#123c69"]}, Ticks -> Automatic,  Axes -> True]; Aq = Plot[-a/((x^4)) - b, {x, -21, -35},  PlotRange -> {{-36, -21}, {-6.5, -9.5}},  PlotStyle -> {RGBColor["#ac3b61"]},  Epilog -> {RGBColor["#ac3b61"],  Arrow[{{-35, -((3151 Sqrt[7])/     1250)}, {-35.7, -6.640033236810056}}]}]; Show[qw, Aq] 

Non-Linear model fit returns imaginary numbers in a real fit

I am getting problems when i try to fit a squareroot-like function to a set of real data, here is the function: \begin{equation} \left(-\frac{2 \sum _{i=0}^n c_i q^i}{\sqrt{\left(\sum _{i=0}^M b_i q^i\right){}^2-4 \left(a_1 q+1\right) \sum _{i=0}^n c_i q^i}+\sum _{i=0}^M b_i q^i}\right)^2 \end{equation} Where $ M,n\in \mathbb{N}$ .
I cant try to put Constraints to the NonLinearModelFit because i need the errors, and i cant try to modify the function with Re[] or Conjugate[], because is modify the function. Here is the data:
{{{0.0491483,0.85451},{0.00306566,0.989755},{0.156523,0.634745},{0.19322,0.579874},{0.107026,0.723105},{0.159402,0.630146},{0.126612,0.685905},{0.041859,0.873807},{0.202128,0.567694},{0.00429277,0.985704},{0.0438898,0.868359},{0.202524,0.567161},{0.164643,0.621908},{0.0176414,0.943355},{0.0887417,0.760861},{0.247813,0.511176},{0.2382,0.522303},{0.215778,0.549804},{0.140331,0.661648},{0.0450278,0.865331},{0.079667,0.780801},{0.200001,0.570565},{0.13433,0.672086},{0.130211,0.679405},{0.244809,0.514612},{0.181252,0.596908},{0.104507,0.728124},{0.171583,0.611263},{0.0359265,0.890045},{0.187224,0.58831},{0.225738,0.53731},{0.0723277,0.797555},{0.197513,0.573953},{0.10055,0.736123},{0.141649,0.65939},{0.0926702,0.752483},{0.0598971,0.827301},{0.176524,0.60386},{0.0342446,0.894738},{0.110842,0.715605},{0.0116676,0.961926},{0.163328,0.623958},{0.243646,0.515952},{0.0561636,0.836589},{0.203855,0.565379},{0.0780196,0.784511},{0.196865,0.574841},{0.175081,0.606007},{0.0955304,0.746478},{0.0320406,0.900951},{1.5931,0.0890937},{1.0712,0.146087},{1.75196,0.078463},{2.65825,0.0434119},{0.827541,0.194791},{1.41378,0.104037},{2.60719,0.0446751},{1.56054,0.0915489},{0.647142,0.249531},{2.86556,0.0388113},{2.65311,0.0435367},{2.67742,0.0429519},{0.834751,0.193004},{1.00899,0.156551},{1.5725,0.0906352},{2.34786,0.0520663},{0.270901,0.48594},{0.871762,0.184223},{1.24283,0.122258},{1.30046,0.115596},{0.489775,0.319958},{0.501975,0.31344},{1.51357,0.0952797},{2.58615,0.0452123},{2.08624,0.0616378},{1.91234,0.0696033},{0.646257,0.249857},{1.55824,0.0917261},{2.11203,0.0605774},{0.580136,0.276214},{4.01178,0.0230932},{10.7232,0.00449478},{11.2478,0.00413793},{8.94916,0.00613476},{6.91823,0.00948793},{5.38288,0.0143832},{8.16001,0.00718018}}}

How to speed up the calculation of a multi-dimension matrix involving symbolic integral?

The following program succeeds in getting matrix CC, but it takes time badly, especially in the case varNumber becomes larger just as the following varNumber = 35. Who can speed up the process of calculation? Thanks!

ClearAll["Global`*"]; varNumber = 35; end = Infinity; s1 = 112*^9; s2 = 25*^9; s3 = 15.1; s4 = 5.5*10^-9;  a[m_] := Exp[-x/2]*LaguerreL[m, x]; b[m_, i_, j_, l_] := Integrate[a[m]*x^i*D[a[l], {x, j}], {x, 0, end}];  d[m_, i_, j_, l_] :=   Integrate[   a[m]*x^i*D[     a[l], {x, j}]*(DiracDelta[x] -       DiracDelta[x - end]), {x, -Infinity, Infinity}];  c[1, 1][m_, l_] := s2*d[m, 0, 1, l] + s2*b[m, 0, 2, l]; c[1, 2][m_, l_] := 0; c[1, 3][m_, l_] := 0; c[2, 1][m_, l_] := 0; c[2, 2][m_, l_] := s1*d[m, 0, 1, l] + s1*b[m, 0, 2, l]; c[2, 3][m_, l_] := s3*d[m, 0, 1, l] + s3*b[m, 0, 2, l]; c[3, 1][m_, l_] := 0; c[3, 2][m_, l_] := s3*d[m, 0, 1, l] + s3*b[m, 0, 2, l]; c[3, 3][m_, l_] := -s4*d[m, 0, 1, l] - s4*b[m, 0, 2, l];  CC = ArrayFlatten@     Table[c[m, n][i, j], {m, 3}, {n, 3}, {i, 0, varNumber - 1}, {j, 0,        varNumber - 1}]; // AbsoluteTiming {2283.69, Null} 

Keeping associative bracketing in place

The following Mathematica code displays the vertices of a given graph after converting an expression into a suitable format (using heads that are tensor and parallel notation. The labels are displayed at the vertices, but associativity rules are used. How can I prevent this from happening (i.e. how can I keep the brackets when vertices are displayed?

DiplayGraph[g_] :=    With[{vlist = VertexList[g]},      Graph[g, VertexLabels ->       Thread[      vlist -> Map[# /. {ExpProduct -> (ToString[               HoldForm[CircleTimes[##]]] &),            Parallel -> (ToString[               HoldForm[DoubleVerticalBar[##]]] &)} &, vlist]],     EdgeLabelStyle -> Directive[10, Background -> White],     VertexLabelStyle -> Directive[10, Background -> White]]] 

When executing this code on a graph:

DisplayGraph[Graph[{A[1, 2] -> B[2, B[3, 4]]}]] 

the following output is generated:

displaygraph

I would like 2 || 3 || 4 to appear as 2 || (3 || 4) consistent with the parentheses in B[2, B[3, 4]] (i.e. I don’t want the associative removal of the parentheses). Which command can be inserted to ensure this?

All elements of a list in a condition

I am going to help Mathematica to satisfy the condition:

If All elements of a matrix's eigenvalues are different from zero, then print "ok"

For matrix={{1, 0}, {2, 0}};  If[Eigenvalues[matrix] != 0, Print@"OK"]  it must print OK 

and For matrix={{1, 0}, {2, 0}} its result is nothing.

How can show All elements of a list in a condition?

Why are optimization variables exceeding their allowed regions?

In the optimization of a function, shown below, why are the variables xi, yi not adhering to their specified allowed regions {variable, 0, 5}?

{sol, pts} = Reap[ NMaximize[fitness[x2, y2, x3, y3, x4, y4], {{x2, 0, 5}, {y2, 0, 5}, {x3, 0, 5}, {y3, 0, 5}, {x4, 0, 5}, {y4, 0, 5}}, Integers,  Method -> {"SimulatedAnnealing","SearchPoints" -> 20, "PerturbationScale" -> 1, "RandomSeed" -> 1},  EvaluationMonitor :> Sow[{{x2, y2}, {x3, y3}, {x4, y4}}]]] //AbsoluteTiming  {0.56064, {{-2., {x2 -> -6, y2 -> -4, x3 -> -17, y3 -> 7, x4 -> 8, y4 -> 6}},  {{{{0, 2}, {0, 2}, {1, 3}}, {{2, 2}, {1, 4}, {4,        3}}, {{1, 0}, {2, 5}, {3, 5}}, {{1, 1}, {4, 2}, {4, 4}}, {{4,        2}, {2, 1}, {4, 4}}, {{5, 5}, {4, 3}, {1, 2}}, {{2, 3}, {2,        4}, {0, 1}}, {{4, 4}, {0, 4}, {1, 4}}, {{2, 2}, {5, 3}, {4,        0}}, {{2, 2}, {4, 5}, {1, 0}}, OutputSizeLimit`Skeleton[     2001], {{4, 11}, {-1, 3}, {12, 4}}, {{4, 11}, {-1, 3}, {12,        4}}, {{4, 11}, {-1, 3}, {12, 4}}, {{4, 11}, {-1, 3}, {12,        4}}, {{3, 11}, {-1, 3}, {12, 4}}, {{4, 11}, {0, 3}, {12,        4}}, {{4, 11}, {-1, 3}, {12, 4}}, {{3, 11}, {-1, 3}, {12,        4}}, {{3, 11}, {-1, 3}, {12, 4}}}}}}