A general environment for the treatment of discrete problems and its application to the finite element method | Synapse