1 INTRODUCTION

Finite element method (FEM) is a powerful method to solve various physical problems. This method is robust and has been thoroughly developed to solve engineering and applied science problems such as linear and non-linear stress analysis of solid and structures, electromagnetism, fluid flows and similar fields. In generalized finite element method (GFEM), ^{Melenk and Babuška (1996}), ^{Strouboulis et al. (2000a}), ^{Duarte et al. (2000}), ^{Strouboulis et al. (2001}), as in FEM, the approximation is built over a mesh of elements using interpolation functions. However, the approximation is associated with nodal points as in the Meshless methods, and it is enriched in the same fashion as in the *hp*-cloud method, ^{Duarte et el. (1995}), ^{Duarte (1996}), ^{Liszka et al. (1996}), ^{Oden et al. (1998}). Special functions multiply the original FEM functions and smooth and non-smooth solutions can be modeled independently of the mesh. The enrichment strategy of GFEM is similar to the one used in the extended finite element method (XFEM), introduced in ^{Belytschko and Black (1999}).

Global-local FEM was proposed by ^{Noor (1986}) in order to solve non-linear problems. This method was presented after proposing zooming method by ^{Hirai et al. (1985}). A local problem is defined where a local phenomenon happens. The global-local FEM approach has two steps. The first step is done with a coarse FEM mesh that ignores the effect of the local phenomena. This is followed by the second step which includes an analysis of the local region using refined finite element meshes. The key parameter for the local analyses is the application of field state variables as boundary conditions on the local boundaries. Once the solution of local problem is obtained, the global-local FEM analysis can be finished. In global-local GFEM (GFEM^{gl)}, ^{Duarte et al. (2007}), a variation of the standard GFEM, enrichment functions are constructed numerically from the solution of a local problem. GFEM^{gl} approach has three steps, its first and second steps are the same as the global-local FEM. In the third step, the results of the local problem are used to enrich the global problem which improves the approximate solution. In the case of fracture mechanic problems, the stress field around the crack tip presents high gradients and it is discretized using a large number of elements. The great advantage is providing a well-refined description of the local problem. More information on global-local GFEM, considering its various aspects can be found in Duarte and ^{Kim (2008}), ^{Kim et al. (2008}), ^{Kim et al. (2009}), ^{Kim et al. (2010}), ^{Pereira et al. (2011}), ^{Gupta et al. (2012}), ^{Kim et al. (2012}), ^{Gupta et al. (2013}), ^{Evangelista et al. (2013}), ^{Plews and Duarte (2015}).

According to ^{Alves et al. (2013}), the similarity between GFEM/XFEM and FEM can allow a straightforward migration for these methods and also the reuse of the FEM structure. This migration and code reuse depend on how the FEM code is implemented, and a successful strategy is the object-oriented approach. Following such strategy several implementations have been proposed, ^{Strouboulis et al. (2000a}), ^{Strouboulis et al. (2001}), ^{Bordas et al. (2007}), ^{Dunant et al. (2007}), ^{Nistor et al. (2008}), ^{Chamrová and Patzák (2010}), ^{Neto et al. (2013}). In ^{Alves et al. (2013}), the FEM programming environment proposed by ^{Fonseca and Pitangueira (2007}) is expanded to enclose the standard version of GFEM. This environment, so called INSANE (Interactive Structural Analysis Environment) is an open source software available at *http://www.insane.dees.ufmg.br* and written in Java language. In the present paper, a new expansion that includes the GFEM^{gl} is presented. The implementation, conducted through the development of comprehensive object-oriented design, allows generalization of the global-local approach in such way that any types of partition of unity methods, analysis model and enrichment strategy can be combined. It also allows that stress and strain field can be applied as boundary conditions for local problems in addition to the capability of applying displacement boundary condition. Details of the implementation are discussed and important aspects of using these strategies are highlighted in numerical examples. This work is organized as follows: A brief explanation of GFEM is presented in section 2. In section 3, main ideas and formulations of global-local GFEM is presented. The INSANE class organization and its expansion to include GFEM^{gl} method are discussed in section 4. In the section 5, numerical examples are presented, and final section is devoted to concluding remarks and discussion.

2 THE GENERALIZED FINITE ELEMENT METHOD

A brief explanation of GFEM is described in this section. Further details can be found in ^{Melenk and Babuška (1995}), ^{Babuška and Melenk (1997}), ^{Oden et al. (1998}), ^{Duarte et al. (2000}), ^{Strouboulis et al. (2001}), ^{Pereira et al. (2011}). The GFEM was developed for modeling structural problems with discontinuities. The origins of this method can be summarized as:

Research done by

^{Babuška and co-workers - initially named as special finite element method by Babuška et al. (1994}) and later as partition of unity method (PUM) by^{Melenk and Babuška (1996}).Then, as a meshless formulation in the hp-cloud method,

^{Duarte et al. (1995}), and later as a hybrid approach with the FEM,^{Oden et al. (1998}).

Furthermore, it can be considered an instance of the PUM, in the sense that it employs a set of PU functions to guarantee interelement continuity. Such strategy creates conforming approximations which are improved by a nodal enrichment scheme. This basic idea shares the same characteristics from XFEM proposed by ^{Belytschko and Black (1999}), as it is observed in ^{Fries and Belytschko (2010}).

Here this procedure is summarized following ^{Barros et al. (2004}, ^{2013}) and considering two-dimensional space. A conventional finite elements mesh can be considered for which {K*
_{e}
* }

*is a set of NE elements, defined by N nodes, {*

^{NE}_{e=1}*x*}

_{j}

^{N}_{j=1}.

A generic patch of elements or cloud *w _{j}
* ∊ is obtained by the union of finite elements sharing the vertex node

*x**, Fig. 1(a). The assemblage of the interpolation functions, built at each element*

_{j}*K*∊

_{e}*w*and associated with node

_{j}

*x**, composes the function*

_{j}*N*(

_{j}**)defined over the support cloud**

*x**w*. As Σ

_{j}*(*

^{N}_{j=1}N_{j}**) = 1 at every point x in the domain , the set of functions {Nj(x)}Nj=1 constitutes a partition of unity (PU). A set of q linearly independent functions is defined at each cloud wj as:**

*x*

The generalized finite element shape functions are determined by the enrichment of the PU functions, which is obtained by the product of such functions by each one of the components of the set *I _{j}
* at the generic cloud

*w*

_{j}

The enrichment scheme is obtained by multiplying a PU function of C^{0} type with compact support *w _{j}
*Fig. 1 (a), by the function

*L*(

_{ji}**), Fig. 1 (c), named in**

*x*^{Strouboulis et al. (2000b}), as a local approximation (also called enrichment function). The resulting shape function, ∅

*(*

_{ji}**), Fig. 1 (d), inherits characteristics of both functions, i.e., the compact support and continuity of the PU and the approximate character of the local function.**

*x*As a consequence, the generalized global approximation, denoted by *ũ*(**
x
** ), can be described as a linear combination of the shape functions associated with each node:

where **
u
**

*and*

_{j}

*b**are nodal parameters associated with standard -*

_{ji}*N*(

_{j}**)- and GFEM -**

*x**N*(

_{j}**) ×**

*x**L*(

_{ji}**) - shape functions, respectively. Aiming to minimize round-off errors,**

*x*^{Duarte et al. (2000}) suggest that a transformation should be performed over the

*L*(

_{ji}**) functions, if they are of polynomial type. In such case, the coordinate x is replaced as follows:**

*x*

in which *h _{j}
* is the diameter of the largest finite element sharing the node j, the cloud

*w*.

_{j}3 GLOBAL-LOCAL GENERALIZED FINITE ELEMENT METHOD

This method, originally proposed by ^{Duarte and Babuška (2005}), combines the standard GFEM with the global-local strategy proposed by ^{Noor (1986}). GFEM^{gl} is suitable for problems with local phenomena, such as stress field next to the crack tip. The analysis is divided in three steps: initial global problem (step 1), local problem (step 2) and final global problem (step 3). These steps are described in the following sub-sections.

3.1 Initial Global Problem (Step 1)

Following ^{Kim et al. (2010}), consider a domain = Ω_{G} ⋃ ∂Ω_{G} of an elastic problem in *R _{n}
* . The boundary is decomposed in ∂Ω

_{G}= ∂Ω

^{u}_{G}⋃ ∂Ω

^{σ}_{G}with ∂Ω

^{u}_{G}⋂ ∂Ω

^{σ}_{G}=

*∅*, where indices

*u*and

*s*refer to the Dirichlet and Neumann boundary conditions.

*u*^{0}

_{G}∊

*X*^{0}

*(Ω*

_{G}*) represents the solution of the approximate space*

_{G}

*X*^{0}

*(Ω*

_{G}*) (built by FEM or GFEM functions) for the initial global problem in its weak form, shown in:*

_{G}

where σ, ε, *v*
^{0}
*
_{G}
* ∊

*X*^{0}

*(Ω*

_{G}*) , and are stress tensor, strain tensor, test functions, and prescribed traction vector, respectively.*

_{G}3.2 Local Problem (Step 2)

Ω*
_{L}
* is a sub-domain from Ω

*This sub-domain may contain cracks, holes or other special features, as suggested by*

_{G}^{Duarte and Kim (2008}). The corresponding local solution

*u**∊*

_{L}

^{ XE }*(Ω*

_{L}*) is obtained from:*

_{L}

where **
v
**

*∊*

_{L}

^{ XE }*(Ω*

_{L}*) represents the test functions,*

_{L}

^{ XE }*(Ω*

_{L}*) is the space generated by FEM or GFEM functions,*

_{L}*η*is the penalty parameter and

*κ*is the stiffness parameter both used to impose Dirichlet and Cauchy boundary conditions, respectively. Additionally, is the prescribed traction, is the prescribed displacement,

**(**

*t*

*u*^{0}

*) is the traction vector obtained from the first step. ∂Ω*

_{G}*(∂Ω*

_{L}\*⋂ ∂Ω*

_{L}_{G}) is the part of the local problem boundary that doesn't coincide with the global problem boundary and on which the numerical solution that comes from the step 1 is imposed as boundary condition. The last integrals on the left and right side of Eq. (6) correspond to the Cauchy or spring boundary condition, imposing the displacements as well as the stress calculated in the global problem. The

^{ XE }*(Ω*

_{L}*) space can be defined as:*

_{L}

functions and are continuous, discontinuous and singular components of the approximate solution and *N _{j}
* is the partition of unity function used in global problem. The number of nodes of the local domain is given by

*N*.

_{L}3.3 Final Global Problem (Step 3)

The global problem is enriched by solution *u _{L}
* (from step 2). The new solution

^{ uE }*∊*

_{G}

^{ XE }*(Ω*

_{G}*) is obtained from:*

_{G}

where **
^{
vE
}
**

*represents the test functions and*

_{G}

^{ XE }*(Ω*

_{G}*) is the initial space increased by*

_{G}

^{ ugl }*(*

_{k}**) from local problem**

*x***:**

*uL*

and *k* ∊ *I _{gl}
* represent the set of nodes enriched by the local solution

*u**.*

_{L}Figure 2 illustrates a simplified global-local strategy. First the initial global problem is solved using a coarse mesh. After defining the local domain, the results of the initial global problem is transferred as a boundary condition to the local problem. Finally, the solutions of the local problem are transferred to the final global problem as a numeric enrichment function in order to enrich the predefined nodes of the global problem.

4 INTERACTIVE STRUCTURAL ANALYSIS ENVIRONMENT

The INSANE environment, ^{Fonseca and Pitangueira (2007}), ^{Alves et al. (2013}), is an open source software implemented in Java, an OOP language. The INSANE computational environment is composed by three great applications: pre-processor, processor and postprocessor. The persistence of data among these three segments of INSANE is performed by data files written in extensible markup language format. Here, a summary of several modules of the numerical core application (the processor) are presented aiming to introduce the INSANE system, corresponding to the standard FEM/GFEM approach, and also to show the generalization performed here to enclose the GFEM^{gl} formulation. More information can be found in ^{Alves et al. (2013}).

The INSANE numerical core is composed by the interfaces *Assembler, Model* and *Persistence* and the abstract class *Solution*. Figure 3 shows the unified modeling language (UML) diagram from numerical core of INSANE.

The observation strategy is determined by the *observer-observable* design pattern, which is a change propagation mechanism. When an object of type *observer* (which implements the *interface java.util.observer*) is instantiated, it is added to a list of observers of other objects of type observables (which extends the class *java.util.observable*). Any modification in the state of an observed object notifies the corresponding observer object that updated itself.

Detailed of GFEM implementation can be found in ^{Alves et al. (2013}), section 4. Here, the focus is on the main modifications in order to expand the computational system to comprise GFEM^{gl}. Following sub-sections explain various INSANE classes and approaches in order to perform GFEM analysis as well as GFEM^{gl} analysis.

4.1 Persistence Interface

*Persistence* treats the input data and persists the output data. For GFEM^{gl}, this class was extended to deal with more than one model. In that case, the data is separated in a global model and several local models, corresponding to the global and the several local problems respectively.

4.2 Assembler Interface

*Assembler* interface is responsible for assembling the linear equation system provided by the discretization of the initial value problem. This class is implemented following the generic representation:

where X is the solution vector; the single dot represent its first time derivative and the double dots its second time derivative; A, B and C are matrices with the properties of the problem and D is a vector that represents the system excitation.

The *Assembler* interface has the necessary methods for assembling the matrix system. It is implemented by an object of the class *GFemAssembler* that was modified in order to transfer boundary condition from the global model to the several local models. A Cauchy boundary condition was implemented following ^{Kim et al. (2010}) (here represented by Eq. (6)).

In static analysis, Eq. (10) is simplified by eliminating the two first terms. The resulting matrix system is:

where Eq. (11) is used to represent each step of the global-local solution given by Eqs. (5), (6), and (8). In these equations, the matrix C is the model stiffness matrix, X is the vector of nodal displacements, D is the vector of forces.

4.3 Solution

*Solution* abstract class starts the solution process and has the necessary resources for solving the matrix system. GFEM^{gl} process is implemented by *GlobalLocal* class, as shown in Fig. 4. Since GFEM^{gl} is composed by more than one model (one global model and several local models), the problem has more than one assembler, each one responsible to build the corresponding equation in the form of (11). This is the main difference from standard GFEM solution class. Figure 4 shows in details the UML diagram for this class.

The main attributes of this class are:

*- globalPath*: contains the path of the file responsible for storing the global model description.*- solverType:*contains information about the type of solver of the linear equation system.*- leq*:*LinearEquationSystem*object which is responsible to solve the linear equation system.*- loadCombination*: load combination of the problem.*- globalAssembler*: handles information about the global model.*- localAssemblerList*: list of Assembler objects that handles information about the several local models.*- globalEnrichedNodes*: handles the pointer to the global nodes that will be enriched by global-local enrichment.*- localEnrichedList*: list that relates each global node, that will be enriched by the global-local enrichment strategy, with the corresponding local model. This is a very important information because it is in the local model that the function^{ ugl }_{k}*x**- localPath*: contains the list of paths of each file responsible for storing each local model description.

4.4 Model Interface

The *Model* interface contains the data of the discrete model and provides to *Assembler* information to assemble the final matrix system. Both *Model* and *Solution* communicate with the *Persistence* interface, which treats the input data and persists the output data to the other applications, whenever it observes a modification of the discrete model state. This interface consisted of the following classes:

4.4.1 Node

This class is designed to manage the geometric representation of a node entity as well as the information from the discrete model. In addition to information about the node coordinates, this class holds lists of identifiers such as type of degrees of freedom, state variables and type of nodal constraint. This list of identifiers are based on *HashMap* strategy provided by JAVA API Collection ^{Horstmann and Cornell (2008}). This type of Java storing strategy allows an indirect communication between variables associated to the Node, named keys, and the variables stored in the *Model*. In spite of degrading performance of the framework, such strategy creates a generic and friendly implementation because it simplifies how new information is added to the class. Furthermore, methods from JAVA API Collection allows using the keys like conventional attributes which preserves the readability of the code. *"LOCAL_ENRICHER"* is added in order to indicate which local domain will provide the global-local enrichment function, as shown in Fig. 5. This new attribute is defined in the *Node* class as an instance of GFEM using the enrichment strategy.

4.4.2 Element

In ^{Alves et al. (2013}), this class was not modified for standard GFEM. On the other hand, the special characteristics of GFEM^{gl}, such as the relationship between the global and the local elements, requires a new extension of the Element class. Note that this new *GFemElement* class is not only derived from the superclass Element but also contains on object of Element type, Fig. 6.

Indeed this strategy takes advantage of parametric element library, with bar, triangular, quadrilateral, tetrahedral and hexahedral elements, without having to use simple inheritance from each one of those types of elements. Figure 7 shows the new parameters added in *GFemElement* class in order to add the ability to solve problems using the global-local scheme. Similar to the Node class, the *HashMap* strategy is used to include new parameters. The parameters of this class are:

*- LOCAL_NAME*: if the element belongs to a local problem, this parameter indicates in which local model it is inserted.*- GLOBAL_ELEMENT*: if the element belongs to a local problem, this parameter indicates which element from the global model contains the current element. This relationship allows to obtain from the global element the necessary data to apply the boundary conditions on the edge, if it is the case, of the current element.*- LOCAL_ELEMENTS*: if the element belongs to a global problem, this parameter indicates the elements of the local problem that discretize the domain of this global element. In this implementation the local mesh is nested in the global mesh. As a consequence each global element exactly contains a set of local elements.*- BOUNDARY_INFORMATION*: informs which kind of boundary conditions is transferred from step 1 to step 2.STEP_GL: informs in which step of the problem the solution is being processed.

*- LOCAL_TWINS*: if the element belongs to a local problem, this parameter indicates which element, if there is, from another local problem coincides with it.

4.4.3 EnrichmentType

*GlobalLocalEnrichment* extends *EnrichmentType* and provides specific methods to build the enriched functions from the solution of the local problem and applied in the third step of the global-local problem. Figure 8 shows the class diagram of this class. *EnrichmentType* is an abstract class and its methods are abstract. Thus, *GlobalLocalEnrichment* class contains the same method as the *EnrichmentType* class.

4.4.4 Problem Driver

Informs to *Assembler* all the necessary data for assembling the final system of the model, Eq. (11). For GFEM^{gl} case, an additional loop is performed using descendants of each global element, since they play the role of cells of integration. Actually, information of each descendants will be used to enriching corresponding global element based on relationship between step 2 and step 3 of global-local strategy. Figure 9 describes stiffness matrix calculation using sequence diagram.

4.5 Generic Boundary Condition

Figure 10 shows the relationship between the types of objects found in the package *Value*, which is used to define a generic boundary condition of the problem (e.g., conditions of Dirichlet, Neumann or Cauchy required by Eq. (6)). The definition of these boundary conditions in different geometric entities is performed through an *ElementValue* object, which is derived for the specific types *ElementVolumeValue* (boundary conditions applied in a volume), *ElementAreaValue* (boundary conditions applied to a area) and *ElementLineValue* (boundary conditions imposed on a line). *ElementValue* consists of the following attributes:

*-*An array of objects of type*PointValue*, responsible for storing the coordinates of a point and information that defines the boundary condition at this point.*-*An object of type Shape, responsible for the interpolation of*PointValue*.

The class *Shape* is responsible for providing the approximation function that interpolates the different *PointValue* applied in a region of the element that can be a line, area or a volume, depending on the element type. The responsible for combining this information and providing the equivalent nodal value is *EquivalentNodalValue* class, whose attributes are objects of *Element* and *ElementValue* classes.

4.6 Information Transferring from the Global to the Local Problem

One of the actions performed during the process of generalization of the imposition of boundary conditions on INSANE environment is to add the ability to obtain boundary conditions of an element of the local problem from an element of the global problem. This is required in the global-local analysis process in which, it is necessary to impose boundary conditions for the local problem provided by the global mesh solution. There are basically three types of boundary conditions that can be used:

The class responsible for the transfer of boundary conditions between domains is the *EquivalentNodalValue* class that is part of the *Value* package. The *EquivalentNodalValue* class has methods that fall into those capable of modifying the matrix C (stiffness) and those able to modify the vector D (force) of the system in Eq. (10), as can be seen in Fig. 11.

5 NUMERICAL EXAMPLES

This section presents two linear-elastic problems in R^{2}. Section 5.1 presents a linear bending problem, and section 5.2 presents a fracture mechanic problem. The geometry and boundary conditions are very simple, since the goal is not demonstrate the capabilities of the methods, but the general approach proposed to enclose the GFEM^{gl} formulation in INSANE environment.

Among the three aforementioned boundary conditions in section 4.6, according to ^{Kim et al. (2010}), the Dirichlet boundary conditions (a limiting case of Cauchy boundary condition) lead to worse results than Cauchy boundary conditions. Thus, for all two examples, the Dirichlet boundary conditions are applied on the local problem boundaries in order to demonstrate the robustness of the methodology in the worst case scenario.

Numerical integration for the first and second steps of the global-local analysis is done based on standard Gaussian quadrature procedure. In the third step, the numerical integration for those global elements that contain local elements is done over the Gauss points of local elements, as proposed by ^{Kim et al. (2010}). Consider that a global element contains n^{Le} local elements and number of Gauss points for each local elements be equal to GP. Thus, the number of integration points for this global element is obtained by: . In other words, the global numerical integration is done over Gauss points of each local element that represent a part of the global element.

5.1 Linear Bending-Moment Problem

Figure 12 illustrates a beam subjected to a set of loads that produce a linear-bending moment. In ^{Lee and Bathe (1993}), this problem is used to evaluate numerically the effects of element distortions in FEM. Here, this problem exemplifies and validates the GFEMgl implementation within INSANE environment.

The data for solving this two-dimensional plane stress problem are (using consistent units):

- Modulus of elasticity E = 1.0 × 107;

- Poisson ratio ν = 0.3;

- Load P = 20 distributed as the load function fy = 0.12y2+ 1.2y.

- Moment M = 2000 distributed as the load function fx = 24y-120.

The analytical solution is given for the displacements u and v, in direction x and y respectively and described in Cartesian coordinates, as:

Using the GFEM^{gl}, the solution of this problem can be divided in three steps:

*• Step 1:* All the nodes of the problem are enriched by P2 functions (quadratic enrichment). This strategy guarantees a cubic order of approximation through the beam, reproducing the analytical solution of the problem (see Eqs. (12) and (13)). The P2 enrichment function for x direction is as follows:

*• Step 2:* Global problem is split in 9 local problems, as presented in Fig. 13. Each local problem is enriched using P2 functions in order to exactly represent the analytical solution of the problem (this is only possible if exact boundary conditions are provided from step 1). At the end of step 2, there is a numerical solution that can exactly reproduce this problem.

*• Step 3:* Returning to the global problem, the enrichment P2 is replaced by global-local enrichment obtained from step 2. For this example, the numerical solution from local problems can exactly reproduce the analytical solution for this problem.

For this analysis, a Gauss-Legendre quadrature rule with 4 × 4 points is employed for both global and local problems.

Figure 14 shows stress distribution of stress component σ_{xx} for each local domain of the beam. This figure depicts a generic application of the GFEM^{gl} implementation, in which any region, or the whole mesh can be defined as local domains and used to solve the problem. This is an important issue in the case of not having a predefined local phenomenon and can take advantage of the independent characteristic of each local problem. As an efficient way and with the help of parallel processing, each local problem can be solved separately using multi-core machines. The P2 enrichment is used for the global problem aiming to avoid any error in the boundary condition of the local problem. The idea is to having an "*exact*" local solution to enrich the global mesh. Then, the implementation is validate if the global-local solution exactly reproduce the analytic solution.

5.2 Fracture Mechanic Problem

This example considers a cracked plate submitted to an axial stress, as shown in Fig. 15. The cracked zone produces singular stress field near the crack tip. The objective of this problem is to illustrate the use of this version of GFEM^{gl} for fracture mechanic problems. This problem analyzed under plane stress state, has the following parameters (in consistent units):

The reference solution of this problem is obtained using a mesh of 12087 p-quadrilateral elements in ANSYS^{(r)}. For GFEM^{gl} analysis, however, a smaller number of finite elements as well as of degrees of freedom (DOFs) is used. The reason for using a smaller number of DOFs is explained by the use of global-local enrichment function, which is suitable for high stress concentration. This strategy is used to describe the singular stress near the crack tip.

A geometric mesh is used to describe the local domain, Fig. 16 and it is shown in Fig. 17. This mesh is graded so that the elements are decreased in geometric progression toward the crack tip, in four levels (L1, L2, L3 and L4) with a common reduction factor of 10%. Results are shown in Fig. 18. Also, Table 1 presents a comparison between the strain energy values for the reference and approximate solutions.

It can be observed from the results shown in Fig. 18 and Table 1 the capability of the global-local enrichment strategy to represent the singular stress field close to the crack tip.

6 CONCLUSION

An overview of the GFEM^{gl} is given with emphasis on implementation aspects under OOP approach. The focus of this work is to present a GFEM^{gl} extension of a FEM programming environment called INSANE. The proposed approach allows to combine any types of partition of unity methods, analysis model and enrichment strategy. Also, an expansion of the numerical core INSANE, in order to adapt it to impose boundary conditions using the penalty method is included. The OOP approach is fully exploited, reinforcing the premise segmentation and encapsulation of the INSANE environment. The validation of this extension and some additional conclusions about the GFEM global-local strategy are presented by numerical examples for Solid Mechanics.