How does freefem select trial functions

Dear all,
According to my understanding, freefem uses Galerkin method to solve the field function (such as displacement field).

When we use it, we only need to write the weak form of the problem, divide the grid, and define the solution.

I have the following questions:

  1. After the mesh is divided, whether to use the Galerkin method to solve each element, and then get the node displacement first, and then interpolate the interior of the element according to the shape function of the selected element to get the displacement of the element.

  2. How to select the trial function when the Galerkin method is used to solve the problem on the element.
    Thank u