New answers tagged

1

Options "Domains" and "ZoomElements" are mutually exclusive. Argument of "ZoomElements" is an "element selector" that can be used to select domains as well. (e.g. element_selector={node_selector, domain_selector} form) In your case SMTShowMesh["Mesh" -> True, "BoundaryConditions" -> True, Axes ...


1

Sorry for my careless. Maybe Abs can't be differential in Mathematica,so we have to use RealAbs instead. And it seems that we need to set Mesh -> {{1}}. With[{R = If[RealAbs[#1] < Pi/4, 1, Sec[RealAbs[#1] - Pi/4]] & }, With[{F = Function @@ {{φ, h}, {Sin[φ]*R[φ, h], Cos[φ]*R[φ, h], h}}}, (ParametricPlot3D[ F[φ, h]...


3

Try: ToElementMesh[bmesh, "RegionHoles" -> None, "RegionMarker" -> {{{0.5, 0.}, 0, 0.0001}, {{-0.5, 0.}, 1, 0.1}}]["Wireframe"] or ToElementMesh[bmesh, "RegionHoles" -> None]


5

Diagnostics I have spent quite some time debugging what I though was some kind of a memory leak in your loop. Indeed, we can see that in each iteration the memory increasas for ~3 MB: mem = MemoryInUse[]; Do[ Print[MemoryInUse[] - mem]; mem = MemoryInUse[]; ... ]; (* 9480 12519624 3120088 3127008 3126752 ... *) I thought the reason was in ...


5

In 3D the boundary improvement is much harder than in 2D for this reason it is off by default in 3D. You can turn it on with mesh3d = ToElementMesh[Ball[], "ImproveBoundaryPosition" -> True]; 4/3 \[Pi] - Total@First@mesh3d["MeshElementMeasure"] 0.0000975943 When it's off I get 0.0600351. Should you get messages that the element ...


2

The ratio of your largest feature to your smallest feature is about 200. Such a large feature ratio can often cause problems with automatic meshing. You can use DistanceMatrix to get an idea of the feature ratio. DistanceMatrix[pts] // N // MatrixForm The following approach is not likely to be robust or flexible, but it works on my machine. I set densBound=...


7

You can get clustered points from a random point process and then relax the Voronoi mesh. The final mesh is the variable relaxed: SeedRandom[123]; proc = CauchyPointProcess[15, 35, 0.005, 2]; data = RandomPointConfiguration[proc, Rectangle[]]; bounds = {{0, 1}, {0, 1}}; mesh = VoronoiMesh[data["Points"], {{0, 1}, {0, 1}}]; relaxed = Nest[...


8

There is no MinCellMeasure, but you can build your own mesh, thereby giving you complete control over the discretization. I will show an example of how to do this at the end of the post. With respect to mesh visualization, your current mesh is pretty finely discretized, making it difficult to view the distributions. Also, your parameters make it difficult to ...


Top 50 recent answers are included