Adaptive Mesh Refinement
We have said that at “some scale“, the solution can be adequately approximated by a set of low-order polynomials. But it is not always obvious where the mesh must be dense and where a coarse mesh will suffice. In order to address this issue, FlexPDE uses a method of “adaptive mesh refinement“. The problem domain presented by the user is divided into a triangular mesh dictated by the feature sizes of the domain and the input controls provided by the user. The problem is then constructed and solved, and the cell integrals of the weighted residual method are crosschecked to estimate their accuracy. In locations where the integrals are deemed to be of questionable accuracy, the triangles are subdivided to give a new denser mesh, and the problem is solved again. This process continues until FlexPDE is satisfied that the approximation is locally accurate to the tolerance assigned by the user. Acceptable local accuracy does not necessarily guarantee absolute accuracy, however. Depending on how errors accumulate or cancel, the global accuracy could be better or worse than the local accuracy condition implies.