I have only recently been introduced to Mathematica's(v10.0) FEM capabilities. I understand that for solving PDEs on non-uniform shapes via NDSolve
, Mathematica uses FEM. I have been able to extract the mesh from some examples shown and I notice that the mesh used by Mathematica is always ordered with equal element sizes. Is there some way I could force NDSolve
to choose a combination of quad and tri elements instead of ONLY quad elements or tri elements to solve a PDE? Also is mesh refinement possible (dense mesh in some areas and coarse mesh in others)?
Here's a MWE that I would like to use: It is a notebook file. Forgive the link instead of pasting input text here: the input text was quite garbled and didn't copy back into a Mathematica.
update (to copy code from notebook here)
Ω =
ImplicitRegion[ ! (x - 5)^2 + (y - 5)^2 <= 3^2, {{x, 0, 5}, {y, 0,
10}}];
RegionPlot[Ω, AspectRatio -> Automatic]
op = -Laplacian[u[x, y], {x, y}] - 20;
Subscript[Γ,
D] = {DirichletCondition[u[x, y] == 0, x == 0 && 8 <= y <= 10],
DirichletCondition[u[x, y] == 100,
(x - 5)^2 + (y - 5)^2 == 3^2]};
uif = NDSolveValue[{op == 0, Subscript[Γ, D]}, u,
Element[{x, y}, Ω],
Method -> {"PDEDiscretization" -> {"FiniteElement",
"MeshOptions" -> {"MaxCellMeasure" -> 0.3},
"IntegrationOrder" -> 5}}]
Quiet[ContourPlot[uif[x, y], Element[{x, y}, Ω],
ColorFunction -> "Temperature", AspectRatio -> Automatic]]
Plot3D[uif[x, y], Element[{x, y}, Ω],
ColorFunction -> "Temperature", AspectRatio -> Automatic,
Mesh -> False]
Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"];
{mesh} = InterpolatingFunctionCoordinates[uif]
mesh["Wireframe"]
ToElementMesh
. See "Scope" and the option"MeshRefinementFunction"
. $\endgroup$refineQ
function. $\endgroup$