Hp refinement applied to the finite element method should lead to faster convergence than h or p refinement [10] and [11]. On the other hand, h and p refinements are easier and faster to implement. The complexity of an hp refinement is increased when the process is implemented for any type of mesh [3] In the PZ environment [4], the hp adaptive method was designed to work with heterogenous mesh including 1D, 2D and 3D elements.
For industrial purposes, the adaptive method has a performance problem, because the refinement process, the error estimation and the choice of the refinement pattern (i.e. given a certain number of degree of freedom choose how to increase h, p or hp) have a high computational cost.
In this work, an implementation of the mesh refinement using elements based on templates will be discussed.
Template based implementation presents faster codes than derivate classes / virtual calls. The performance problem has several points to focus on, the main point being the solution of the linear system of equations. Nevertheless, in order to attain an acceptable 3D code, several points must be optimized, including the data structure assembly and the adaptive process which is discussed in this contribution.