private void cargaBDF(BufferedReader bf) throws IOException 
    {
        String linea;
        int indice;
        double x,y,z,w;
        Nodo nodo;
        Elemento elemento;
        do
        {
            linea = bf.readLine();
            if(linea.startsWith("GRID"))
            {
                indice = Integer.parseInt(linea.substring(9, 14));
                
                x = Double.parseDouble(linea.substring(24,31));
                y = Double.parseDouble(linea.substring(32,40));
                z = Double.parseDouble(linea.substring(40));
                
                
                nodo = new Nodo(new double[]{x,y,z});
                nodos.put(new Integer(indice), nodo);
            }
            else
                if(linea.startsWith("CQUAD4"))
                {
                    indice = Integer.parseInt(linea.substring(9, 14));
                    x = Double.parseDouble(linea.substring(25,32));
                    y = Double.parseDouble(linea.substring(33,40));
                    z = Double.parseDouble(linea.substring(41,48));
                    w = Double.parseDouble(linea.substring(49));
                    
                    elemento = new Elemento(new int[]{(int)x,(int)y,(int)z,(int)w});
                    elementos.put(new Integer(indice), elemento);
                }   
                else
                    if(linea.startsWith("CTRIA3"))
                    {
                        indice = Integer.parseInt(linea.substring(9, 14));
                        x = Double.parseDouble(linea.substring(25,32));
                        y = Double.parseDouble(linea.substring(33,40));
                        z = Double.parseDouble(linea.substring(41));

                        elemento = new Elemento(new int[]{(int)x,(int)y,(int)z});
                        elementos.put(new Integer(indice), elemento);
                    }
        }while(!linea.startsWith("ENDDATA"));
    }