5
$\begingroup$

Bug introduced in 11.0 and persisting through 11.1.1


In the tutorial Solving PDE with Finite Elements at the documentation center, there is this code:

Ω = 
  ImplicitRegion[! ((x - 5)^2 + (y - 5)^2 <= 3^2), {{x, 0, 5}, {y, 0, 
     10}}];
RegionPlot[Ω, AspectRatio -> Automatic]

This is supposed to look like this:

region 1

But when I run the same code on my Mathematica 10.3, I get this:

enter image description here

What is going on? How to make it just like it is given in the documentation center? I guess there is a precision setup?


Update: I ran this code in Wolfram Programming Lab online and the problem is the same. Also, I updated to Mathematica 11.1. The problem is still there.

$\endgroup$
  • 1
    $\begingroup$ looks ok on mathematica 10.4 $\endgroup$ – J42161217 Apr 23 '17 at 21:51
  • $\begingroup$ @Jenny_mathy, I just ran it on Mathematica 11 and I still have the same problem. It is probably not version dependent at this point. Any ideas? $\endgroup$ – space bobcat Apr 23 '17 at 21:59
  • $\begingroup$ I get the same issue (Mac/MMa 11.1). Oddly, the problem goes away if you plot from {y, -3, 13} but shows oddities on both sides if you plot from {y, -2, 12}. $\endgroup$ – bill s Apr 23 '17 at 22:00
  • $\begingroup$ @bills, this bug gives me trouble with solving a Laplace equation over a region with a circular part that I made using "Disk". It is the post from yesterday link. I see that if I make a "Disk", it is not nearly as smooth as I would want it to be (or as it is shown in tutorials). $\endgroup$ – space bobcat Apr 23 '17 at 22:14
  • 2
    $\begingroup$ This is a bug and you should report it to WRI. $\endgroup$ – user21 Apr 25 '17 at 13:36
2
$\begingroup$

Same problem and solution as How to control resolution/refinement when using RegionPlot on ImplicitRegion?:

RegionPlot[DiscretizeRegion@Ω, AspectRatio -> Automatic]

Mathematica graphics

$\endgroup$
  • $\begingroup$ I am probably wrong but it seems that this provides a nice way to plot it only. What if I need to use this region for boundary conditions to solve a PDE? How would you do that for a question here? link $\endgroup$ – space bobcat Apr 24 '17 at 5:40
  • 1
    $\begingroup$ @ViacheslavPlotnikov Yes, I wondered if plotting was the main concern. For plotting and geometrical applications, DiscretizeRegion is a typical top-level function. For NDSolve and the finite-element-method, ToElementMesh and related functions in the NDSolve`FEM` context allow better control over setting up PDEs. The easiest way is probably the options "MeshOptions" and MashCellMeasure, but other ways exist. $\endgroup$ – Michael E2 Apr 24 '17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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