# Anisotropic Meshing The following is a feature request for anisotropic meshing. A proper mesh is as or more important than just having the proper equations to obtain accurate simulation results. The problem arises when one needs to capture either very close or very far away from some feature in the main model. Naïvely meshing the model with the uniform mesh size will cause the model size to blow up. The problem is exacerbated by going to higher model dimensions in both space and time. Fortunately, the FEM is often quite robust to element aspect ratios for many types of physics. This allows one to use very flat or very stretched-out elements while simultaneously reducing model size while maintaining accuracy. Boundary layer meshing and infinite domain elements are types of anisotropic meshing commonly found in FEM packages. Without boundary layer meshing, one will often over-predict shear stresses, heat, and mass transfer rates at the wall in fluid flow problems. Without infinite domain elements, the slopes of dependent variables will be in error due to truncation. I have used anisotropic meshing to solve various problems on Mathematica Stackexchange, as shown in the following list. 1. 1D Meshes * Transient * [1D mesh generation for PDE solution](https://mathematica.stackexchange.com/questions/235773) * [Wrong solution from multi-materials FEM NDSolve](https://mathematica.stackexchange.com/questions/222856) * [Neumann boundary condition ignored](https://mathematica.stackexchange.com/questions/238392) * [Dirichlet Condition at Infinity](https://mathematica.stackexchange.com/a/240190) * [Defining mesh size for NDSolve](https://mathematica.stackexchange.com/a/250278) 2. 2D Meshes * Steady-State * [Mathematica vs. MATLAB: why am I getting different results for PDE with non-constant boundary condition?](https://mathematica.stackexchange.com/a/222947/61809) * [Improving mesh and NDSolve solution convergence](https://mathematica.stackexchange.com/a/226561/61809) * [PDE system. convection dominated, method AffineCovariantNewton failed, etc](https://mathematica.stackexchange.com/questions/236613) * [Laplace's equation in spherical coordinates](https://mathematica.stackexchange.com/a/245377/18437) * Transient * [Controlling dynamic time step size in NDSolveValue](https://mathematica.stackexchange.com/a/204907/61809) * [How to model diffusion through a membrane?](https://mathematica.stackexchange.com/a/219140/61809) * [Mass Transport FEM Using Quad Mesh](https://mathematica.stackexchange.com/a/228096/61809) * [NDSolve with equation system with unknown functions defined on different domains](https://mathematica.stackexchange.com/a/227821/61809) 3. 3D-Meshes * [Create graded mesh](https://mathematica.stackexchange.com/a/232763/61809) * Stationary * [How to Improve FEM Solution with NDSolve?](https://mathematica.stackexchange.com/a/220123/61809) * [3D FEM Vector Potential](https://mathematica.stackexchange.com/a/231273/61809) # Anisotropic meshing of complex geometries in 3D Of the examples I showed in the above bullet list, the geometries were of a simple variety. The most straightforward way to create a boundary layer mesh from a tetrahedral mesh would be to extrude a prism layer. The current FEM Solver does not accept prism elements. So, either the Solver needs to be extended to accept prism elements or a procedure to split prisms into tetrahedra will be required. I am not sure that either option is simple. I have used commercial software to split prisms into tetrahedra, but I did not see too many options available in my cursory search online. Perhaps [LaGrit](https://lagrit.lanl.gov/) could be used to perform the splitting operation (see Python documentation for [grid2grid_prismtotet3](https://lanl.github.io/LaGriT/pylagrit/original/autodoc_mo.html)). **Update 13.0 (user21):** This has been implemented with [ToGradedMesh]() (there is some issue with the link, I'll fix later) and [ElementMeshRegionProduct](https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshRegionProduct.html). This is probably a practicality fine example of something that has demonstrated it's usefulness here in SE and made it into the product - Thank you Tim for your continuous support of the FEM in the Wolfram language.