← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3771: Implement deformable elements

 

------------------------------------------------------------
revno: 3771
author: Burak Er <burak.er@xxxxxxxxxx>
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2016-01-07 18:49:32 +0100
message:
  Implement deformable elements
  
  The deformable elements are the finite-discrete elements that are
  connected together with interaction elements. The interaction element
  hold discrete finite elements together with applying fictitious forces
  if they separate from each other. With this approach their connectivity
  is provided as in the case of Finite element method.
  
  https://www.researchgate.net/publication/286870976_Wave_Propagation_in_Galerkin_Based_Discrete_Element_Particles
added:
  examples/deformableelem/
  examples/deformableelem/Minimal.py
  examples/deformableelem/MinimalTensileTest.py
  examples/deformableelem/ReadMe
  examples/deformableelem/main.py
  examples/deformableelem/model.geo
  examples/deformableelem/model.msh
  examples/deformableelem/model.stl
  examples/deformableelem/testDeformableBodies.py
  examples/deformableelem/testDeformableBodies_pressure.py
  pkg/dem/deformablecohesive/
  pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.cpp
  pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.hpp
  pkg/dem/deformablecohesive/Bo1_Node_Aabb.cpp
  pkg/dem/deformablecohesive/Bo1_Node_Aabb.hpp
  pkg/dem/deformablecohesive/CohesiveMat.cpp
  pkg/dem/deformablecohesive/CohesiveMat.hpp
  pkg/dem/deformablecohesive/DeformableCohesiveElement.cpp
  pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp
  pkg/dem/deformablecohesive/DeformableElement.cpp
  pkg/dem/deformablecohesive/DeformableElement.hpp
  pkg/dem/deformablecohesive/FEInternalForceDispatchers.cpp
  pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp
  pkg/dem/deformablecohesive/FEInternalForceEngine.cpp
  pkg/dem/deformablecohesive/FEInternalForceEngine.hpp
  pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp
  pkg/dem/deformablecohesive/Gl1_DeformableElement.hpp
  pkg/dem/deformablecohesive/Gl1_Node.cpp
  pkg/dem/deformablecohesive/Gl1_Node.hpp
  pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.cpp
  pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.hpp
  pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.cpp
  pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.hpp
  pkg/dem/deformablecohesive/Lin4NodeTetra.cpp
  pkg/dem/deformablecohesive/Lin4NodeTetra.hpp
  pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.cpp
  pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp
  pkg/dem/deformablecohesive/LinElastMat.cpp
  pkg/dem/deformablecohesive/LinElastMat.hpp
  pkg/dem/deformablecohesive/Node.cpp
  pkg/dem/deformablecohesive/Node.hpp
  py/deformableelementsutils.py
modified:
  core/Shape.hpp
  py/utils.py
  py/ymport.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'core/Shape.hpp'
--- core/Shape.hpp	2014-10-15 06:44:01 +0000
+++ core/Shape.hpp	2016-01-07 17:49:32 +0000
@@ -16,12 +16,16 @@
 
 class BoundFunctor;
 
+class InternalForceFunctor;
+
 class Shape: public Serializable, public Indexable {
 	public:
-		~Shape() {}; // vtable
+		virtual ~Shape() {}; // vtable
 		#ifdef BV_FUNCTOR_CACHE
 			shared_ptr<BoundFunctor> boundFunctor;
 		#endif
+		//! cache functor that are called for this type of DeformableElement. Used by FEInternalForceEngine
+		shared_ptr<InternalForceFunctor> internalforcefunctor;
 
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Shape,Serializable,"Geometry of a body",
 		((Vector3r,color,Vector3r(1,1,1),,"Color for rendering (normalized RGB)."))

=== added directory 'examples/deformableelem'
=== added file 'examples/deformableelem/Minimal.py'
--- examples/deformableelem/Minimal.py	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/Minimal.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,98 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Created by Burak ER
+from yade.deformableelementsutils import *;
+
+O=Omega()
+
+## Create deformable elements internal materials and interaction element material
+
+mat=LinIsoRayleighDampElastMat(label='aluminiummaterial');
+
+intermat=LinCohesiveStiffPropDampElastMat(label='intermat')
+
+intermat.youngmodulus=70e11;
+
+mat.density=2700;
+
+mat.youngmodulus=70e9
+
+O.materials.append(intermat)
+
+O.materials.append(mat)
+
+## Generate deformable element mesh from GMSH2 format
+
+nodesofelement1=[[0, 0 ,0],[0, 1, 0],[1 ,0 ,0],[0, 0 ,1]]
+nodesofelement2=[[0, 0 ,0],[0, 1, 0],[1,0 ,0],[0, 0 ,-1]]
+
+
+noderadius=0.1*(0.75*tetrahedronvolume(nodesofelement1))**0.33333333;
+
+[elbody, nodebodies1]=tetrahedral_element(mat,nodesofelement1,Lin4NodeTetra,radius=noderadius)
+[elbody, nodebodies2]=tetrahedral_element(mat,nodesofelement2,Lin4NodeTetra,radius=noderadius)
+nodebodies1[3].state.pos+=Vector3(0,0,0.01);
+
+
+interfaceelementpairs=[];
+interfaceelementpairs.append([nodebodies1[0], nodebodies2[0]]);
+interfaceelementpairs.append([nodebodies1[1], nodebodies2[1]]);
+interfaceelementpairs.append([nodebodies1[2], nodebodies2[2]]);
+
+[elbody, nodebodies]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+
+
+#mesh=tetrahedral_mesh_generator('model.msh',Lin4NodeTetra,'aluminiummaterial',Lin4NodeTetra_Lin4NodeTetra_InteractionElement,'intermat')
+
+## Define the body boundary force
+
+# x position limits of bodies that are subject to the force
+force_tail_body_lowerlimit=-1.01;
+
+force_tail_body_upperlimit=-0.9999;
+
+# Angular frequency of the force
+amplitude=100000;
+
+period=(1e-3)
+
+omega=2*pi/period;
+
+applicationperiod=period/2;
+
+## Define the fixed boundary
+
+# x position limits of bodies that are subject to the fixed boundary
+
+fixed_tail_body_lowerlimit=0.99;
+
+fixed_tail_body_upperlimit=1.01;
+
+
+
+# Time step determines the exiting period of the integrator since the integrator performs one step from current_time to current_time+dt; using many substeps for any value of dt; then stops. 
+
+O.dt=1e-9;
+
+O.engines=[
+	    ForceResetter(),	
+	    ## Apply internal force to the deformable elements and internal force of the interaction element	 
+	    FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+	    NewtonIntegrator(damping=0,gravity=[0,0,0]),
+	   #PyRunner(virtPeriod=1e-99,command='applyforcetoelements()'),
+	   # ## Plotting data: adds plots after one step of the integrator engine
+	   #PyRunner(virtPeriod=1e-99,command='addplot()')
+	  ]
+
+from yade import plot
+
+plot.plots={'t':'vel','time':'pos','tm':'force'}
+plot.plot(subPlots=True)
+
+try:
+	from yade import qt
+	qt.View()
+	qt.Controller()
+except ImportError: pass
+

=== added file 'examples/deformableelem/MinimalTensileTest.py'
--- examples/deformableelem/MinimalTensileTest.py	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/MinimalTensileTest.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,206 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Created by Burak ER
+from yade.deformableelementsutils import *;
+
+O=Omega()
+
+pressure=70e7;# N/m^2
+wx=1;#m
+wy=1;#m
+wz=1;#m
+## Create deformable elements internal materials and interaction element material
+
+mat=LinIsoRayleighDampElastMat(label='aluminiummaterial');
+
+intermat=LinCohesiveStiffPropDampElastMat(label='intermat')
+
+intermat.youngmodulus=70e11;
+
+mat.density=2700;
+
+mat.beta=0.05;
+
+mat.alpha=0.05;
+
+mat.youngmodulus=70e9;
+
+O.materials.append(intermat)
+
+O.materials.append(mat)
+
+
+
+
+#create points of a cube with number of 8 points
+p0=Vector3([0, 0 ,0]);
+p1=Vector3([0, wy, 0]);
+p2=Vector3([wx ,0 ,0]);
+p3=Vector3([0, 0 ,wz]);
+p4=Vector3([0, wy, wz]);
+p5=Vector3([wx, wy, 0]);
+p6=Vector3([wx, 0 ,wz]);
+p7=Vector3([wx, wy ,wz]);
+
+nodesofelement1=[p0,p1,p2,p3];
+nodesofelement2=[p3,p4,p1,p7];
+nodesofelement3=[p2,p5,p1,p7];
+nodesofelement4=[p7,p2,p3,p6];
+nodesofelement5=[p1,p2,p3,p7];
+
+
+
+
+
+noderadius=0.1*(0.75*tetrahedronvolume(nodesofelement1))**0.33333333;
+
+[elbody1, nodebodies1]=tetrahedral_element(mat,nodesofelement1,Lin4NodeTetra,radius=noderadius)
+[elbody2, nodebodies2]=tetrahedral_element(mat,nodesofelement2,Lin4NodeTetra,radius=noderadius)
+[elbody3, nodebodies3]=tetrahedral_element(mat,nodesofelement3,Lin4NodeTetra,radius=noderadius)
+[elbody4, nodebodies4]=tetrahedral_element(mat,nodesofelement4,Lin4NodeTetra,radius=noderadius)
+[elbody5, nodebodies5]=tetrahedral_element(mat,nodesofelement5,Lin4NodeTetra,radius=noderadius)
+
+
+
+interfaceelementpairs=[];
+#interface of 1-5
+interfaceelementpairs.append([nodebodies1[1], nodebodies5[0]]);
+interfaceelementpairs.append([nodebodies1[2], nodebodies5[1]]);
+interfaceelementpairs.append([nodebodies1[3], nodebodies5[2]]);
+
+[elbodyinter, nodebodiesinter]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+#interface of 2-5
+interfaceelementpairs=[];
+interfaceelementpairs.append([nodebodies2[0], nodebodies5[2]]);
+interfaceelementpairs.append([nodebodies2[2], nodebodies5[0]]);
+interfaceelementpairs.append([nodebodies2[3], nodebodies5[3]]);
+
+[elbodyinter, nodebodiesinter]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+#interface of 3-5
+interfaceelementpairs=[];
+interfaceelementpairs.append([nodebodies3[0], nodebodies5[1]]);
+interfaceelementpairs.append([nodebodies3[2], nodebodies5[0]]);
+interfaceelementpairs.append([nodebodies3[3], nodebodies5[3]]);
+
+[elbodyinter, nodebodiesinter]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+#interface of 3-5
+interfaceelementpairs=[];
+interfaceelementpairs.append([nodebodies3[0], nodebodies5[1]]);
+interfaceelementpairs.append([nodebodies3[2], nodebodies5[0]]);
+interfaceelementpairs.append([nodebodies3[3], nodebodies5[3]]);
+[elbodyinter, nodebodiesinter]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+#interface of 4-5
+interfaceelementpairs=[];
+interfaceelementpairs.append([nodebodies4[0], nodebodies5[3]]);
+interfaceelementpairs.append([nodebodies4[1], nodebodies5[1]]);
+interfaceelementpairs.append([nodebodies4[2], nodebodies5[2]]);
+[elbodyinter, nodebodiesinter]=interaction_element(intermat,interfaceelementpairs,Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+
+# Time step determines the exiting period of the integrator since the integrator performs one step from current_time to current_time+dt; using many substeps for any value of dt; then stops. 
+initpos0=O.bodies[nodebodies1[0].id].state.pos;
+
+
+
+def applyforcetoelements():
+	
+		pos0=O.bodies[nodebodies3[0].id].state.pos;
+		pos1=O.bodies[nodebodies3[1].id].state.pos;
+		pos2=O.bodies[nodebodies3[2].id].state.pos;
+		area1=0.5*((pos1-pos0).cross(pos2-pos0)).norm();
+
+
+		pos0=O.bodies[nodebodies1[0].id].state.pos;
+		pos1=O.bodies[nodebodies1[1].id].state.pos;
+		pos2=O.bodies[nodebodies1[2].id].state.pos;
+		area2=0.5*((pos1-pos0).cross(pos2-pos0)).norm();
+
+
+		Traction=area1*pressure;
+
+		O.forces.addF(nodebodies3[0].id,Vector3(0,0,-(0.3*Traction)));
+		O.forces.addF(nodebodies3[1].id,Vector3(0,0,-(0.3*Traction)));
+		O.forces.addF(nodebodies3[2].id,Vector3(0,0,-(0.3*Traction)));
+
+
+		
+		Traction=area2*pressure;
+
+		O.forces.addF(nodebodies1[0].id,Vector3(0,0,-(0.3*Traction)));
+		O.forces.addF(nodebodies1[1].id,Vector3(0,0,-(0.3*Traction)));
+		O.forces.addF(nodebodies1[2].id,Vector3(0,0,-(0.3*Traction)));
+
+def fixboundryelements():
+	
+	nodebodies1[3].state.blockedDOFs='xyzXYZ'
+	nodebodies2[0].state.blockedDOFs='xyzXYZ'
+	nodebodies2[1].state.blockedDOFs='xyzXYZ'
+	nodebodies2[3].state.blockedDOFs='xyzXYZ'
+	nodebodies3[3].state.blockedDOFs='xyzXYZ'
+	nodebodies4[0].state.blockedDOFs='xyzXYZ'
+	nodebodies4[2].state.blockedDOFs='xyzXYZ'
+	nodebodies4[3].state.blockedDOFs='xyzXYZ'
+	nodebodies5[2].state.blockedDOFs='xyzXYZ'
+	nodebodies5[3].state.blockedDOFs='xyzXYZ'
+
+
+fixboundryelements();
+
+
+def addplot():
+	 vecpos=(O.bodies[nodebodies1[0].id].state.pos-initpos0)
+	 plot.addData(displacement=abs(vecpos[2]),time=O.time)
+
+
+
+
+
+ ##integratoreng=RungeKuttaCashKarp54Integrator([
+ ##	    ForceResetter(),
+
+	    ## Apply internal force to the deformable elements and internal force of the interaction element	 
+ ##	    FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+
+ ##	    PyRunner(virtPeriod=1e-99,command='applyforcetoelements()'),
+	  
+
+ ##])
+
+ ##O.engines=[integratoreng,
+ ##  PyRunner(iterPeriod=1,command='addplot()')
+ ##]
+
+ ##integratoreng.rel_err=1e-3;
+
+ ##integratoreng.abs_err=1e-3;
+O.engines=[ForceResetter(),
+ 	    PyRunner(virtPeriod=1e-99,command='applyforcetoelements()'), 
+	    ## Apply internal force to the deformable elements and internal force of the interaction element	
+
+ 	    FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+	    NewtonIntegrator(damping=0,gravity=[0,0,0]),
+ 	    PyRunner(virtPeriod=1e-99,command='addplot()'), 
+
+];
+
+
+
+
+O.dt=1e-7;
+
+from yade import plot
+
+plot.plots={'time':'displacement'}
+
+plot.plot(subPlots=False)
+
+try:
+	from yade import qt
+	qt.View()
+	qt.Controller()
+except ImportError: pass
+

=== added file 'examples/deformableelem/ReadMe'
--- examples/deformableelem/ReadMe	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/ReadMe	2016-01-07 17:49:32 +0000
@@ -0,0 +1,1 @@
+This folder includes the simulation files for the deformable elements.

=== added file 'examples/deformableelem/main.py'
--- examples/deformableelem/main.py	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/main.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  untitled.py
+#  
+#  Copyright 2014 Burak ER <burak@Newton>
+#  
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#  
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#  
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+#  MA 02110-1301, USA.
+#  
+#  
+import sys
+
+from yadeimport import *
+
+
+
+def main():
+	
+	execfile("testDeformableBodies_pressure.py");
+
+	return 0
+
+if __name__ == '__main__':
+	main()
+

=== added file 'examples/deformableelem/model.geo'
--- examples/deformableelem/model.geo	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/model.geo	2016-01-07 17:49:32 +0000
@@ -0,0 +1,5 @@
+Merge "model.msh";
+Physical Volume(100002) = {100001};
+Physical Volume(100003) = {100001};
+Field[1] = Max;
+Field[1].FieldsList = {1, -3};

=== added file 'examples/deformableelem/model.msh'
--- examples/deformableelem/model.msh	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/model.msh	2016-01-07 17:49:32 +0000
@@ -0,0 +1,2188 @@
+$MeshFormat
+2.000000 0 8
+$EndMeshFormat
+$Nodes
+391
+1 1.000000 -0.000000 0.100001
+2 1.000000 0.057628 0.081449
+3 1.000000 0.093943 0.033143
+4 1.000000 0.095747 -0.027197
+5 1.000000 0.057793 -0.081311
+6 1.000000 0.000213 -0.099978
+7 1.000000 -0.057462 -0.081583
+8 1.000000 -0.093881 -0.033347
+9 1.000000 -0.095809 0.026994
+10 1.000000 -0.061597 0.078191
+11 -1.000000 0.019509 0.098078
+12 -1.000000 -0.040630 0.091124
+13 -1.000000 -0.088702 0.045164
+14 -1.000000 -0.098583 -0.014392
+15 -1.000000 -0.072274 -0.068806
+16 -1.000000 -0.019297 -0.098100
+17 -1.000000 0.040819 -0.091026
+18 -1.000000 0.088058 -0.046370
+19 -1.000000 0.098604 0.014177
+20 -1.000000 0.072410 0.068640
+21 0.938054 0.024884 0.096449
+22 0.942040 0.099428 0.005807
+23 0.937511 -0.039138 0.091924
+24 0.938529 -0.099197 -0.008157
+25 0.937866 -0.085505 0.051146
+26 -0.935772 -0.009233 0.099090
+27 -0.935059 -0.098116 0.019135
+28 -0.936955 0.047824 0.087279
+29 -0.932001 0.012945 -0.098726
+30 -0.939627 0.098408 -0.016167
+31 -0.941572 0.091831 0.039309
+32 0.940439 0.077604 0.062311
+33 0.942163 0.084067 -0.053835
+34 0.942625 0.035114 -0.093344
+35 0.940410 -0.025721 -0.096193
+36 0.939409 -0.076290 -0.063912
+37 -0.935795 -0.065696 0.074826
+38 -0.933838 -0.090360 -0.042063
+39 -0.933082 -0.048316 -0.087018
+40 -0.931798 0.067594 -0.073269
+41 -0.871443 -0.075186 -0.065258
+42 -0.869209 0.044603 -0.089003
+43 -0.871593 -0.099242 -0.007698
+44 0.881241 0.009830 -0.099031
+45 0.875387 0.093148 0.035763
+46 -0.864205 0.090445 -0.041904
+47 0.878132 -0.089425 -0.043812
+48 0.879260 -0.048259 -0.087047
+49 -0.872222 -0.084249 0.053495
+50 -0.870940 -0.021108 -0.097594
+51 0.872440 0.049522 0.086374
+52 -0.873039 -0.032991 0.093988
+53 0.872787 -0.013273 0.098693
+54 0.874853 -0.067709 0.073175
+55 -0.876103 0.028308 0.095409
+56 -0.881567 0.078171 0.061620
+57 0.877005 -0.098192 0.018359
+58 -0.811006 -0.093050 -0.036088
+59 -0.812500 -0.056997 0.081965
+60 -0.815107 0.006523 0.099357
+61 0.802304 0.015762 0.098448
+62 -0.891527 0.098734 0.012860
+63 0.816626 -0.068002 -0.072933
+64 -0.810476 -0.094957 0.029800
+65 0.818500 -0.013640 -0.098656
+66 0.800850 0.074404 0.066211
+67 -0.811756 0.008702 -0.099144
+68 -0.822586 0.064940 0.075446
+69 -0.810348 -0.050539 -0.085830
+70 0.814331 -0.098360 -0.016659
+71 -0.805975 0.064981 -0.075414
+72 -0.834882 0.097205 0.022391
+73 -0.745277 -0.099836 -0.001669
+74 -0.752836 -0.022840 -0.097068
+75 -0.746826 -0.077739 0.062145
+76 0.755653 -0.085163 -0.051785
+77 -0.787922 0.096181 -0.025768
+78 0.813475 -0.089194 0.044245
+79 -0.736253 0.073409 -0.067424
+80 0.811367 -0.046396 0.088044
+81 0.879466 0.096680 -0.024119
+82 -0.750530 -0.015133 0.098509
+83 -0.770244 0.093506 0.034581
+84 -0.757482 0.046185 0.088156
+85 -0.760407 0.031490 -0.094445
+86 0.726801 0.044933 0.088826
+87 -0.746685 -0.075100 -0.065363
+88 0.808824 0.099272 0.007394
+89 0.745199 -0.021133 0.097586
+90 0.740502 0.093959 0.033089
+91 0.882076 0.063560 -0.076578
+92 0.822272 0.043508 -0.089586
+93 0.756728 -0.035506 -0.093225
+94 0.759724 0.023852 -0.096761
+95 0.753758 -0.099192 0.008204
+96 -0.684587 -0.092912 -0.036540
+97 -0.682890 -0.092967 0.036358
+98 -0.683525 -0.043358 0.089667
+99 -0.690823 -0.046726 -0.087868
+100 0.695500 -0.095271 -0.028765
+101 0.688133 -0.007012 0.099310
+102 -0.703040 0.018413 -0.098187
+103 -0.689913 0.025783 0.096175
+104 -0.697577 0.081991 0.056965
+105 0.818522 0.086597 -0.049102
+106 0.696991 -0.058629 -0.080626
+107 0.768902 0.067104 -0.073670
+108 0.707442 0.065902 -0.074657
+109 -0.637357 -0.006706 -0.099340
+110 0.697299 0.003941 -0.099611
+111 -0.620183 -0.067156 0.073628
+112 -0.625681 -0.072905 -0.068037
+113 -0.714981 0.098909 -0.011081
+114 0.634328 0.036175 -0.093022
+115 0.639987 -0.079176 -0.060395
+116 -0.620134 -0.099401 0.006085
+117 -0.630755 0.065920 0.074642
+118 0.751088 -0.077263 0.062727
+119 -0.624602 -0.003001 0.099704
+120 0.688101 -0.059010 0.080314
+121 0.635669 -0.026580 -0.095933
+122 0.649793 0.030560 0.094727
+123 -0.654341 0.071147 -0.070179
+124 -0.640134 0.099222 0.007903
+125 -0.557233 -0.088052 0.046381
+126 -0.579739 0.088853 -0.044883
+127 0.629683 -0.027527 0.095647
+128 0.581685 -0.059301 -0.080074
+129 0.626003 -0.080927 0.058263
+130 0.692300 -0.094122 0.032552
+131 0.753609 0.095390 -0.028372
+132 -0.567124 -0.042053 -0.090366
+133 -0.557087 -0.093671 -0.034039
+134 -0.559908 -0.030373 0.094782
+135 0.561913 0.006865 -0.099323
+136 -0.564148 0.042555 0.090096
+137 -0.581315 0.032878 -0.094024
+138 -0.526354 0.062898 -0.077123
+139 0.634360 -0.099712 -0.002928
+140 -0.496502 0.014829 0.098539
+141 -0.493214 -0.098880 0.011375
+142 -0.569772 0.094919 0.029926
+143 -0.498694 0.080073 0.059302
+144 -0.495822 -0.060372 0.079195
+145 0.564055 -0.059477 0.079931
+146 0.570122 0.070487 -0.070894
+147 -0.490024 -0.072037 -0.069095
+148 0.559589 -0.097600 0.021087
+149 0.588799 -0.093766 -0.033727
+150 0.609987 0.060708 0.078920
+151 -0.429987 -0.098384 -0.016411
+152 -0.497960 0.096456 -0.024860
+153 -0.512080 0.003199 -0.099685
+154 -0.432113 -0.083936 0.054081
+155 -0.463067 0.052833 -0.084603
+156 -0.443006 -0.013591 -0.098662
+157 -0.430686 0.060527 0.079068
+158 -0.432219 -0.013252 0.098695
+159 0.513552 -0.024604 0.096533
+160 0.535251 -0.088219 -0.046069
+161 -0.439095 0.097339 0.021947
+162 -0.358500 0.096351 0.025203
+163 0.526581 -0.047303 -0.087558
+164 -0.413833 0.088892 -0.044809
+165 0.516558 0.094321 -0.031896
+166 0.573545 0.013217 0.098698
+167 0.459760 0.086786 -0.048748
+168 0.558115 0.076061 0.064192
+169 0.499226 0.047424 0.087495
+170 0.606462 0.090292 0.042190
+171 0.575299 0.099666 -0.003395
+172 0.511513 0.093712 0.033905
+173 0.448026 0.084594 0.052851
+174 0.424319 0.040181 0.091366
+175 0.495768 -0.083519 0.054861
+176 0.488341 -0.099013 -0.010019
+177 0.463664 -0.000006 0.100000
+178 0.442850 -0.098106 0.019236
+179 -0.366697 0.032592 0.094110
+180 0.463815 -0.047028 0.087706
+181 0.427085 -0.075753 0.064567
+182 0.415809 -0.024858 0.096456
+183 -0.368043 -0.047413 0.087500
+184 -0.367314 -0.095094 0.029349
+185 0.363791 0.007696 0.099242
+186 0.387540 -0.095872 0.026784
+187 -0.391796 0.034105 -0.093651
+188 -0.365881 -0.088273 -0.045968
+189 -0.340582 0.073943 -0.066773
+190 0.470979 0.099640 0.003661
+191 0.448116 0.047746 -0.087321
+192 -0.302643 0.063541 0.076594
+193 0.482888 -0.008791 -0.099134
+194 -0.373194 -0.031712 -0.094377
+195 0.395939 0.038829 -0.092088
+196 0.412407 0.099688 0.003171
+197 0.418600 -0.093568 -0.034377
+198 -0.422894 -0.067776 -0.073120
+199 0.425232 -0.049264 -0.086510
+200 0.363887 -0.064907 -0.075474
+201 0.427612 0.003658 -0.099639
+202 0.399982 0.080545 -0.058727
+203 0.370545 0.078279 0.061489
+204 -0.304472 -0.076581 0.063557
+205 -0.304362 -0.006479 0.099362
+206 -0.242267 -0.042837 0.089946
+207 0.369415 -0.059852 0.079623
+208 0.321689 -0.088999 0.044609
+209 0.306834 -0.038380 0.092329
+210 -0.301822 -0.099313 -0.006978
+211 -0.304053 -0.062997 -0.077041
+212 -0.317257 0.006622 -0.099348
+213 0.347270 0.098824 -0.011941
+214 0.375968 -0.008958 -0.099118
+215 -0.288060 0.095794 0.027041
+216 0.339465 0.049011 -0.086646
+217 0.297140 0.092182 0.038653
+218 0.273603 0.088265 -0.045982
+219 -0.232031 -0.027711 -0.095590
+220 -0.261934 0.046465 -0.088007
+221 -0.235090 -0.092834 -0.036798
+222 -0.239667 -0.093727 0.033855
+223 -0.170524 -0.079409 -0.060111
+224 -0.286256 0.092254 -0.038519
+225 0.303363 0.037160 0.092724
+226 -0.214829 0.082471 -0.056381
+227 -0.190091 0.032997 -0.093987
+228 0.321061 -0.019034 -0.098125
+229 -0.233940 0.084623 0.052796
+230 -0.240425 0.029060 0.095181
+231 -0.175286 0.099158 0.008548
+232 0.240908 0.068588 0.072453
+233 0.235769 -0.009991 0.099016
+234 -0.237455 0.099696 -0.003093
+235 0.277035 0.027429 -0.095676
+236 0.224595 0.056242 -0.082585
+237 0.237297 0.098871 0.011467
+238 0.188995 0.089481 -0.043706
+239 0.180822 0.093776 0.033695
+240 0.270227 -0.033538 -0.093822
+241 -0.146674 0.080192 -0.059158
+242 0.179673 0.042873 0.089927
+243 -0.121320 0.032425 -0.094161
+244 -0.152396 -0.026352 -0.096002
+245 0.300283 -0.074170 -0.066496
+246 0.225785 -0.077997 -0.061832
+247 0.345139 -0.097165 -0.022521
+248 0.274849 -0.099259 -0.007529
+249 0.256545 -0.077852 0.062010
+250 0.207579 -0.098932 0.010842
+251 -0.075942 0.076755 -0.063346
+252 -0.105687 -0.071374 -0.069902
+253 -0.088204 -0.020908 -0.097654
+254 0.219595 -0.005877 -0.099421
+255 -0.063350 0.029740 -0.094975
+256 -0.026275 -0.011388 -0.098879
+257 0.122795 0.076265 0.063943
+258 0.116108 0.099689 -0.003163
+259 0.114689 0.067940 -0.072984
+260 0.079681 0.049557 0.086354
+261 -0.051242 -0.058303 -0.080894
+262 0.121127 0.015191 0.098504
+263 0.008279 -0.066362 -0.074280
+264 0.058023 -0.007181 0.099293
+265 0.030621 0.047061 0.087688
+266 0.111355 -0.056753 0.082166
+267 -0.006181 0.055395 -0.083234
+268 0.167169 0.033838 -0.093732
+269 0.168268 -0.016104 0.098414
+270 -0.111125 -0.098847 -0.011706
+271 -0.064140 0.093130 0.035822
+272 -0.114993 -0.085413 0.051317
+273 0.162715 -0.038010 -0.092466
+274 -0.045234 -0.092982 -0.036310
+275 0.144701 -0.093956 -0.033098
+276 0.146979 -0.093627 0.034183
+277 0.083125 -0.096989 0.023101
+278 -0.046585 -0.094801 0.030314
+279 0.069745 -0.088914 -0.044767
+280 0.062913 -0.046857 -0.087797
+281 0.015636 -0.099453 -0.005554
+282 0.022984 -0.068195 0.072775
+283 0.110633 -0.060160 -0.079369
+284 -0.122681 -0.034651 0.093485
+285 -0.125551 0.029958 0.094909
+286 -0.120261 0.084075 0.053821
+287 -0.056904 -0.056344 0.082501
+288 -0.076563 -0.002208 0.099783
+289 -0.068141 0.052302 0.084887
+290 -0.013519 0.006988 0.099312
+291 0.058593 0.047567 -0.087418
+292 0.031759 -0.003688 -0.099637
+293 0.102016 0.002714 -0.099733
+294 0.666813 0.082187 0.056727
+295 0.635890 0.099341 0.006689
+296 0.189553 -0.066853 0.073877
+297 -0.011521 0.076247 0.063965
+298 1.000000 0.014760 0.045660
+299 1.000000 0.036356 -0.011488
+300 1.000000 -0.013581 -0.046360
+301 1.000000 -0.038110 0.009717
+302 -1.000000 0.007459 0.034783
+303 -1.000000 -0.038566 -0.022250
+304 -1.000000 0.024573 -0.032601
+305 0.507431 0.054027 -0.083964
+306 0.477853 -0.073278 -0.067582
+307 0.634339 0.087489 -0.047433
+308 -0.176236 -0.099015 0.010002
+309 0.053071 0.090934 0.040990
+310 -0.021542 0.098720 -0.013002
+311 -0.181279 -0.004437 0.099563
+312 -0.178757 -0.068560 0.072476
+313 -0.101245 0.098976 -0.010400
+314 0.050238 0.090900 -0.041052
+315 0.691600 0.099023 -0.009925
+316 -0.179559 0.062819 0.077187
+317 0.781079 0.009803 -0.001734
+318 0.691437 -0.004841 -0.000770
+319 0.600206 0.010804 -0.003315
+320 -0.057532 0.000023 0.008545
+321 0.270814 -0.005796 -0.016022
+322 -0.627542 0.040994 0.021098
+323 -0.746994 -0.033005 -0.031250
+324 -0.823282 -0.040889 -0.040022
+325 -0.516850 -0.013858 -0.020544
+326 0.135797 0.052625 -0.036957
+327 0.556946 0.049544 0.034985
+328 -0.736396 -0.001046 0.038838
+329 0.029080 0.004934 -0.031230
+330 -0.211325 -0.048400 0.000090
+331 0.123240 -0.061907 0.014900
+332 -0.554737 0.033315 0.013644
+333 -0.932297 0.021719 -0.019643
+334 0.548220 -0.050118 0.000475
+335 0.203908 0.006168 0.040597
+336 0.339643 0.023410 0.025700
+337 -0.398892 0.032459 0.016749
+338 0.815754 -0.027222 -0.046016
+339 0.193934 -0.044589 0.000811
+340 0.837450 0.054696 -0.012449
+341 -0.686057 0.048378 0.004382
+342 -0.592624 -0.034894 0.007694
+343 -0.449333 -0.030421 0.010419
+344 -0.116594 0.025711 -0.033930
+345 -0.226825 0.037208 0.004783
+346 -0.804180 0.053429 -0.022848
+347 -0.372949 -0.031259 -0.021606
+348 -0.291525 0.038990 -0.017743
+349 0.113004 0.015500 -0.059065
+350 0.122065 -0.003371 0.003186
+351 -0.171371 0.032116 -0.042313
+352 0.877601 -0.038440 0.018099
+353 -0.868839 0.007889 -0.038486
+354 0.002784 -0.047233 -0.005112
+355 0.070348 -0.059675 0.029716
+356 0.155214 -0.031379 0.049519
+357 -0.444308 0.029668 -0.029785
+358 0.525330 0.002683 0.038115
+359 -0.745848 0.060368 0.014107
+360 -0.668052 -0.018075 -0.008146
+361 -0.273335 -0.030729 -0.023801
+362 0.867291 0.007162 -0.036061
+363 0.029184 0.041795 0.030179
+364 0.077575 -0.006633 -0.056160
+365 0.926415 0.025993 0.011034
+366 0.388808 0.014089 -0.041244
+367 0.443128 -0.043327 0.005115
+368 -0.274478 0.035634 0.044701
+369 -0.894527 0.005091 0.044055
+370 -0.210570 -0.007105 -0.047497
+371 0.865172 0.029656 0.036891
+372 0.496320 0.053835 0.037399
+373 0.427122 0.029880 0.040565
+374 -0.841065 0.028342 0.059317
+375 -0.330034 0.012961 0.024645
+376 0.080921 0.049963 -0.015027
+377 0.926090 -0.010492 -0.041197
+378 -0.787506 0.043887 0.044456
+379 -0.154803 -0.013214 0.013935
+380 0.485460 0.013357 0.068805
+381 0.387500 -0.040652 0.011265
+382 0.488985 0.000379 -0.021350
+383 0.184202 0.039254 -0.011229
+384 -0.467121 0.037927 0.028601
+385 -0.607988 0.007153 -0.038876
+386 -0.248127 -0.017978 0.041536
+387 -0.807655 -0.007495 0.009169
+388 0.449116 0.004963 -0.050266
+389 0.158397 0.025712 0.054127
+390 0.060679 -0.029677 0.002048
+391 0.475910 0.017244 0.028656
+$EndNodes
+$Elements
+1788
+1 2 2 1 1  1 2 21
+2 2 2 1 1  3 4 22
+3 2 2 1 1  10 1 23
+4 2 2 1 1  1 21 23
+5 2 2 1 1  8 9 24
+6 2 2 1 1  9 10 25
+7 2 2 1 1  24 9 25
+8 2 2 1 1  10 23 25
+9 2 2 1 1  11 12 26
+10 2 2 1 1  13 14 27
+11 2 2 1 1  20 11 28
+12 2 2 1 1  11 26 28
+13 2 2 1 1  16 17 29
+14 2 2 1 1  18 19 30
+15 2 2 1 1  19 20 31
+16 2 2 1 1  30 19 31
+17 2 2 1 1  20 28 31
+18 2 2 1 1  2 3 32
+19 2 2 1 1  4 5 33
+20 2 2 1 1  5 6 34
+21 2 2 1 1  6 7 35
+22 2 2 1 1  7 8 36
+23 2 2 1 1  12 13 37
+24 2 2 1 1  2 32 21
+25 2 2 1 1  14 15 38
+26 2 2 1 1  15 16 39
+27 2 2 1 1  17 18 40
+28 2 2 1 1  33 5 34
+29 2 2 1 1  8 24 36
+30 2 2 1 1  14 38 27
+31 2 2 1 1  22 4 33
+32 2 2 1 1  32 3 22
+33 2 2 1 1  34 6 35
+34 2 2 1 1  35 7 36
+35 2 2 1 1  37 13 27
+36 2 2 1 1  39 16 29
+37 2 2 1 1  40 18 30
+38 2 2 1 1  12 37 26
+39 2 2 1 1  38 15 39
+40 2 2 1 1  17 40 29
+41 2 2 1 1  38 39 41
+42 2 2 1 1  29 40 42
+43 2 2 1 1  27 38 43
+44 2 2 1 1  38 41 43
+45 2 2 1 1  34 35 44
+46 2 2 1 1  32 22 45
+47 2 2 1 1  40 30 46
+48 2 2 1 1  36 24 47
+49 2 2 1 1  35 36 48
+50 2 2 1 1  37 27 49
+51 2 2 1 1  39 29 50
+52 2 2 1 1  21 32 51
+53 2 2 1 1  42 40 46
+54 2 2 1 1  27 43 49
+55 2 2 1 1  41 39 50
+56 2 2 1 1  44 91 34
+57 2 2 1 1  26 37 52
+58 2 2 1 1  51 32 45
+59 2 2 1 1  23 21 53
+60 2 2 1 1  25 23 54
+61 2 2 1 1  23 53 54
+62 2 2 1 1  28 26 55
+63 2 2 1 1  50 29 42
+64 2 2 1 1  31 28 56
+65 2 2 1 1  28 55 56
+66 2 2 1 1  48 36 47
+67 2 2 1 1  44 35 48
+68 2 2 1 1  47 24 57
+69 2 2 1 1  24 25 57
+70 2 2 1 1  37 49 52
+71 2 2 1 1  53 21 51
+72 2 2 1 1  55 26 52
+73 2 2 1 1  43 41 58
+74 2 2 1 1  52 49 59
+75 2 2 1 1  33 81 22
+76 2 2 1 1  55 52 60
+77 2 2 1 1  52 59 60
+78 2 2 1 1  53 51 61
+79 2 2 1 1  30 31 62
+80 2 2 1 1  46 30 62
+81 2 2 1 1  62 31 56
+82 2 2 1 1  48 47 63
+83 2 2 1 1  49 43 64
+84 2 2 1 1  44 48 65
+85 2 2 1 1  48 63 65
+86 2 2 1 1  51 45 66
+87 2 2 1 1  43 58 64
+88 2 2 1 1  59 49 64
+89 2 2 1 1  25 54 57
+90 2 2 1 1  50 42 67
+91 2 2 1 1  56 55 68
+92 2 2 1 1  55 60 68
+93 2 2 1 1  41 50 69
+94 2 2 1 1  50 67 69
+95 2 2 1 1  41 69 58
+96 2 2 1 1  51 66 61
+97 2 2 1 1  47 57 70
+98 2 2 1 1  63 47 70
+99 2 2 1 1  42 46 71
+100 2 2 1 1  62 56 72
+101 2 2 1 1  64 58 73
+102 2 2 1 1  67 42 71
+103 2 2 1 1  69 67 74
+104 2 2 1 1  59 64 75
+105 2 2 1 1  64 73 75
+106 2 2 1 1  72 56 68
+107 2 2 1 1  62 72 46
+108 2 2 1 1  63 70 76
+109 2 2 1 1  71 46 77
+110 2 2 1 1  77 46 72
+111 2 2 1 1  57 54 78
+112 2 2 1 1  71 77 79
+113 2 2 1 1  70 57 78
+114 2 2 1 1  53 61 80
+115 2 2 1 1  45 22 81
+116 2 2 1 1  60 59 82
+117 2 2 1 1  54 53 80
+118 2 2 1 1  72 68 83
+119 2 2 1 1  68 60 84
+120 2 2 1 1  83 68 84
+121 2 2 1 1  60 82 84
+122 2 2 1 1  74 67 85
+123 2 2 1 1  67 71 85
+124 2 2 1 1  61 66 86
+125 2 2 1 1  58 69 87
+126 2 2 1 1  82 59 75
+127 2 2 1 1  45 81 88
+128 2 2 1 1  45 88 66
+129 2 2 1 1  54 80 78
+130 2 2 1 1  71 79 85
+131 2 2 1 1  80 61 89
+132 2 2 1 1  66 88 90
+133 2 2 1 1  61 86 89
+134 2 2 1 1  87 69 74
+135 2 2 1 1  86 66 90
+136 2 2 1 1  58 87 73
+137 2 2 1 1  81 33 91
+138 2 2 1 1  33 34 91
+139 2 2 1 1  91 44 92
+140 2 2 1 1  92 105 91
+141 2 2 1 1  92 44 65
+142 2 2 1 1  65 63 93
+143 2 2 1 1  93 63 76
+144 2 2 1 1  65 93 94
+145 2 2 1 1  70 78 95
+146 2 2 1 1  73 87 96
+147 2 2 1 1  76 70 95
+148 2 2 1 1  75 73 97
+149 2 2 1 1  73 96 97
+150 2 2 1 1  65 94 92
+151 2 2 1 1  72 83 77
+152 2 2 1 1  82 75 98
+153 2 2 1 1  75 97 98
+154 2 2 1 1  87 74 99
+155 2 2 1 1  87 99 96
+156 2 2 1 1  80 118 78
+157 2 2 1 1  76 95 100
+158 2 2 1 1  89 86 101
+159 2 2 1 1  74 85 102
+160 2 2 1 1  291 293 292
+161 2 2 1 1  84 82 103
+162 2 2 1 1  82 98 103
+163 2 2 1 1  83 84 104
+164 2 2 1 1  84 103 104
+165 2 2 1 1  102 85 79
+166 2 2 1 1  282 281 277
+167 2 2 1 1  74 102 99
+168 2 2 1 1  88 81 105
+169 2 2 1 1  81 91 105
+170 2 2 1 1  93 76 106
+171 2 2 1 1  105 92 107
+172 2 2 1 1  107 131 105
+173 2 2 1 1  107 92 94
+174 2 2 1 1  107 94 108
+175 2 2 1 1  88 105 131
+176 2 2 1 1  106 76 100
+177 2 2 1 1  99 102 109
+178 2 2 1 1  94 93 110
+179 2 2 1 1  98 97 111
+180 2 2 1 1  110 93 106
+181 2 2 1 1  96 99 112
+182 2 2 1 1  108 94 110
+183 2 2 1 1  83 104 113
+184 2 2 1 1  99 109 112
+185 2 2 1 1  108 110 114
+186 2 2 1 1  106 100 115
+187 2 2 1 1  97 96 116
+188 2 2 1 1  104 103 117
+189 2 2 1 1  80 89 118
+190 2 2 1 1  116 96 112
+191 2 2 1 1  103 98 119
+192 2 2 1 1  117 103 119
+193 2 2 1 1  98 111 119
+194 2 2 1 1  95 78 118
+195 2 2 1 1  118 130 95
+196 2 2 1 1  118 89 120
+197 2 2 1 1  120 89 101
+198 2 2 1 1  97 116 111
+199 2 2 1 1  110 106 121
+200 2 2 1 1  295 170 294
+201 2 2 1 1  110 121 114
+202 2 2 1 1  294 315 295
+203 2 2 1 1  263 292 280
+204 2 2 1 1  79 77 113
+205 2 2 1 1  77 83 113
+206 2 2 1 1  121 106 115
+207 2 2 1 1  79 113 123
+208 2 2 1 1  79 123 102
+209 2 2 1 1  123 113 124
+210 2 2 1 1  102 123 109
+211 2 2 1 1  124 113 104
+212 2 2 1 1  111 116 125
+213 2 2 1 1  123 124 126
+214 2 2 1 1  104 117 124
+215 2 2 1 1  101 122 127
+216 2 2 1 1  263 280 279
+217 2 2 1 1  120 101 127
+218 2 2 1 1  121 115 128
+219 2 2 1 1  120 127 129
+220 2 2 1 1  129 139 130
+221 2 2 1 1  118 120 130
+222 2 2 1 1  107 108 131
+223 2 2 1 1  112 109 132
+224 2 2 1 1  116 112 133
+225 2 2 1 1  119 111 134
+226 2 2 1 1  111 125 134
+227 2 2 1 1  90 88 131
+228 2 2 1 1  112 132 133
+229 2 2 1 1  116 133 125
+230 2 2 1 1  290 288 287
+231 2 2 1 1  291 292 267
+232 2 2 1 1  114 121 135
+233 2 2 1 1  315 90 131
+234 2 2 1 1  135 121 128
+235 2 2 1 1  264 282 266
+236 2 2 1 1  108 315 131
+237 2 2 1 1  117 119 136
+238 2 2 1 1  109 123 137
+239 2 2 1 1  100 95 130
+240 2 2 1 1  137 123 126
+241 2 2 1 1  109 137 132
+242 2 2 1 1  120 129 130
+243 2 2 1 1  136 119 134
+244 2 2 1 1  137 126 138
+245 2 2 1 1  138 153 137
+246 2 2 1 1  100 130 139
+247 2 2 1 1  136 134 140
+248 2 2 1 1  117 142 124
+249 2 2 1 1  125 133 141
+250 2 2 1 1  100 139 115
+251 2 2 1 1  117 136 142
+252 2 2 1 1  142 136 143
+253 2 2 1 1  134 125 144
+254 2 2 1 1  140 134 144
+255 2 2 1 1  125 141 144
+256 2 2 1 1  143 136 140
+257 2 2 1 1  129 127 145
+258 2 2 1 1  114 135 146
+259 2 2 1 1  133 132 147
+260 2 2 1 1  129 145 148
+261 2 2 1 1  122 166 127
+262 2 2 2 2  8 7 300
+263 2 2 1 1  129 148 139
+264 2 2 1 1  133 147 141
+265 2 2 1 1  128 115 149
+266 2 2 1 1  115 139 149
+267 2 2 2 2  6 5 300
+268 2 2 1 1  139 148 149
+269 2 2 1 1  311 285 316
+270 2 2 2 2  300 301 8
+271 2 2 1 1  141 147 151
+272 2 2 1 1  142 143 152
+273 2 2 1 1  147 132 153
+274 2 2 1 1  144 141 154
+275 2 2 1 1  141 151 154
+276 2 2 1 1  132 137 153
+277 2 2 1 1  153 138 155
+278 2 2 1 1  155 138 152
+279 2 2 1 1  153 155 156
+280 2 2 1 1  153 156 147
+281 2 2 2 2  10 9 301
+282 2 2 1 1  146 135 305
+283 2 2 1 1  143 140 157
+284 2 2 1 1  170 150 294
+285 2 2 1 1  126 124 142
+286 2 2 1 1  126 142 152
+287 2 2 1 1  126 152 138
+288 2 2 1 1  128 163 135
+289 2 2 1 1  140 144 158
+290 2 2 1 1  159 175 145
+291 2 2 1 1  128 149 160
+292 2 2 1 1  158 144 154
+293 2 2 1 1  160 149 148
+294 2 2 1 1  140 158 157
+295 2 2 1 1  143 157 161
+296 2 2 1 1  156 198 147
+297 2 2 1 1  161 157 162
+298 2 2 1 1  145 127 166
+299 2 2 1 1  128 160 163
+300 2 2 1 1  155 152 164
+301 2 2 2 2  298 10 301
+302 2 2 1 1  159 145 166
+303 2 2 1 1  166 122 150
+304 2 2 2 2  9 8 301
+305 2 2 1 1  164 152 161
+306 2 2 1 1  161 152 143
+307 2 2 1 1  166 150 168
+308 2 2 1 1  166 168 169
+309 2 2 1 1  166 169 159
+310 2 2 1 1  168 150 170
+311 2 2 2 2  298 301 299
+312 2 2 1 1  168 170 171
+313 2 2 1 1  168 171 172
+314 2 2 1 1  168 172 169
+315 2 2 1 1  283 280 293
+316 2 2 1 1  266 276 296
+317 2 2 1 1  171 146 165
+318 2 2 1 1  171 165 172
+319 2 2 1 1  169 172 173
+320 2 2 1 1  169 173 174
+321 2 2 1 1  148 145 175
+322 2 2 1 1  148 175 176
+323 2 2 1 1  160 148 176
+324 2 2 1 1  293 280 292
+325 2 2 1 1  169 174 177
+326 2 2 1 1  176 175 178
+327 2 2 1 1  314 310 309
+328 2 2 1 1  266 296 269
+329 2 2 1 1  178 197 176
+330 2 2 1 1  269 296 233
+331 2 2 1 1  157 158 179
+332 2 2 1 1  175 159 180
+333 2 2 1 1  180 159 177
+334 2 2 1 1  175 180 181
+335 2 2 1 1  175 181 178
+336 2 2 1 1  181 180 182
+337 2 2 1 1  182 180 177
+338 2 2 1 1  182 177 174
+339 2 2 1 1  157 179 162
+340 2 2 1 1  177 159 169
+341 2 2 1 1  179 158 183
+342 2 2 1 1  158 154 183
+343 2 2 1 1  154 151 184
+344 2 2 1 1  173 203 174
+345 2 2 1 1  161 162 164
+346 2 2 1 1  250 249 296
+347 2 2 1 1  178 181 186
+348 2 2 1 1  174 185 182
+349 2 2 1 1  182 207 181
+350 2 2 1 1  154 184 183
+351 2 2 1 1  156 155 187
+352 2 2 1 1  184 151 188
+353 2 2 1 1  187 155 164
+354 2 2 1 1  187 164 189
+355 2 2 1 1  165 167 190
+356 2 2 1 1  165 190 172
+357 2 2 1 1  172 190 173
+358 2 2 1 1  281 263 279
+359 2 2 1 1  162 179 192
+360 2 2 1 1  164 162 189
+361 2 2 1 1  287 278 282
+362 2 2 1 1  271 289 297
+363 2 2 1 1  156 187 194
+364 2 2 1 1  189 212 187
+365 2 2 1 1  195 202 191
+366 2 2 1 1  188 198 194
+367 2 2 1 1  190 167 196
+368 2 2 1 1  279 277 281
+369 2 2 1 1  178 186 197
+370 2 2 1 1  151 147 198
+371 2 2 1 1  190 196 173
+372 2 2 2 2  300 299 301
+373 2 2 1 1  199 197 200
+374 2 2 3 3  12 11 302
+375 2 2 1 1  193 199 201
+376 2 2 1 1  193 201 191
+377 2 2 1 1  200 214 199
+378 2 2 1 1  191 201 195
+379 2 2 1 1  186 247 197
+380 2 2 1 1  167 191 202
+381 2 2 1 1  167 202 196
+382 2 2 1 1  287 282 290
+383 2 2 1 1  185 174 203
+384 2 2 1 1  203 173 196
+385 2 2 1 1  183 184 204
+386 2 2 1 1  179 183 205
+387 2 2 1 1  183 204 205
+388 2 2 1 1  179 205 192
+389 2 2 1 1  205 204 206
+390 2 2 1 1  188 151 198
+391 2 2 1 1  186 181 207
+392 2 2 1 1  207 182 185
+393 2 2 1 1  186 207 208
+394 2 2 1 1  207 185 209
+395 2 2 1 1  207 209 208
+396 2 2 1 1  206 230 205
+397 2 2 1 1  184 188 210
+398 2 2 1 1  184 210 204
+399 2 2 1 1  210 188 211
+400 2 2 1 1  212 211 194
+401 2 2 1 1  156 194 198
+402 2 2 1 1  196 202 213
+403 2 2 1 1  195 201 214
+404 2 2 1 1  162 192 215
+405 2 2 1 1  202 195 216
+406 2 2 1 1  188 194 211
+407 2 2 1 1  201 199 214
+408 2 2 1 1  196 213 203
+409 2 2 1 1  194 187 212
+410 2 2 1 1  203 213 217
+411 2 2 1 1  195 214 216
+412 2 2 1 1  217 225 203
+413 2 2 1 1  202 216 213
+414 2 2 1 1  217 213 218
+415 2 2 1 1  218 213 216
+416 2 2 1 1  211 212 219
+417 2 2 1 1  219 212 220
+418 2 2 1 1  211 219 221
+419 2 2 1 1  212 189 220
+420 2 2 1 1  208 247 186
+421 2 2 1 1  211 221 210
+422 2 2 1 1  210 221 222
+423 2 2 1 1  204 210 222
+424 2 2 1 1  204 222 206
+425 2 2 1 1  221 219 223
+426 2 2 1 1  269 233 242
+427 2 2 1 1  220 189 224
+428 2 2 1 1  259 268 293
+429 2 2 1 1  209 185 225
+430 2 2 1 1  307 295 315
+431 2 2 1 1  185 203 225
+432 2 2 1 1  220 224 226
+433 2 2 1 1  220 226 227
+434 2 2 1 1  220 227 219
+435 2 2 1 1  227 244 219
+436 2 2 1 1  289 290 297
+437 2 2 1 1  215 234 224
+438 2 2 1 1  310 297 309
+439 2 2 1 1  214 200 228
+440 2 2 1 1  215 192 229
+441 2 2 1 1  229 192 230
+442 2 2 1 1  192 205 230
+443 2 2 1 1  230 316 229
+444 2 2 1 1  286 316 285
+445 2 2 1 1  232 225 217
+446 2 2 1 1  209 225 233
+447 2 2 1 1  233 249 209
+448 2 2 1 1  214 228 216
+449 2 2 1 1  215 229 234
+450 2 2 1 1  218 216 235
+451 2 2 1 1  225 232 233
+452 2 2 1 1  235 216 228
+453 2 2 1 1  234 229 231
+454 2 2 1 1  218 235 236
+455 2 2 1 1  226 224 234
+456 2 2 1 1  232 217 237
+457 2 2 1 1  217 218 237
+458 2 2 1 1  237 218 238
+459 2 2 1 1  238 218 236
+460 2 2 1 1  234 231 226
+461 2 2 1 1  232 237 239
+462 2 2 1 1  282 264 290
+463 2 2 1 1  237 238 239
+464 2 2 1 1  235 228 240
+465 2 2 1 1  240 254 235
+466 2 2 3 3  13 12 302
+467 2 2 1 1  227 226 241
+468 2 2 1 1  226 231 241
+469 2 2 1 1  232 239 242
+470 2 2 3 3  14 13 303
+471 2 2 1 1  232 242 233
+472 2 2 1 1  227 241 243
+473 2 2 1 1  223 219 244
+474 2 2 1 1  240 228 245
+475 2 2 1 1  227 243 244
+476 2 2 1 1  245 228 200
+477 2 2 1 1  240 245 246
+478 2 2 1 1  286 231 316
+479 2 2 1 1  230 311 316
+480 2 2 1 1  208 248 247
+481 2 2 1 1  245 247 248
+482 2 2 1 1  248 208 249
+483 2 2 1 1  245 248 246
+484 2 2 1 1  208 209 249
+485 2 2 1 1  248 249 250
+486 2 2 1 1  233 296 249
+487 2 2 1 1  248 250 246
+488 2 2 1 1  245 200 247
+489 2 2 1 1  243 241 251
+490 2 2 1 1  231 229 316
+491 2 2 1 1  162 215 224
+492 2 2 1 1  223 244 252
+493 2 2 1 1  294 90 315
+494 2 2 1 1  252 270 223
+495 2 2 1 1  224 189 162
+496 2 2 3 3  15 14 303
+497 2 2 1 1  200 197 247
+498 2 2 1 1  244 243 253
+499 2 2 3 3  13 302 303
+500 2 2 1 1  236 235 254
+501 2 2 1 1  253 243 255
+502 2 2 1 1  243 251 255
+503 2 2 1 1  244 253 252
+504 2 2 1 1  254 240 246
+505 2 2 3 3  16 15 303
+506 2 2 1 1  253 255 256
+507 2 2 1 1  242 239 257
+508 2 2 1 1  295 171 170
+509 2 2 1 1  257 239 258
+510 2 2 1 1  258 239 238
+511 2 2 3 3  11 20 302
+512 2 2 1 1  258 238 259
+513 2 2 3 3  17 16 304
+514 2 2 1 1  253 256 261
+515 2 2 1 1  257 260 262
+516 2 2 1 1  261 256 263
+517 2 2 1 1  257 262 242
+518 2 2 1 1  262 260 264
+519 2 2 1 1  264 260 265
+520 2 2 1 1  262 264 266
+521 2 2 3 3  18 17 304
+522 2 2 1 1  256 255 267
+523 2 2 1 1  259 238 268
+524 2 2 1 1  255 251 267
+525 2 2 3 3  16 303 304
+526 2 2 3 3  19 18 304
+527 2 2 1 1  242 262 269
+528 2 2 3 3  20 19 302
+529 2 2 1 1  262 266 269
+530 2 2 1 1  238 236 268
+531 2 2 3 3  19 304 302
+532 2 2 1 1  291 267 314
+533 2 2 1 1  258 314 309
+534 2 2 1 1  236 254 268
+535 2 2 3 3  303 302 304
+536 2 2 2 2  2 1 298
+537 2 2 1 1  252 253 261
+538 2 2 1 1  254 246 273
+539 2 2 1 1  254 273 268
+540 2 2 1 1  252 261 274
+541 2 2 1 1  270 252 274
+542 2 2 1 1  261 263 274
+543 2 2 1 1  250 275 246
+544 2 2 1 1  273 246 275
+545 2 2 1 1  275 250 276
+546 2 2 1 1  275 276 277
+547 2 2 1 1  276 250 296
+548 2 2 1 1  270 274 278
+549 2 2 1 1  275 277 279
+550 2 2 1 1  273 293 268
+551 2 2 1 1  206 311 230
+552 2 2 1 1  270 278 272
+553 2 2 1 1  280 283 279
+554 2 2 1 1  278 274 281
+555 2 2 1 1  281 274 263
+556 2 2 1 1  276 266 277
+557 2 2 2 2  3 2 298
+558 2 2 2 2  4 3 299
+559 2 2 1 1  278 281 282
+560 2 2 1 1  273 275 283
+561 2 2 1 1  283 293 273
+562 2 2 1 1  275 279 283
+563 2 2 1 1  278 287 272
+564 2 2 2 2  5 4 299
+565 2 2 2 2  3 298 299
+566 2 2 2 2  299 300 5
+567 2 2 1 1  284 272 287
+568 2 2 1 1  285 284 288
+569 2 2 1 1  284 287 288
+570 2 2 1 1  285 288 289
+571 2 2 1 1  285 289 286
+572 2 2 1 1  286 289 271
+573 2 2 2 2  1 10 298
+574 2 2 1 1  289 288 290
+575 2 2 1 1  277 266 282
+576 2 2 1 1  265 290 264
+577 2 2 2 2  7 6 300
+578 2 2 1 1  263 256 292
+579 2 2 1 1  256 267 292
+580 2 2 1 1  291 259 293
+581 2 2 1 1  101 86 122
+582 2 2 1 1  150 122 294
+583 2 2 1 1  135 163 193
+584 2 2 1 1  167 165 305
+585 2 2 1 1  191 167 305
+586 2 2 1 1  165 146 305
+587 2 2 1 1  176 197 306
+588 2 2 1 1  160 176 306
+589 2 2 1 1  197 199 306
+590 2 2 1 1  199 193 306
+591 2 2 1 1  193 163 306
+592 2 2 1 1  86 90 294
+593 2 2 1 1  108 114 307
+594 2 2 1 1  114 146 307
+595 2 2 1 1  294 122 86
+596 2 2 1 1  108 307 315
+597 2 2 1 1  307 146 171
+598 2 2 1 1  259 314 258
+599 2 2 1 1  160 306 163
+600 2 2 1 1  222 221 308
+601 2 2 1 1  221 223 308
+602 2 2 1 1  223 270 308
+603 2 2 1 1  257 258 309
+604 2 2 1 1  267 251 310
+605 2 2 1 1  260 257 309
+606 2 2 1 1  290 265 297
+607 2 2 1 1  310 314 267
+608 2 2 1 1  271 297 310
+609 2 2 1 1  284 285 311
+610 2 2 1 1  193 305 135
+611 2 2 1 1  308 270 272
+612 2 2 1 1  311 312 284
+613 2 2 1 1  312 311 206
+614 2 2 1 1  307 171 295
+615 2 2 1 1  222 308 312
+616 2 2 1 1  206 222 312
+617 2 2 1 1  297 265 309
+618 2 2 1 1  310 251 313
+619 2 2 1 1  241 231 313
+620 2 2 1 1  251 241 313
+621 2 2 1 1  271 310 313
+622 2 2 1 1  260 309 265
+623 2 2 1 1  312 308 272
+624 2 2 1 1  259 291 314
+625 2 2 1 1  272 284 312
+626 2 2 1 1  191 305 193
+627 2 2 1 1  271 313 286
+628 2 2 1 1  313 231 286
+629 4 2 100001 100001  321 381 366 200
+630 4 2 100001 100001  341 103 328 104
+631 4 2 100001 100001  38 14 15 303
+632 4 2 100001 100001  67 346 387 353
+633 4 2 100001 100001  328 97 360 323
+634 4 2 100001 100001  14 27 13 303
+635 4 2 100001 100001  33 22 4 299
+636 4 2 100001 100001  69 324 41 50
+637 4 2 100001 100001  373 336 196 203
+638 4 2 100001 100001  136 322 117 119
+639 4 2 100001 100001  317 86 90 66
+640 4 2 100001 100001  319 145 129 334
+641 4 2 100001 100001  341 103 104 322
+642 4 2 100001 100001  108 114 307 318
+643 4 2 100001 100001  234 345 226 224
+644 4 2 100001 100001  366 381 321 336
+645 4 2 100001 100001  134 325 342 125
+646 4 2 100001 100001  166 358 319 327
+647 4 2 100001 100001  352 371 317 362
+648 4 2 100001 100001  284 320 288 285
+649 4 2 100001 100001  318 127 129 319
+650 4 2 100001 100001  234 345 224 215
+651 4 2 100001 100001  319 295 171 307
+652 4 2 100001 100001  328 59 82 75
+653 4 2 100001 100001  345 370 220 361
+654 4 2 100001 100001  318 93 76 317
+655 4 2 100001 100001  125 144 325 141
+656 4 2 100001 100001  347 151 154 184
+657 4 2 100001 100001  221 361 219 370
+658 4 2 100001 100001  321 366 336 216
+659 4 2 100001 100001  329 256 267 320
+660 4 2 100001 100001  342 119 332 134
+661 4 2 100001 100001  363 297 310 309
+662 4 2 100001 100001  320 287 272 284
+663 4 2 100001 100001  330 361 386 222
+664 4 2 100001 100001  277 275 331 279
+665 4 2 100001 100001  350 279 283 364
+666 4 2 100001 100001  179 337 375 162
+667 4 2 100001 100001  365 377 301 299
+668 4 2 100001 100001  227 351 226 241
+669 4 2 100001 100001  280 364 283 279
+670 4 2 100001 100001  156 155 325 153
+671 4 2 100001 100001  306 197 199 367
+672 4 2 100001 100001  362 365 81 91
+673 4 2 100001 100001  381 178 181 367
+674 4 2 100001 100001  321 366 216 228
+675 4 2 100001 100001  381 178 367 197
+676 4 2 100001 100001  387 369 353 72
+677 4 2 100001 100001  240 245 246 321
+678 4 2 100001 100001  40 333 304 30
+679 4 2 100001 100001  163 382 135 334
+680 4 2 100001 100001  111 134 342 125
+681 4 2 100001 100001  321 366 228 200
+682 4 2 100001 100001  388 373 367 366
+683 4 2 100001 100001  344 252 320 253
+684 4 2 100001 100001  190 373 196 173
+685 4 2 100001 100001  373 203 196 173
+686 4 2 100001 100001  39 353 50 41
+687 4 2 100001 100001  279 263 329 354
+688 4 2 100001 100001  123 385 137 109
+689 4 2 100001 100001  177 182 180 373
+690 4 2 100001 100001  330 361 222 221
+691 4 2 100001 100001  115 128 319 149
+692 4 2 100001 100001  303 333 39 38
+693 4 2 100001 100001  67 346 353 71
+694 4 2 100001 100001  328 97 323 75
+695 4 2 100001 100001  356 276 266 296
+696 4 2 100001 100001  309 258 376 257
+697 4 2 100001 100001  320 289 288 285
+698 4 2 100001 100001  325 342 332 134
+699 4 2 100001 100001  320 270 274 252
+700 4 2 100001 100001  226 370 345 351
+701 4 2 100001 100001  146 165 171 319
+702 4 2 100001 100001  373 380 169 372
+703 4 2 100001 100001  176 306 160 334
+704 4 2 100001 100001  361 370 330 345
+705 4 2 100001 100001  324 64 58 43
+706 4 2 100001 100001  373 372 169 173
+707 4 2 100001 100001  183 337 375 179
+708 4 2 100001 100001  150 122 294 319
+709 4 2 100001 100001  324 323 64 387
+710 4 2 100001 100001  67 346 71 85
+711 4 2 100001 100001  183 337 179 158
+712 4 2 100001 100001  387 75 328 323
+713 4 2 100001 100001  356 276 331 266
+714 4 2 100001 100001  71 346 79 85
+715 4 2 100001 100001  366 216 228 214
+716 4 2 100001 100001  366 228 200 214
+717 4 2 100001 100001  264 354 355 390
+718 4 2 100001 100001  321 247 248 208
+719 4 2 100001 100001  335 232 321 233
+720 4 2 100001 100001  16 15 303 39
+721 4 2 100001 100001  204 347 183 184
+722 4 2 100001 100001  304 16 303 39
+723 4 2 100001 100001  24 36 377 47
+724 4 2 100001 100001  278 354 282 320
+725 4 2 100001 100001  278 320 272 270
+726 4 2 100001 100001  287 320 278 282
+727 4 2 100001 100001  382 165 372 190
+728 4 2 100001 100001  366 213 336 216
+729 4 2 100001 100001  366 373 381 336
+730 4 2 100001 100001  24 377 36 301
+731 4 2 100001 100001  326 238 268 383
+732 4 2 100001 100001  366 191 202 195
+733 4 2 100001 100001  363 297 309 265
+734 4 2 100001 100001  329 256 320 354
+735 4 2 100001 100001  78 80 118 317
+736 4 2 100001 100001  306 199 388 367
+737 4 2 100001 100001  175 176 382 367
+738 4 2 100001 100001  373 372 173 190
+739 4 2 100001 100001  379 330 312 308
+740 4 2 100001 100001  320 264 363 329
+741 4 2 100001 100001  265 363 260 309
+742 4 2 100001 100001  353 346 72 46
+743 4 2 100001 100001  67 69 323 74
+744 4 2 100001 100001  192 229 215 368
+745 4 2 100001 100001  329 354 320 264
+746 4 2 100001 100001  391 373 380 180
+747 4 2 100001 100001  84 328 104 359
+748 4 2 100001 100001  388 382 306 367
+749 4 2 100001 100001  325 132 147 153
+750 4 2 100001 100001  353 71 42 67
+751 4 2 100001 100001  377 352 47 362
+752 4 2 100001 100001  94 318 108 317
+753 4 2 100001 100001  369 333 302 43
+754 4 2 100001 100001  388 305 382 167
+755 4 2 100001 100001  27 302 13 303
+756 4 2 100001 100001  330 223 379 370
+757 4 2 100001 100001  204 347 375 183
+758 4 2 100001 100001  249 209 321 208
+759 4 2 100001 100001  388 373 366 167
+760 4 2 100001 100001  58 69 87 323
+761 4 2 100001 100001  377 352 301 24
+762 4 2 100001 100001  369 27 302 37
+763 4 2 100001 100001  377 352 24 47
+764 4 2 100001 100001  182 181 180 367
+765 4 2 100001 100001  67 346 85 387
+766 4 2 100001 100001  247 381 321 200
+767 4 2 100001 100001  346 77 72 46
+768 4 2 100001 100001  366 213 216 202
+769 4 2 100001 100001  56 369 31 28
+770 4 2 100001 100001  385 322 126 332
+771 4 2 100001 100001  350 329 364 376
+772 4 2 100001 100001  350 257 260 376
+773 4 2 100001 100001  302 20 31 28
+774 4 2 100001 100001  342 322 360 385
+775 4 2 100001 100001  363 290 320 297
+776 4 2 100001 100001  310 267 329 314
+777 4 2 100001 100001  310 329 267 320
+778 4 2 100001 100001  12 302 13 37
+779 4 2 100001 100001  363 297 320 310
+780 4 2 100001 100001  385 322 123 126
+781 4 2 100001 100001  310 329 363 314
+782 4 2 100001 100001  320 313 271 286
+783 4 2 100001 100001  342 322 385 332
+784 4 2 100001 100001  301 352 377 365
+785 4 2 100001 100001  310 363 329 320
+786 4 2 100001 100001  260 363 265 264
+787 4 2 100001 100001  304 29 333 40
+788 4 2 100001 100001  323 97 73 75
+789 4 2 100001 100001  347 357 337 343
+790 4 2 100001 100001  300 377 299 301
+791 4 2 100001 100001  23 54 352 53
+792 4 2 100001 100001  22 33 365 299
+793 4 2 100001 100001  344 252 379 320
+794 4 2 100001 100001  269 356 262 266
+795 4 2 100001 100001  47 48 338 63
+796 4 2 100001 100001  387 374 369 72
+797 4 2 100001 100001  23 352 25 301
+798 4 2 100001 100001  371 362 365 81
+799 4 2 100001 100001  374 378 72 387
+800 4 2 100001 100001  23 352 365 53
+801 4 2 100001 100001  254 273 268 321
+802 4 2 100001 100001  298 3 2 32
+803 4 2 100001 100001  276 339 250 296
+804 4 2 100001 100001  349 364 376 350
+805 4 2 100001 100001  79 387 359 328
+806 4 2 100001 100001  155 357 187 156
+807 4 2 100001 100001  181 207 381 182
+808 4 2 100001 100001  52 387 60 374
+809 4 2 100001 100001  352 362 338 47
+810 4 2 100001 100001  223 221 219 370
+811 4 2 100001 100001  158 337 179 157
+812 4 2 100001 100001  60 387 52 59
+813 4 2 100001 100001  387 75 323 64
+814 4 2 100001 100001  152 126 142 332
+815 4 2 100001 100001  359 104 84 83
+816 4 2 100001 100001  21 371 51 53
+817 4 2 100001 100001  328 60 378 84
+818 4 2 100001 100001  318 131 108 317
+819 4 2 100001 100001  89 318 118 317
+820 4 2 100001 100001  315 295 294 318
+821 4 2 100001 100001  328 60 84 82
+822 4 2 100001 100001  387 59 64 49
+823 4 2 100001 100001  295 315 307 318
+824 4 2 100001 100001  375 205 204 183
+825 4 2 100001 100001  259 376 349 291
+826 4 2 100001 100001  113 77 359 79
+827 4 2 100001 100001  334 145 175 159
+828 4 2 100001 100001  73 323 58 87
+829 4 2 100001 100001  67 323 85 74
+830 4 2 100001 100001  40 353 333 46
+831 4 2 100001 100001  31 333 62 30
+832 4 2 100001 100001  21 371 32 51
+833 4 2 100001 100001  330 370 361 221
+834 4 2 100001 100001  23 365 352 301
+835 4 2 100001 100001  317 95 70 76
+836 4 2 100001 100001  366 388 199 367
+837 4 2 100001 100001  20 302 11 28
+838 4 2 100001 100001  300 34 35 6
+839 4 2 100001 100001  306 163 160 334
+840 4 2 100001 100001  388 373 167 382
+841 4 2 100001 100001  366 213 202 196
+842 4 2 100001 100001  88 45 81 340
+843 4 2 100001 100001  9 24 8 301
+844 4 2 100001 100001  362 317 352 338
+845 4 2 100001 100001  80 371 317 352
+846 4 2 100001 100001  371 340 362 81
+847 4 2 100001 100001  365 45 371 81
+848 4 2 100001 100001  24 36 8 301
+849 4 2 100001 100001  360 323 99 102
+850 4 2 100001 100001  61 371 53 51
+851 4 2 100001 100001  373 366 167 196
+852 4 2 100001 100001  360 323 96 99
+853 4 2 100001 100001  80 371 352 53
+854 4 2 100001 100001  113 77 83 359
+855 4 2 100001 100001  367 181 180 175
+856 4 2 100001 100001  362 47 48 338
+857 4 2 100001 100001  23 365 21 53
+858 4 2 100001 100001  201 191 366 195
+859 4 2 100001 100001  338 352 70 317
+860 4 2 100001 100001  247 381 200 197
+861 4 2 100001 100001  350 329 279 364
+862 4 2 100001 100001  25 23 301 10
+863 4 2 100001 100001  347 151 184 188
+864 4 2 100001 100001  232 225 217 321
+865 4 2 100001 100001  232 321 217 237
+866 4 2 100001 100001  344 252 244 379
+867 4 2 100001 100001  287 320 288 284
+868 4 2 100001 100001  341 103 322 360
+869 4 2 100001 100001  176 334 160 148
+870 4 2 100001 100001  304 31 19 30
+871 4 2 100001 100001  381 200 199 366
+872 4 2 100001 100001  76 318 317 95
+873 4 2 100001 100001  197 176 178 367
+874 4 2 100001 100001  106 110 318 121
+875 4 2 100001 100001  166 358 327 169
+876 4 2 100001 100001  365 23 298 301
+877 4 2 100001 100001  199 200 381 197
+878 4 2 100001 100001  347 151 188 198
+879 4 2 100001 100001  185 381 336 207
+880 4 2 100001 100001  176 334 148 175
+881 4 2 100001 100001  389 257 242 262
+882 4 2 100001 100001  72 378 346 387
+883 4 2 100001 100001  197 176 367 306
+884 4 2 100001 100001  330 223 308 379
+885 4 2 100001 100001  308 221 330 222
+886 4 2 100001 100001  330 223 221 308
+887 4 2 100001 100001  156 325 147 153
+888 4 2 100001 100001  325 343 141 144
+889 4 2 100001 100001  239 389 257 242
+890 4 2 100001 100001  123 385 109 360
+891 4 2 100001 100001  38 41 353 39
+892 4 2 100001 100001  325 385 137 332
+893 4 2 100001 100001  34 300 377 299
+894 4 2 100001 100001  315 90 318 294
+895 4 2 100001 100001  330 223 370 221
+896 4 2 100001 100001  155 357 152 164
+897 4 2 100001 100001  181 207 186 381
+898 4 2 100001 100001  282 355 277 266
+899 4 2 100001 100001  366 214 199 201
+900 4 2 100001 100001  343 140 325 384
+901 4 2 100001 100001  281 355 277 282
+902 4 2 100001 100001  295 319 294 318
+903 4 2 100001 100001  347 357 343 156
+904 4 2 100001 100001  342 322 332 119
+905 4 2 100001 100001  369 37 302 26
+906 4 2 100001 100001  366 213 196 336
+907 4 2 100001 100001  166 319 145 127
+908 4 2 100001 100001  384 158 343 140
+909 4 2 100001 100001  379 272 284 320
+910 4 2 100001 100001  353 369 62 72
+911 4 2 100001 100001  331 276 277 266
+912 4 2 100001 100001  389 242 269 262
+913 4 2 100001 100001  56 374 369 55
+914 4 2 100001 100001  369 37 26 52
+915 4 2 100001 100001  52 369 55 26
+916 4 2 100001 100001  170 295 171 319
+917 4 2 100001 100001  389 269 242 335
+918 4 2 100001 100001  369 333 31 302
+919 4 2 100001 100001  325 385 332 342
+920 4 2 100001 100001  146 319 114 135
+921 4 2 100001 100001  325 357 343 384
+922 4 2 100001 100001  388 199 306 193
+923 4 2 100001 100001  40 353 46 42
+924 4 2 100001 100001  389 269 356 262
+925 4 2 100001 100001  289 320 271 286
+926 4 2 100001 100001  360 103 322 119
+927 4 2 100001 100001  336 218 321 216
+928 4 2 100001 100001  147 343 198 151
+929 4 2 100001 100001  208 336 209 321
+930 4 2 100001 100001  259 376 291 314
+931 4 2 100001 100001  132 385 112 109
+932 4 2 100001 100001  325 357 384 152
+933 4 2 100001 100001  387 323 328 79
+934 4 2 100001 100001  268 349 350 273
+935 4 2 100001 100001  208 336 321 381
+936 4 2 100001 100001  279 350 275 331
+937 4 2 100001 100001  269 356 266 296
+938 4 2 100001 100001  365 45 81 22
+939 4 2 100001 100001  289 320 286 285
+940 4 2 100001 100001  56 62 31 369
+941 4 2 100001 100001  23 298 301 10
+942 4 2 100001 100001  384 337 357 343
+943 4 2 100001 100001  208 381 186 207
+944 4 2 100001 100001  361 375 212 348
+945 4 2 100001 100001  389 356 269 335
+946 4 2 100001 100001  79 360 102 323
+947 4 2 100001 100001  275 350 279 283
+948 4 2 100001 100001  350 257 383 389
+949 4 2 100001 100001  275 276 277 331
+950 4 2 100001 100001  2 298 21 1
+951 4 2 100001 100001  384 158 140 157
+952 4 2 100001 100001  379 285 320 284
+953 4 2 100001 100001  384 158 157 337
+954 4 2 100001 100001  309 260 376 363
+955 4 2 100001 100001  379 272 312 284
+956 4 2 100001 100001  283 273 350 349
+957 4 2 100001 100001  347 151 198 343
+958 4 2 100001 100001  216 366 202 195
+959 4 2 100001 100001  361 210 222 221
+960 4 2 100001 100001  313 344 241 231
+961 4 2 100001 100001  76 318 95 100
+962 4 2 100001 100001  12 302 26 11
+963 4 2 100001 100001  256 320 261 253
+964 4 2 100001 100001  335 237 239 383
+965 4 2 100001 100001  72 378 83 346
+966 4 2 100001 100001  190 373 167 196
+967 4 2 100001 100001  383 339 350 335
+968 4 2 100001 100001  55 28 369 56
+969 4 2 100001 100001  329 263 256 354
+970 4 2 100001 100001  349 291 293 259
+971 4 2 100001 100001  331 339 276 356
+972 4 2 100001 100001  349 364 291 376
+973 4 2 100001 100001  340 91 105 92
+974 4 2 100001 100001  345 368 229 230
+975 4 2 100001 100001  345 220 226 224
+976 4 2 100001 100001  343 347 156 198
+977 4 2 100001 100001  80 89 317 61
+978 4 2 100001 100001  89 86 317 61
+979 4 2 100001 100001  344 251 241 243
+980 4 2 100001 100001  350 383 258 326
+981 4 2 100001 100001  317 86 66 61
+982 4 2 100001 100001  264 320 290 282
+983 4 2 100001 100001  377 300 34 35
+984 4 2 100001 100001  62 353 72 46
+985 4 2 100001 100001  350 383 335 389
+986 4 2 100001 100001  386 375 348 368
+987 4 2 100001 100001  345 348 215 368
+988 4 2 100001 100001  350 383 326 268
+989 4 2 100001 100001  31 333 30 304
+990 4 2 100001 100001  320 267 310 251
+991 4 2 100001 100001  239 389 383 257
+992 4 2 100001 100001  318 127 319 122
+993 4 2 100001 100001  324 323 387 67
+994 4 2 100001 100001  38 353 333 39
+995 4 2 100001 100001  132 137 385 109
+996 4 2 100001 100001  150 170 319 294
+997 4 2 100001 100001  374 378 387 60
+998 4 2 100001 100001  387 323 79 85
+999 4 2 100001 100001  219 244 370 227
+1000 4 2 100001 100001  328 60 387 378
+1001 4 2 100001 100001  332 385 137 126
+1002 4 2 100001 100001  286 344 320 313
+1003 4 2 100001 100001  174 203 373 173
+1004 4 2 100001 100001  319 121 318 114
+1005 4 2 100001 100001  32 371 45 51
+1006 4 2 100001 100001  370 244 219 223
+1007 4 2 100001 100001  361 348 345 386
+1008 4 2 100001 100001  336 218 216 213
+1009 4 2 100001 100001  300 377 301 36
+1010 4 2 100001 100001  325 385 342 132
+1011 4 2 100001 100001  121 110 318 114
+1012 4 2 100001 100001  139 318 129 319
+1013 4 2 100001 100001  360 103 119 98
+1014 4 2 100001 100001  324 323 67 69
+1015 4 2 100001 100001  129 127 318 120
+1016 4 2 100001 100001  108 317 107 94
+1017 4 2 100001 100001  104 328 84 103
+1018 4 2 100001 100001  100 139 318 130
+1019 4 2 100001 100001  115 121 318 319
+1020 4 2 100001 100001  318 131 317 90
+1021 4 2 100001 100001  115 106 318 121
+1022 4 2 100001 100001  185 381 207 182
+1023 4 2 100001 100001  136 322 119 332
+1024 4 2 100001 100001  177 182 373 174
+1025 4 2 100001 100001  369 27 37 49
+1026 4 2 100001 100001  375 386 205 368
+1027 4 2 100001 100001  115 100 318 106
+1028 4 2 100001 100001  122 319 318 294
+1029 4 2 100001 100001  139 115 318 319
+1030 4 2 100001 100001  183 343 347 337
+1031 4 2 100001 100001  387 52 59 49
+1032 4 2 100001 100001  87 69 74 323
+1033 4 2 100001 100001  345 348 361 220
+1034 4 2 100001 100001  345 368 230 386
+1035 4 2 100001 100001  329 279 364 280
+1036 4 2 100001 100001  336 218 213 217
+1037 4 2 100001 100001  261 320 274 252
+1038 4 2 100001 100001  353 369 387 43
+1039 4 2 100001 100001  141 343 151 154
+1040 4 2 100001 100001  385 322 360 123
+1041 4 2 100001 100001  348 345 386 368
+1042 4 2 100001 100001  175 176 367 178
+1043 4 2 100001 100001  145 358 334 319
+1044 4 2 100001 100001  281 355 282 354
+1045 4 2 100001 100001  155 357 164 187
+1046 4 2 100001 100001  9 25 301 10
+1047 4 2 100001 100001  325 147 343 156
+1048 4 2 100001 100001  100 115 318 139
+1049 4 2 100001 100001  298 23 21 1
+1050 4 2 100001 100001  133 132 147 325
+1051 4 2 100001 100001  387 43 324 353
+1052 4 2 100001 100001  152 126 332 138
+1053 4 2 100001 100001  292 364 291 293
+1054 4 2 100001 100001  278 354 320 274
+1055 4 2 100001 100001  62 333 353 46
+1056 4 2 100001 100001  345 230 229 316
+1057 4 2 100001 100001  320 278 274 270
+1058 4 2 100001 100001  23 298 10 1
+1059 4 2 100001 100001  80 352 317 78
+1060 4 2 100001 100001  344 251 255 320
+1061 4 2 100001 100001  335 350 389 356
+1062 4 2 100001 100001  361 219 212 211
+1063 4 2 100001 100001  43 387 64 49
+1064 4 2 100001 100001  329 263 279 280
+1065 4 2 100001 100001  157 161 337 162
+1066 4 2 100001 100001  145 148 129 334
+1067 4 2 100001 100001  373 380 177 169
+1068 4 2 100001 100001  25 352 23 54
+1069 4 2 100001 100001  286 344 313 231
+1070 4 2 100001 100001  264 282 355 354
+1071 4 2 100001 100001  335 232 233 242
+1072 4 2 100001 100001  328 97 75 98
+1073 4 2 100001 100001  318 127 122 101
+1074 4 2 100001 100001  287 320 272 278
+1075 4 2 100001 100001  334 145 148 175
+1076 4 2 100001 100001  192 229 368 230
+1077 4 2 100001 100001  372 169 173 172
+1078 4 2 100001 100001  345 230 311 386
+1079 4 2 100001 100001  358 169 372 327
+1080 4 2 100001 100001  345 348 224 215
+1081 4 2 100001 100001  166 358 169 159
+1082 4 2 100001 100001  388 366 201 191
+1083 4 2 100001 100001  240 245 321 228
+1084 4 2 100001 100001  240 254 235 321
+1085 4 2 100001 100001  201 388 191 193
+1086 4 2 100001 100001  388 199 193 201
+1087 4 2 100001 100001  183 337 347 375
+1088 4 2 100001 100001  254 236 235 321
+1089 4 2 100001 100001  384 152 161 143
+1090 4 2 100001 100001  347 189 375 337
+1091 4 2 100001 100001  5 34 33 299
+1092 4 2 100001 100001  236 218 235 321
+1093 4 2 100001 100001  43 302 27 38
+1094 4 2 100001 100001  218 216 235 321
+1095 4 2 100001 100001  328 82 103 98
+1096 4 2 100001 100001  338 362 92 65
+1097 4 2 100001 100001  347 357 187 337
+1098 4 2 100001 100001  341 359 328 79
+1099 4 2 100001 100001  361 221 219 211
+1100 4 2 100001 100001  42 71 353 46
+1101 4 2 100001 100001  349 364 293 291
+1102 4 2 100001 100001  298 23 365 21
+1103 4 2 100001 100001  372 173 190 172
+1104 4 2 100001 100001  326 268 349 350
+1105 4 2 100001 100001  273 254 246 321
+1106 4 2 100001 100001  254 240 246 321
+1107 4 2 100001 100001  302 20 19 31
+1108 4 2 100001 100001  183 343 337 158
+1109 4 2 100001 100001  258 383 238 326
+1110 4 2 100001 100001  239 389 242 335
+1111 4 2 100001 100001  349 268 326 259
+1112 4 2 100001 100001  372 190 165 172
+1113 4 2 100001 100001  367 382 175 180
+1114 4 2 100001 100001  353 71 346 46
+1115 4 2 100001 100001  338 92 362 317
+1116 4 2 100001 100001  369 387 43 49
+1117 4 2 100001 100001  382 193 135 305
+1118 4 2 100001 100001  362 92 91 340
+1119 4 2 100001 100001  347 188 211 194
+1120 4 2 100001 100001  85 102 323 79
+1121 4 2 100001 100001  313 320 310 251
+1122 4 2 100001 100001  304 302 19 31
+1123 4 2 100001 100001  227 220 370 219
+1124 4 2 100001 100001  365 371 32 21
+1125 4 2 100001 100001  338 92 94 65
+1126 4 2 100001 100001  365 45 22 32
+1127 4 2 100001 100001  79 387 85 346
+1128 4 2 100001 100001  328 323 360 79
+1129 4 2 100001 100001  328 75 82 98
+1130 4 2 100001 100001  365 45 32 371
+1131 4 2 100001 100001  391 380 373 372
+1132 4 2 100001 100001  322 104 117 103
+1133 4 2 100001 100001  249 335 321 233
+1134 4 2 100001 100001  271 320 310 313
+1135 4 2 100001 100001  338 94 92 317
+1136 4 2 100001 100001  22 365 32 299
+1137 4 2 100001 100001  353 369 43 333
+1138 4 2 100001 100001  267 320 255 251
+1139 4 2 100001 100001  300 34 5 299
+1140 4 2 100001 100001  44 48 65 362
+1141 4 2 100001 100001  278 354 274 281
+1142 4 2 100001 100001  313 344 320 251
+1143 4 2 100001 100001  123 385 126 137
+1144 4 2 100001 100001  365 32 298 21
+1145 4 2 100001 100001  279 354 281 263
+1146 4 2 100001 100001  338 94 93 65
+1147 4 2 100001 100001  306 176 367 382
+1148 4 2 100001 100001  315 108 307 318
+1149 4 2 100001 100001  391 380 358 180
+1150 4 2 100001 100001  338 93 94 317
+1151 4 2 100001 100001  331 355 350 266
+1152 4 2 100001 100001  347 189 337 187
+1153 4 2 100001 100001  40 353 29 333
+1154 4 2 100001 100001  209 225 233 321
+1155 4 2 100001 100001  60 84 68 378
+1156 4 2 100001 100001  152 155 138 325
+1157 4 2 100001 100001  249 209 233 321
+1158 4 2 100001 100001  244 223 370 379
+1159 4 2 100001 100001  209 336 225 321
+1160 4 2 100001 100001  43 353 38 41
+1161 4 2 100001 100001  329 390 354 264
+1162 4 2 100001 100001  163 382 334 306
+1163 4 2 100001 100001  382 135 319 305
+1164 4 2 100001 100001  110 108 318 114
+1165 4 2 100001 100001  369 387 49 52
+1166 4 2 100001 100001  256 320 255 267
+1167 4 2 100001 100001  289 320 288 290
+1168 4 2 100001 100001  353 42 29 50
+1169 4 2 100001 100001  331 355 266 277
+1170 4 2 100001 100001  357 161 152 164
+1171 4 2 100001 100001  320 289 297 290
+1172 4 2 100001 100001  365 298 32 299
+1173 4 2 100001 100001  64 387 43 324
+1174 4 2 100001 100001  382 319 135 334
+1175 4 2 100001 100001  319 145 127 129
+1176 4 2 100001 100001  364 283 350 349
+1177 4 2 100001 100001  50 41 353 324
+1178 4 2 100001 100001  331 355 277 279
+1179 4 2 100001 100001  362 340 371 317
+1180 4 2 100001 100001  391 358 380 372
+1181 4 2 100001 100001  292 364 280 329
+1182 4 2 100001 100001  376 329 364 291
+1183 4 2 100001 100001  92 317 107 105
+1184 4 2 100001 100001  133 342 125 116
+1185 4 2 100001 100001  350 339 356 335
+1186 4 2 100001 100001  171 327 319 165
+1187 4 2 100001 100001  319 382 165 358
+1188 4 2 100001 100001  382 358 319 334
+1189 4 2 100001 100001  382 373 180 367
+1190 4 2 100001 100001  365 301 298 299
+1191 4 2 100001 100001  386 222 204 206
+1192 4 2 100001 100001  21 365 371 53
+1193 4 2 100001 100001  352 371 362 365
+1194 4 2 100001 100001  365 33 22 81
+1195 4 2 100001 100001  43 333 302 38
+1196 4 2 100001 100001  386 204 205 206
+1197 4 2 100001 100001  386 375 204 361
+1198 4 2 100001 100001  278 354 281 282
+1199 4 2 100001 100001  358 382 180 175
+1200 4 2 100001 100001  318 127 101 120
+1201 4 2 100001 100001  388 373 382 367
+1202 4 2 100001 100001  362 48 377 44
+1203 4 2 100001 100001  247 381 197 186
+1204 4 2 100001 100001  40 353 42 29
+1205 4 2 100001 100001  226 370 351 227
+1206 4 2 100001 100001  361 210 211 347
+1207 4 2 100001 100001  205 386 375 204
+1208 4 2 100001 100001  226 370 227 220
+1209 4 2 100001 100001  386 205 230 206
+1210 4 2 100001 100001  361 375 204 347
+1211 4 2 100001 100001  386 230 205 368
+1212 4 2 100001 100001  336 185 225 203
+1213 4 2 100001 100001  361 212 219 220
+1214 4 2 100001 100001  208 336 381 207
+1215 4 2 100001 100001  208 336 207 209
+1216 4 2 100001 100001  336 225 217 203
+1217 4 2 100001 100001  368 375 348 215
+1218 4 2 100001 100001  336 217 225 321
+1219 4 2 100001 100001  335 232 242 239
+1220 4 2 100001 100001  354 274 281 263
+1221 4 2 100001 100001  379 285 284 311
+1222 4 2 100001 100001  80 352 54 53
+1223 4 2 100001 100001  76 318 100 106
+1224 4 2 100001 100001  172 327 165 372
+1225 4 2 100001 100001  373 367 381 182
+1226 4 2 100001 100001  212 347 211 194
+1227 4 2 100001 100001  172 327 168 171
+1228 4 2 100001 100001  214 366 199 200
+1229 4 2 100001 100001  258 383 350 257
+1230 4 2 100001 100001  225 232 233 321
+1231 4 2 100001 100001  336 217 213 203
+1232 4 2 100001 100001  78 352 57 54
+1233 4 2 100001 100001  366 373 336 196
+1234 4 2 100001 100001  73 64 323 75
+1235 4 2 100001 100001  386 375 361 348
+1236 4 2 100001 100001  89 101 120 318
+1237 4 2 100001 100001  34 300 5 6
+1238 4 2 100001 100001  242 269 233 335
+1239 4 2 100001 100001  18 40 304 30
+1240 4 2 100001 100001  130 118 120 318
+1241 4 2 100001 100001  172 327 171 165
+1242 4 2 100001 100001  216 366 195 214
+1243 4 2 100001 100001  382 373 167 190
+1244 4 2 100001 100001  172 169 327 372
+1245 4 2 100001 100001  185 381 373 336
+1246 4 2 100001 100001  386 379 312 311
+1247 4 2 100001 100001  384 337 157 161
+1248 4 2 100001 100001  71 77 79 346
+1249 4 2 100001 100001  320 271 310 297
+1250 4 2 100001 100001  137 325 153 132
+1251 4 2 100001 100001  366 214 201 195
+1252 4 2 100001 100001  157 384 143 140
+1253 4 2 100001 100001  275 339 246 250
+1254 4 2 100001 100001  329 263 280 292
+1255 4 2 100001 100001  95 78 317 70
+1256 4 2 100001 100001  354 274 261 320
+1257 4 2 100001 100001  78 352 317 70
+1258 4 2 100001 100001  327 169 172 168
+1259 4 2 100001 100001  375 162 215 192
+1260 4 2 100001 100001  383 339 335 321
+1261 4 2 100001 100001  302 12 26 37
+1262 4 2 100001 100001  323 73 97 96
+1263 4 2 100001 100001  323 102 85 74
+1264 4 2 100001 100001  387 75 64 59
+1265 4 2 100001 100001  243 351 241 344
+1266 4 2 100001 100001  298 3 32 299
+1267 4 2 100001 100001  336 218 217 321
+1268 4 2 100001 100001  231 229 316 345
+1269 4 2 100001 100001  3 22 32 299
+1270 4 2 100001 100001  80 352 78 54
+1271 4 2 100001 100001  354 261 274 263
+1272 4 2 100001 100001  7 300 35 6
+1273 4 2 100001 100001  388 366 191 167
+1274 4 2 100001 100001  209 336 207 185
+1275 4 2 100001 100001  66 317 88 90
+1276 4 2 100001 100001  383 339 321 273
+1277 4 2 100001 100001  346 79 359 77
+1278 4 2 100001 100001  383 273 321 268
+1279 4 2 100001 100001  344 255 251 243
+1280 4 2 100001 100001  386 379 330 312
+1281 4 2 100001 100001  345 351 379 231
+1282 4 2 100001 100001  369 27 49 43
+1283 4 2 100001 100001  375 348 162 189
+1284 4 2 100001 100001  111 98 360 119
+1285 4 2 100001 100001  388 305 167 191
+1286 4 2 100001 100001  128 115 319 121
+1287 4 2 100001 100001  344 255 253 320
+1288 4 2 100001 100001  323 73 96 87
+1289 4 2 100001 100001  346 359 79 387
+1290 4 2 100001 100001  383 339 273 350
+1291 4 2 100001 100001  212 361 211 347
+1292 4 2 100001 100001  327 171 170 168
+1293 4 2 100001 100001  80 371 53 61
+1294 4 2 100001 100001  108 317 131 107
+1295 4 2 100001 100001  137 325 138 153
+1296 4 2 100001 100001  175 367 181 178
+1297 4 2 100001 100001  350 257 262 260
+1298 4 2 100001 100001  318 131 90 315
+1299 4 2 100001 100001  80 89 118 317
+1300 4 2 100001 100001  95 318 317 118
+1301 4 2 100001 100001  95 78 118 317
+1302 4 2 100001 100001  354 261 256 320
+1303 4 2 100001 100001  270 379 223 252
+1304 4 2 100001 100001  270 379 308 223
+1305 4 2 100001 100001  324 323 69 58
+1306 4 2 100001 100001  379 285 311 316
+1307 4 2 100001 100001  350 356 266 262
+1308 4 2 100001 100001  354 256 261 263
+1309 4 2 100001 100001  327 170 171 319
+1310 4 2 100001 100001  67 387 85 323
+1311 4 2 100001 100001  327 170 150 168
+1312 4 2 100001 100001  327 150 170 319
+1313 4 2 100001 100001  325 144 125 134
+1314 4 2 100001 100001  329 256 292 267
+1315 4 2 100001 100001  114 319 307 318
+1316 4 2 100001 100001  204 347 184 210
+1317 4 2 100001 100001  327 150 166 168
+1318 4 2 100001 100001  376 329 291 314
+1319 4 2 100001 100001  327 166 150 319
+1320 4 2 100001 100001  22 3 4 299
+1321 4 2 100001 100001  157 384 161 143
+1322 4 2 100001 100001  368 375 215 192
+1323 4 2 100001 100001  343 154 144 158
+1324 4 2 100001 100001  346 77 359 83
+1325 4 2 100001 100001  377 48 35 44
+1326 4 2 100001 100001  325 134 140 144
+1327 4 2 100001 100001  320 287 288 290
+1328 4 2 100001 100001  347 189 187 212
+1329 4 2 100001 100001  350 258 257 376
+1330 4 2 100001 100001  33 81 365 91
+1331 4 2 100001 100001  40 29 17 304
+1332 4 2 100001 100001  29 16 17 304
+1333 4 2 100001 100001  303 333 38 302
+1334 4 2 100001 100001  56 374 72 369
+1335 4 2 100001 100001  369 302 31 28
+1336 4 2 100001 100001  329 263 292 256
+1337 4 2 100001 100001  26 28 369 55
+1338 4 2 100001 100001  39 333 304 29
+1339 4 2 100001 100001  13 302 27 37
+1340 4 2 100001 100001  9 25 24 301
+1341 4 2 100001 100001  381 178 197 186
+1342 4 2 100001 100001  280 293 283 364
+1343 4 2 100001 100001  5 33 4 299
+1344 4 2 100001 100001  77 346 72 83
+1345 4 2 100001 100001  229 234 215 345
+1346 4 2 100001 100001  2 298 32 21
+1347 4 2 100001 100001  377 35 34 44
+1348 4 2 100001 100001  11 302 26 28
+1349 4 2 100001 100001  16 29 39 304
+1350 4 2 100001 100001  303 333 302 304
+1351 4 2 100001 100001  300 36 8 7
+1352 4 2 100001 100001  27 14 38 303
+1353 4 2 100001 100001  344 253 255 243
+1354 4 2 100001 100001  359 378 83 84
+1355 4 2 100001 100001  142 322 126 124
+1356 4 2 100001 100001  359 378 346 83
+1357 4 2 100001 100001  192 375 162 179
+1358 4 2 100001 100001  71 77 346 46
+1359 4 2 100001 100001  26 369 28 302
+1360 4 2 100001 100001  165 327 358 372
+1361 4 2 100001 100001  362 377 91 44
+1362 4 2 100001 100001  369 37 52 49
+1363 4 2 100001 100001  369 27 43 302
+1364 4 2 100001 100001  286 344 231 379
+1365 4 2 100001 100001  36 300 35 7
+1366 4 2 100001 100001  79 360 328 341
+1367 4 2 100001 100001  61 371 66 317
+1368 4 2 100001 100001  331 355 279 350
+1369 4 2 100001 100001  78 352 70 57
+1370 4 2 100001 100001  94 318 317 93
+1371 4 2 100001 100001  352 70 57 47
+1372 4 2 100001 100001  317 105 131 107
+1373 4 2 100001 100001  129 318 139 130
+1374 4 2 100001 100001  243 351 344 244
+1375 4 2 100001 100001  377 34 91 44
+1376 4 2 100001 100001  39 353 29 50
+1377 4 2 100001 100001  41 324 69 58
+1378 4 2 100001 100001  367 180 182 373
+1379 4 2 100001 100001  353 369 333 62
+1380 4 2 100001 100001  352 54 25 57
+1381 4 2 100001 100001  189 337 164 162
+1382 4 2 100001 100001  147 343 151 141
+1383 4 2 100001 100001  88 317 131 90
+1384 4 2 100001 100001  387 378 359 328
+1385 4 2 100001 100001  200 247 245 321
+1386 4 2 100001 100001  189 187 164 337
+1387 4 2 100001 100001  353 50 324 67
+1388 4 2 100001 100001  72 378 68 83
+1389 4 2 100001 100001  352 25 24 57
+1390 4 2 100001 100001  303 333 304 39
+1391 4 2 100001 100001  270 379 252 320
+1392 4 2 100001 100001  370 345 351 379
+1393 4 2 100001 100001  386 379 311 345
+1394 4 2 100001 100001  352 24 25 301
+1395 4 2 100001 100001  41 324 58 43
+1396 4 2 100001 100001  382 167 305 165
+1397 4 2 100001 100001  102 323 99 74
+1398 4 2 100001 100001  208 381 321 247
+1399 4 2 100001 100001  174 169 173 373
+1400 4 2 100001 100001  318 131 315 108
+1401 4 2 100001 100001  70 352 338 47
+1402 4 2 100001 100001  113 124 341 104
+1403 4 2 100001 100001  79 341 113 123
+1404 4 2 100001 100001  231 344 241 351
+1405 4 2 100001 100001  80 371 61 317
+1406 4 2 100001 100001  94 318 93 110
+1407 4 2 100001 100001  112 99 360 96
+1408 4 2 100001 100001  353 50 67 42
+1409 4 2 100001 100001  264 350 355 266
+1410 4 2 100001 100001  341 360 322 123
+1411 4 2 100001 100001  352 24 47 57
+1412 4 2 100001 100001  33 365 377 91
+1413 4 2 100001 100001  44 362 65 92
+1414 4 2 100001 100001  170 295 319 294
+1415 4 2 100001 100001  340 81 371 45
+1416 4 2 100001 100001  366 373 367 381
+1417 4 2 100001 100001  325 357 152 155
+1418 4 2 100001 100001  328 97 98 360
+1419 4 2 100001 100001  374 378 60 68
+1420 4 2 100001 100001  345 316 379 311
+1421 4 2 100001 100001  388 305 191 193
+1422 4 2 100001 100001  343 140 158 144
+1423 4 2 100001 100001  135 114 121 319
+1424 4 2 100001 100001  154 151 347 343
+1425 4 2 100001 100001  129 130 120 318
+1426 4 2 100001 100001  43 333 38 353
+1427 4 2 100001 100001  89 86 318 317
+1428 4 2 100001 100001  343 147 325 141
+1429 4 2 100001 100001  318 93 110 106
+1430 4 2 100001 100001  145 358 319 166
+1431 4 2 100001 100001  343 140 144 325
+1432 4 2 100001 100001  101 122 318 86
+1433 4 2 100001 100001  94 318 110 108
+1434 4 2 100001 100001  86 89 318 101
+1435 4 2 100001 100001  212 375 189 348
+1436 4 2 100001 100001  367 366 381 199
+1437 4 2 100001 100001  363 350 329 264
+1438 4 2 100001 100001  319 295 307 318
+1439 4 2 100001 100001  145 358 166 159
+1440 4 2 100001 100001  123 360 79 341
+1441 4 2 100001 100001  184 347 183 154
+1442 4 2 100001 100001  347 198 188 194
+1443 4 2 100001 100001  347 357 156 187
+1444 4 2 100001 100001  328 60 82 59
+1445 4 2 100001 100001  123 126 322 124
+1446 4 2 100001 100001  357 156 325 343
+1447 4 2 100001 100001  189 224 348 162
+1448 4 2 100001 100001  136 322 332 142
+1449 4 2 100001 100001  325 384 332 152
+1450 4 2 100001 100001  352 371 365 53
+1451 4 2 100001 100001  198 156 343 147
+1452 4 2 100001 100001  325 342 133 132
+1453 4 2 100001 100001  379 344 231 351
+1454 4 2 100001 100001  363 350 264 260
+1455 4 2 100001 100001  81 91 105 340
+1456 4 2 100001 100001  388 305 193 382
+1457 4 2 100001 100001  362 340 317 92
+1458 4 2 100001 100001  314 309 376 363
+1459 4 2 100001 100001  210 347 184 188
+1460 4 2 100001 100001  360 98 111 97
+1461 4 2 100001 100001  200 245 228 321
+1462 4 2 100001 100001  222 386 312 206
+1463 4 2 100001 100001  159 177 180 380
+1464 4 2 100001 100001  343 154 141 144
+1465 4 2 100001 100001  183 343 158 154
+1466 4 2 100001 100001  332 384 325 140
+1467 4 2 100001 100001  132 133 112 342
+1468 4 2 100001 100001  262 350 264 266
+1469 4 2 100001 100001  360 97 111 116
+1470 4 2 100001 100001  210 188 211 347
+1471 4 2 100001 100001  361 212 220 348
+1472 4 2 100001 100001  325 156 357 155
+1473 4 2 100001 100001  361 210 347 204
+1474 4 2 100001 100001  317 92 107 94
+1475 4 2 100001 100001  183 343 154 347
+1476 4 2 100001 100001  33 377 365 299
+1477 4 2 100001 100001  139 115 319 149
+1478 4 2 100001 100001  118 318 89 120
+1479 4 2 100001 100001  317 86 318 90
+1480 4 2 100001 100001  166 122 319 127
+1481 4 2 100001 100001  133 342 325 125
+1482 4 2 100001 100001  313 344 251 241
+1483 4 2 100001 100001  385 132 112 342
+1484 4 2 100001 100001  342 119 134 111
+1485 4 2 100001 100001  79 360 123 102
+1486 4 2 100001 100001  342 133 112 116
+1487 4 2 100001 100001  199 388 366 201
+1488 4 2 100001 100001  310 363 309 314
+1489 4 2 100001 100001  15 38 303 39
+1490 4 2 100001 100001  236 254 268 321
+1491 4 2 100001 100001  259 376 314 258
+1492 4 2 100001 100001  354 264 282 320
+1493 4 2 100001 100001  33 377 34 91
+1494 4 2 100001 100001  342 385 360 112
+1495 4 2 100001 100001  360 102 99 109
+1496 4 2 100001 100001  111 342 116 125
+1497 4 2 100001 100001  384 152 357 161
+1498 4 2 100001 100001  33 34 377 299
+1499 4 2 100001 100001  360 342 112 116
+1500 4 2 100001 100001  344 244 253 243
+1501 4 2 100001 100001  266 356 350 331
+1502 4 2 100001 100001  113 124 123 341
+1503 4 2 100001 100001  159 169 380 358
+1504 4 2 100001 100001  258 309 376 314
+1505 4 2 100001 100001  320 289 271 297
+1506 4 2 100001 100001  229 345 215 368
+1507 4 2 100001 100001  90 86 318 294
+1508 4 2 100001 100001  382 373 391 180
+1509 4 2 100001 100001  243 351 244 227
+1510 4 2 100001 100001  135 121 128 319
+1511 4 2 100001 100001  359 378 387 346
+1512 4 2 100001 100001  381 367 181 182
+1513 4 2 100001 100001  334 128 319 135
+1514 4 2 100001 100001  167 366 191 202
+1515 4 2 100001 100001  262 260 264 350
+1516 4 2 100001 100001  363 350 260 376
+1517 4 2 100001 100001  281 355 354 279
+1518 4 2 100001 100001  128 334 319 149
+1519 4 2 100001 100001  341 359 104 328
+1520 4 2 100001 100001  351 231 345 226
+1521 4 2 100001 100001  360 323 97 96
+1522 4 2 100001 100001  376 326 259 349
+1523 4 2 100001 100001  292 364 329 291
+1524 4 2 100001 100001  351 231 226 241
+1525 4 2 100001 100001  165 327 319 358
+1526 4 2 100001 100001  379 312 272 308
+1527 4 2 100001 100001  381 178 186 181
+1528 4 2 100001 100001  165 382 319 305
+1529 4 2 100001 100001  329 376 363 314
+1530 4 2 100001 100001  317 88 131 105
+1531 4 2 100001 100001  377 352 362 365
+1532 4 2 100001 100001  384 337 161 357
+1533 4 2 100001 100001  163 382 306 193
+1534 4 2 100001 100001  159 380 180 358
+1535 4 2 100001 100001  137 325 332 138
+1536 4 2 100001 100001  373 380 180 177
+1537 4 2 100001 100001  357 337 161 164
+1538 4 2 100001 100001  205 179 375 192
+1539 4 2 100001 100001  133 325 141 125
+1540 4 2 100001 100001  365 377 91 362
+1541 4 2 100001 100001  95 318 118 130
+1542 4 2 100001 100001  348 224 215 162
+1543 4 2 100001 100001  362 377 48 47
+1544 4 2 100001 100001  341 103 360 328
+1545 4 2 100001 100001  142 322 124 117
+1546 4 2 100001 100001  379 316 345 231
+1547 4 2 100001 100001  95 318 130 100
+1548 4 2 100001 100001  342 322 119 360
+1549 4 2 100001 100001  27 38 302 303
+1550 4 2 100001 100001  138 126 332 137
+1551 4 2 100001 100001  334 128 135 163
+1552 4 2 100001 100001  321 216 235 228
+1553 4 2 100001 100001  360 97 116 96
+1554 4 2 100001 100001  128 334 149 160
+1555 4 2 100001 100001  112 99 109 360
+1556 4 2 100001 100001  317 340 88 105
+1557 4 2 100001 100001  387 75 59 328
+1558 4 2 100001 100001  226 370 220 345
+1559 4 2 100001 100001  370 345 379 330
+1560 4 2 100001 100001  331 339 356 350
+1561 4 2 100001 100001  389 350 257 262
+1562 4 2 100001 100001  312 379 284 311
+1563 4 2 100001 100001  335 237 383 321
+1564 4 2 100001 100001  375 179 205 183
+1565 4 2 100001 100001  383 273 268 350
+1566 4 2 100001 100001  351 370 244 227
+1567 4 2 100001 100001  340 317 92 105
+1568 4 2 100001 100001  360 102 109 123
+1569 4 2 100001 100001  239 389 335 383
+1570 4 2 100001 100001  189 348 220 212
+1571 4 2 100001 100001  88 340 81 105
+1572 4 2 100001 100001  159 177 380 169
+1573 4 2 100001 100001  358 380 372 169
+1574 4 2 100001 100001  249 321 248 208
+1575 4 2 100001 100001  309 376 260 257
+1576 4 2 100001 100001  391 358 382 180
+1577 4 2 100001 100001  345 231 234 226
+1578 4 2 100001 100001  165 358 382 372
+1579 4 2 100001 100001  240 321 235 228
+1580 4 2 100001 100001  345 231 229 234
+1581 4 2 100001 100001  347 189 212 375
+1582 4 2 100001 100001  351 244 370 379
+1583 4 2 100001 100001  209 336 185 225
+1584 4 2 100001 100001  73 323 64 58
+1585 4 2 100001 100001  335 237 321 232
+1586 4 2 100001 100001  391 382 358 372
+1587 4 2 100001 100001  324 323 58 64
+1588 4 2 100001 100001  167 165 382 190
+1589 4 2 100001 100001  142 322 332 126
+1590 4 2 100001 100001  167 196 366 202
+1591 4 2 100001 100001  362 91 92 44
+1592 4 2 100001 100001  243 351 227 241
+1593 4 2 100001 100001  256 320 253 255
+1594 4 2 100001 100001  351 344 244 379
+1595 4 2 100001 100001  379 244 223 252
+1596 4 2 100001 100001  373 372 190 391
+1597 4 2 100001 100001  334 149 160 148
+1598 4 2 100001 100001  276 339 275 250
+1599 4 2 100001 100001  382 334 176 175
+1600 4 2 100001 100001  275 273 246 339
+1601 4 2 100001 100001  292 364 293 280
+1602 4 2 100001 100001  376 326 350 258
+1603 4 2 100001 100001  238 258 326 259
+1604 4 2 100001 100001  273 321 246 339
+1605 4 2 100001 100001  360 385 109 112
+1606 4 2 100001 100001  179 157 337 162
+1607 4 2 100001 100001  249 335 233 296
+1608 4 2 100001 100001  36 300 8 301
+1609 4 2 100001 100001  282 264 355 266
+1610 4 2 100001 100001  371 51 66 45
+1611 4 2 100001 100001  61 371 51 66
+1612 4 2 100001 100001  339 296 249 250
+1613 4 2 100001 100001  66 340 371 45
+1614 4 2 100001 100001  66 340 45 88
+1615 4 2 100001 100001  264 350 390 355
+1616 4 2 100001 100001  264 350 329 390
+1617 4 2 100001 100001  363 290 297 265
+1618 4 2 100001 100001  66 340 88 317
+1619 4 2 100001 100001  66 340 317 371
+1620 4 2 100001 100001  363 290 265 264
+1621 4 2 100001 100001  347 187 194 212
+1622 4 2 100001 100001  333 40 46 30
+1623 4 2 100001 100001  18 304 19 30
+1624 4 2 100001 100001  320 287 290 282
+1625 4 2 100001 100001  281 355 279 277
+1626 4 2 100001 100001  388 382 193 306
+1627 4 2 100001 100001  383 268 236 238
+1628 4 2 100001 100001  338 48 65 63
+1629 4 2 100001 100001  185 373 182 174
+1630 4 2 100001 100001  368 205 192 230
+1631 4 2 100001 100001  249 335 296 339
+1632 4 2 100001 100001  383 236 268 321
+1633 4 2 100001 100001  337 161 164 162
+1634 4 2 100001 100001  383 236 218 238
+1635 4 2 100001 100001  150 122 319 166
+1636 4 2 100001 100001  383 218 236 321
+1637 4 2 100001 100001  339 249 248 250
+1638 4 2 100001 100001  267 291 292 329
+1639 4 2 100001 100001  374 378 68 72
+1640 4 2 100001 100001  185 373 174 203
+1641 4 2 100001 100001  389 350 262 356
+1642 4 2 100001 100001  356 339 296 335
+1643 4 2 100001 100001  383 218 237 238
+1644 4 2 100001 100001  330 361 345 386
+1645 4 2 100001 100001  350 339 273 275
+1646 4 2 100001 100001  383 237 218 321
+1647 4 2 100001 100001  374 55 52 369
+1648 4 2 100001 100001  383 237 239 238
+1649 4 2 100001 100001  335 237 232 239
+1650 4 2 100001 100001  55 60 374 52
+1651 4 2 100001 100001  156 347 187 194
+1652 4 2 100001 100001  344 252 253 244
+1653 4 2 100001 100001  311 230 345 316
+1654 4 2 100001 100001  345 220 224 348
+1655 4 2 100001 100001  339 248 249 321
+1656 4 2 100001 100001  387 67 353 324
+1657 4 2 100001 100001  362 338 48 65
+1658 4 2 100001 100001  185 381 182 373
+1659 4 2 100001 100001  318 93 106 76
+1660 4 2 100001 100001  146 319 171 307
+1661 4 2 100001 100001  208 381 247 186
+1662 4 2 100001 100001  339 248 246 250
+1663 4 2 100001 100001  331 339 350 275
+1664 4 2 100001 100001  360 103 98 328
+1665 4 2 100001 100001  218 321 237 217
+1666 4 2 100001 100001  196 203 336 213
+1667 4 2 100001 100001  272 379 270 320
+1668 4 2 100001 100001  253 320 261 252
+1669 4 2 100001 100001  339 246 248 321
+1670 4 2 100001 100001  272 379 308 270
+1671 4 2 100001 100001  362 340 91 81
+1672 4 2 100001 100001  18 40 17 304
+1673 4 2 100001 100001  319 146 114 307
+1674 4 2 100001 100001  341 359 113 104
+1675 4 2 100001 100001  321 245 246 248
+1676 4 2 100001 100001  245 247 248 321
+1677 4 2 100001 100001  185 373 203 336
+1678 4 2 100001 100001  322 119 103 117
+1679 4 2 100001 100001  220 348 189 224
+1680 4 2 100001 100001  136 322 142 117
+1681 4 2 100001 100001  350 273 283 275
+1682 4 2 100001 100001  74 323 99 87
+1683 4 2 100001 100001  99 323 96 87
+1684 4 2 100001 100001  377 47 36 48
+1685 4 2 100001 100001  69 67 324 50
+1686 4 2 100001 100001  56 374 55 68
+1687 4 2 100001 100001  84 328 82 103
+1688 4 2 100001 100001  377 36 35 48
+1689 4 2 100001 100001  300 377 36 35
+1690 4 2 100001 100001  113 104 359 83
+1691 4 2 100001 100001  286 285 379 316
+1692 4 2 100001 100001  286 379 285 320
+1693 4 2 100001 100001  369 374 387 52
+1694 4 2 100001 100001  325 155 138 153
+1695 4 2 100001 100001  163 382 193 135
+1696 4 2 100001 100001  55 60 68 374
+1697 4 2 100001 100001  335 269 233 296
+1698 4 2 100001 100001  258 383 257 239
+1699 4 2 100001 100001  258 383 239 238
+1700 4 2 100001 100001  238 326 268 259
+1701 4 2 100001 100001  369 62 72 56
+1702 4 2 100001 100001  166 168 169 327
+1703 4 2 100001 100001  56 374 68 72
+1704 4 2 100001 100001  112 360 116 96
+1705 4 2 100001 100001  360 342 116 111
+1706 4 2 100001 100001  361 221 211 210
+1707 4 2 100001 100001  363 350 376 329
+1708 4 2 100001 100001  349 293 268 259
+1709 4 2 100001 100001  361 220 219 370
+1710 4 2 100001 100001  359 378 84 328
+1711 4 2 100001 100001  331 339 275 276
+1712 4 2 100001 100001  386 311 312 206
+1713 4 2 100001 100001  86 122 318 294
+1714 4 2 100001 100001  325 385 132 137
+1715 4 2 100001 100001  363 290 264 320
+1716 4 2 100001 100001  338 65 93 63
+1717 4 2 100001 100001  338 93 76 63
+1718 4 2 100001 100001  156 347 194 198
+1719 4 2 100001 100001  267 291 329 314
+1720 4 2 100001 100001  361 204 386 222
+1721 4 2 100001 100001  361 204 222 210
+1722 4 2 100001 100001  378 84 68 83
+1723 4 2 100001 100001  199 367 197 381
+1724 4 2 100001 100001  330 386 312 222
+1725 4 2 100001 100001  308 330 312 222
+1726 4 2 100001 100001  338 76 93 317
+1727 4 2 100001 100001  338 76 70 63
+1728 4 2 100001 100001  286 379 231 316
+1729 4 2 100001 100001  382 373 190 391
+1730 4 2 100001 100001  356 339 276 296
+1731 4 2 100001 100001  293 349 273 283
+1732 4 2 100001 100001  364 283 349 293
+1733 4 2 100001 100001  387 353 346 72
+1734 4 2 100001 100001  134 332 136 119
+1735 4 2 100001 100001  286 344 379 320
+1736 4 2 100001 100001  269 296 335 356
+1737 4 2 100001 100001  342 119 111 360
+1738 4 2 100001 100001  386 379 345 330
+1739 4 2 100001 100001  268 293 349 273
+1740 4 2 100001 100001  334 149 139 319
+1741 4 2 100001 100001  332 134 136 140
+1742 4 2 100001 100001  386 311 206 230
+1743 4 2 100001 100001  376 326 349 350
+1744 4 2 100001 100001  146 305 319 135
+1745 4 2 100001 100001  31 333 304 302
+1746 4 2 100001 100001  59 387 328 60
+1747 4 2 100001 100001  369 333 62 31
+1748 4 2 100001 100001  338 70 76 317
+1749 4 2 100001 100001  39 333 29 353
+1750 4 2 100001 100001  62 333 46 30
+1751 4 2 100001 100001  376 326 258 259
+1752 4 2 100001 100001  375 337 189 162
+1753 4 2 100001 100001  133 325 147 141
+1754 4 2 100001 100001  319 305 146 165
+1755 4 2 100001 100001  382 334 306 176
+1756 4 2 100001 100001  332 142 143 136
+1757 4 2 100001 100001  332 142 152 143
+1758 4 2 100001 100001  332 325 134 140
+1759 4 2 100001 100001  332 325 152 138
+1760 4 2 100001 100001  334 128 163 160
+1761 4 2 100001 100001  338 70 47 63
+1762 4 2 100001 100001  361 375 347 212
+1763 4 2 100001 100001  334 358 159 175
+1764 4 2 100001 100001  174 177 169 373
+1765 4 2 100001 100001  159 358 180 175
+1766 4 2 100001 100001  353 324 41 43
+1767 4 2 100001 100001  334 129 139 148
+1768 4 2 100001 100001  249 335 339 321
+1769 4 2 100001 100001  341 359 79 113
+1770 4 2 100001 100001  384 158 337 343
+1771 4 2 100001 100001  143 152 332 384
+1772 4 2 100001 100001  104 124 341 322
+1773 4 2 100001 100001  124 104 117 322
+1774 4 2 100001 100001  140 332 143 136
+1775 4 2 100001 100001  341 124 123 322
+1776 4 2 100001 100001  357 337 164 187
+1777 4 2 100001 100001  215 162 375 348
+1778 4 2 100001 100001  368 375 192 205
+1779 4 2 100001 100001  382 334 175 358
+1780 4 2 100001 100001  334 139 129 319
+1781 4 2 100001 100001  145 358 159 334
+1782 4 2 100001 100001  334 139 149 148
+1783 4 2 100001 100001  140 143 332 384
+1784 4 2 100001 100001  390 354 355 279
+1785 4 2 100001 100001  329 279 354 390
+1786 4 2 100001 100001  390 350 279 355
+1787 4 2 100001 100001  390 350 329 279
+1788 4 2 100001 100001  190 382 391 372
+$EndElements

=== added file 'examples/deformableelem/model.stl'
--- examples/deformableelem/model.stl	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/model.stl	2016-01-07 17:49:32 +0000
@@ -0,0 +1,870 @@
+solid vcg
+  facet normal -9.935677e-07  9.804380e-02  9.951821e-01
+    outer loop
+      vertex  -1.000000e+00 -0.000000e+00  9.999900e-02
+      vertex   1.000000e+00 -0.000000e+00  1.000010e-01
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+    endloop
+  endfacet
+  facet normal -5.004937e-07  9.799373e-02  9.951870e-01
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+      vertex  -1.000000e+00 -0.000000e+00  9.999900e-02
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+    endloop
+  endfacet
+  facet normal -4.812623e-07  2.902623e-01  9.569471e-01
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal -9.589455e-07  2.903089e-01  9.569330e-01
+    outer loop
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+    endloop
+  endfacet
+  facet normal -8.837795e-07  4.713902e-01  8.819247e-01
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+    endloop
+  endfacet
+  facet normal -8.837795e-07  4.713902e-01  8.819247e-01
+    outer loop
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+    endloop
+  endfacet
+  facet normal -7.746253e-07  6.344065e-01  7.729996e-01
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+    endloop
+  endfacet
+  facet normal -3.858854e-07  6.343759e-01  7.730248e-01
+    outer loop
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+    endloop
+  endfacet
+  facet normal -3.166859e-07  7.730043e-01  6.344008e-01
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+    endloop
+  endfacet
+  facet normal -6.345283e-07  7.730249e-01  6.343758e-01
+    outer loop
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+    endloop
+  endfacet
+  facet normal -4.715036e-07  8.819247e-01  4.713902e-01
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+    endloop
+  endfacet
+  facet normal -2.353234e-07  8.819134e-01  4.714115e-01
+    outer loop
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+    endloop
+  endfacet
+  facet normal -1.449192e-07  9.569328e-01  2.903093e-01
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+    endloop
+  endfacet
+  facet normal -2.900945e-07  9.569372e-01  2.902951e-01
+    outer loop
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+    endloop
+  endfacet
+  facet normal -9.792566e-08  9.951871e-01  9.799337e-02
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+    endloop
+  endfacet
+  facet normal -9.799335e-08  9.951870e-01  9.799335e-02
+    outer loop
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+    endloop
+  endfacet
+  facet normal  9.799335e-08  9.951870e-01 -9.799335e-02
+    outer loop
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+    endloop
+  endfacet
+  facet normal  9.792566e-08  9.951871e-01 -9.799337e-02
+    outer loop
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+    endloop
+  endfacet
+  facet normal  2.900945e-07  9.569372e-01 -2.902951e-01
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+    endloop
+  endfacet
+  facet normal  1.449192e-07  9.569328e-01 -2.903093e-01
+    outer loop
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+    endloop
+  endfacet
+  facet normal  2.353234e-07  8.819134e-01 -4.714115e-01
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+    endloop
+  endfacet
+  facet normal  4.715036e-07  8.819247e-01 -4.713902e-01
+    outer loop
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+    endloop
+  endfacet
+  facet normal  6.345283e-07  7.730249e-01 -6.343758e-01
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+    endloop
+  endfacet
+  facet normal  3.166859e-07  7.730043e-01 -6.344008e-01
+    outer loop
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+    endloop
+  endfacet
+  facet normal  3.858854e-07  6.343759e-01 -7.730248e-01
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+    endloop
+  endfacet
+  facet normal  7.746253e-07  6.344065e-01 -7.729996e-01
+    outer loop
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+    endloop
+  endfacet
+  facet normal  8.837795e-07  4.713902e-01 -8.819247e-01
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+    endloop
+  endfacet
+  facet normal  8.837795e-07  4.713902e-01 -8.819247e-01
+    outer loop
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+    endloop
+  endfacet
+  facet normal  9.589455e-07  2.903089e-01 -9.569330e-01
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00  1.950900e-02 -9.807800e-02
+    endloop
+  endfacet
+  facet normal  4.812623e-07  2.902623e-01 -9.569471e-01
+    outer loop
+      vertex   1.000000e+00  1.950900e-02 -9.807800e-02
+      vertex  -1.000000e+00  1.950900e-02 -9.807900e-02
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+    endloop
+  endfacet
+  facet normal  5.004937e-07  9.799373e-02 -9.951870e-01
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02 -9.807900e-02
+      vertex   1.000000e+00  1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00  0.000000e+00 -9.999900e-02
+    endloop
+  endfacet
+  facet normal  9.935677e-07  9.804380e-02 -9.951821e-01
+    outer loop
+      vertex   1.000000e+00  0.000000e+00 -9.999900e-02
+      vertex  -1.000000e+00  0.000000e+00 -1.000010e-01
+      vertex  -1.000000e+00  1.950900e-02 -9.807900e-02
+    endloop
+  endfacet
+  facet normal  9.935726e-07 -9.799373e-02 -9.951870e-01
+    outer loop
+      vertex  -1.000000e+00  0.000000e+00 -1.000010e-01
+      vertex   1.000000e+00  0.000000e+00 -9.999900e-02
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+    endloop
+  endfacet
+  facet normal  5.004912e-07 -9.804380e-02 -9.951821e-01
+    outer loop
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+      vertex  -1.000000e+00  0.000000e+00 -1.000010e-01
+    endloop
+  endfacet
+  facet normal  4.812552e-07 -2.903089e-01 -9.569330e-01
+    outer loop
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+    endloop
+  endfacet
+  facet normal  9.589596e-07 -2.902623e-01 -9.569471e-01
+    outer loop
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+    endloop
+  endfacet
+  facet normal  8.837795e-07 -4.713902e-01 -8.819247e-01
+    outer loop
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+    endloop
+  endfacet
+  facet normal  8.837795e-07 -4.713902e-01 -8.819247e-01
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+    endloop
+  endfacet
+  facet normal  7.746505e-07 -6.343759e-01 -7.730248e-01
+    outer loop
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+    endloop
+  endfacet
+  facet normal  3.858728e-07 -6.344065e-01 -7.729996e-01
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+    endloop
+  endfacet
+  facet normal  3.166734e-07 -7.730249e-01 -6.343758e-01
+    outer loop
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+    endloop
+  endfacet
+  facet normal  6.345534e-07 -7.730043e-01 -6.344008e-01
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+    endloop
+  endfacet
+  facet normal  4.715249e-07 -8.819134e-01 -4.714115e-01
+    outer loop
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+    endloop
+  endfacet
+  facet normal  2.353128e-07 -8.819247e-01 -4.713902e-01
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+    endloop
+  endfacet
+  facet normal  1.449121e-07 -9.569372e-01 -2.902951e-01
+    outer loop
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+    endloop
+  endfacet
+  facet normal  2.901087e-07 -9.569328e-01 -2.903093e-01
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+    endloop
+  endfacet
+  facet normal  9.792565e-08 -9.951870e-01 -9.799335e-02
+    outer loop
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+    endloop
+  endfacet
+  facet normal  9.799336e-08 -9.951871e-01 -9.799337e-02
+    outer loop
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+    endloop
+  endfacet
+  facet normal -9.799336e-08 -9.951871e-01  9.799337e-02
+    outer loop
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+    endloop
+  endfacet
+  facet normal -9.792565e-08 -9.951870e-01  9.799335e-02
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+    endloop
+  endfacet
+  facet normal -2.901087e-07 -9.569328e-01  2.903093e-01
+    outer loop
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+    endloop
+  endfacet
+  facet normal -1.449121e-07 -9.569372e-01  2.902951e-01
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+    endloop
+  endfacet
+  facet normal -2.353128e-07 -8.819247e-01  4.713902e-01
+    outer loop
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+    endloop
+  endfacet
+  facet normal -4.715249e-07 -8.819134e-01  4.714115e-01
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+    endloop
+  endfacet
+  facet normal -6.345534e-07 -7.730043e-01  6.344008e-01
+    outer loop
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+    endloop
+  endfacet
+  facet normal -3.166734e-07 -7.730249e-01  6.343758e-01
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+    endloop
+  endfacet
+  facet normal -3.858728e-07 -6.344065e-01  7.729996e-01
+    outer loop
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+    endloop
+  endfacet
+  facet normal -7.746505e-07 -6.343759e-01  7.730248e-01
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+    endloop
+  endfacet
+  facet normal -8.837795e-07 -4.713902e-01  8.819247e-01
+    outer loop
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal -8.837795e-07 -4.713902e-01  8.819247e-01
+    outer loop
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+      vertex   1.000000e+00 -0.000000e+00  1.000010e-01
+      vertex   1.000000e+00 -1.950900e-02  9.807900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+      vertex   1.000000e+00 -1.950900e-02  9.807900e-02
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00  1.950900e-02  9.807900e-02
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+      vertex   1.000000e+00  3.826800e-02  9.238900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02  8.314800e-02
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+      vertex   1.000000e+00  5.555700e-02  8.314800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02  7.071100e-02
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+      vertex   1.000000e+00  7.071100e-02  7.071100e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02  5.555800e-02
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+      vertex   1.000000e+00  8.314700e-02  5.555800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02  3.826900e-02
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+      vertex   1.000000e+00  9.238800e-02  3.826900e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02  1.951000e-02
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+      vertex   1.000000e+00  9.807900e-02  1.951000e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -1.000000e-01  1.000000e-06
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00  1.000000e-01  1.000000e-06
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.807900e-02 -1.950800e-02
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00  9.807900e-02 -1.950800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -9.238800e-02 -3.826800e-02
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00  9.238800e-02 -3.826800e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -8.314700e-02 -5.555600e-02
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00  8.314700e-02 -5.555600e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -7.071100e-02 -7.071000e-02
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00  7.071100e-02 -7.071000e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -5.555700e-02 -8.314600e-02
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00  5.555700e-02 -8.314600e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -3.826800e-02 -9.238700e-02
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00  1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00  3.826800e-02 -9.238700e-02
+    endloop
+  endfacet
+  facet normal  1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex   1.000000e+00 -1.950900e-02 -9.807800e-02
+      vertex   1.000000e+00  0.000000e+00 -9.999900e-02
+      vertex   1.000000e+00  1.950900e-02 -9.807800e-02
+    endloop
+  endfacet
+  facet normal -9.935726e-07 -9.799373e-02  9.951870e-01
+    outer loop
+      vertex   1.000000e+00 -0.000000e+00  1.000010e-01
+      vertex  -1.000000e+00 -0.000000e+00  9.999900e-02
+      vertex  -1.000000e+00 -1.950900e-02  9.807800e-02
+    endloop
+  endfacet
+  facet normal -5.004912e-07 -9.804380e-02  9.951821e-01
+    outer loop
+      vertex  -1.000000e+00 -1.950900e-02  9.807800e-02
+      vertex   1.000000e+00 -1.950900e-02  9.807900e-02
+      vertex   1.000000e+00 -0.000000e+00  1.000010e-01
+    endloop
+  endfacet
+  facet normal -9.589596e-07 -2.902623e-01  9.569471e-01
+    outer loop
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+      vertex   1.000000e+00 -3.826800e-02  9.238900e-02
+      vertex   1.000000e+00 -1.950900e-02  9.807900e-02
+    endloop
+  endfacet
+  facet normal -4.812552e-07 -2.903089e-01  9.569330e-01
+    outer loop
+      vertex   1.000000e+00 -1.950900e-02  9.807900e-02
+      vertex  -1.000000e+00 -1.950900e-02  9.807800e-02
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00 -0.000000e+00  9.999900e-02
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+      vertex  -1.000000e+00 -1.950900e-02  9.807800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00 -1.950900e-02  9.807800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02  9.807800e-02
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00 -3.826800e-02  9.238700e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02  9.238700e-02
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00 -5.555700e-02  8.314600e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02  8.314600e-02
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00 -7.071100e-02  7.071000e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02  7.071000e-02
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00 -8.314700e-02  5.555600e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02  5.555600e-02
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00 -9.238800e-02  3.826800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02  3.826800e-02
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00 -9.807900e-02  1.950800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00 -0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02  1.950800e-02
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00 -1.000000e-01 -1.000000e-06
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  1.000000e-01 -1.000000e-06
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00 -9.807900e-02 -1.951000e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.807900e-02 -1.951000e-02
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00 -9.238800e-02 -3.826900e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  9.238800e-02 -3.826900e-02
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00 -8.314700e-02 -5.555800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  8.314700e-02 -5.555800e-02
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00 -7.071100e-02 -7.071100e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  7.071100e-02 -7.071100e-02
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00 -5.555700e-02 -8.314800e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  5.555700e-02 -8.314800e-02
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+      vertex  -1.000000e+00 -3.826800e-02 -9.238900e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00  0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  3.826800e-02 -9.238900e-02
+      vertex  -1.000000e+00  1.950900e-02 -9.807900e-02
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+    endloop
+  endfacet
+  facet normal -1.000000e+00 -0.000000e+00  0.000000e+00
+    outer loop
+      vertex  -1.000000e+00  1.950900e-02 -9.807900e-02
+      vertex  -1.000000e+00  0.000000e+00 -1.000010e-01
+      vertex  -1.000000e+00 -1.950900e-02 -9.807900e-02
+    endloop
+  endfacet
+endsolid vcg

=== added file 'examples/deformableelem/testDeformableBodies.py'
--- examples/deformableelem/testDeformableBodies.py	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/testDeformableBodies.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,151 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Created by Burak ER
+from yade.deformableelementsutils import *;
+
+O=Omega()
+
+## Create deformable elements internal materials and interaction element material
+
+mat=LinIsoRayleighDampElastMat(label='aluminiummaterial');
+
+intermat=LinCohesiveStiffPropDampElastMat(label='intermat')
+
+intermat.youngmodulus=70e11;
+
+mat.density=2700;
+
+mat.youngmodulus=70e9
+
+O.materials.append(intermat)
+
+O.materials.append(mat)
+
+## Generate deformable element mesh from GMSH2 format
+
+mesh=tetrahedral_mesh_generator('model.msh',Lin4NodeTetra,'aluminiummaterial',Lin4NodeTetra_Lin4NodeTetra_InteractionElement,'intermat')
+
+## Define the body boundary force
+
+# x position limits of bodies that are subject to the force
+force_tail_body_lowerlimit=-1.01;
+
+force_tail_body_upperlimit=-0.9999;
+
+# Angular frequency of the force
+amplitude=1000;
+
+period=(1e-4)
+
+omega=2*pi/period;
+
+applicationperiod=period/2;
+
+## Define the fixed boundary
+
+# x position limits of bodies that are subject to the fixed boundary
+
+fixed_tail_body_lowerlimit=0.99;
+
+fixed_tail_body_upperlimit=1.01;
+
+
+def getinitialpos():
+	positions=[];
+	for body in O.bodies:
+		positions.append(body.state.pos)
+	return positions
+
+def getboundarybodies():
+	bdy=[];
+	for body in O.bodies:
+			if(body.shape.dispIndex==12):
+				if(body.state.pos[0]<fixed_tail_body_upperlimit):
+					if(body.state.pos[0]>fixed_tail_body_lowerlimit):
+						bdy.append(body.id)
+	return bdy
+						
+def getforcebodies():
+	bdy=[];
+	for body in O.bodies:
+			if(body.shape.dispIndex==12):
+				if(body.state.pos[0]<force_tail_body_upperlimit):
+					if(body.state.pos[0]>force_tail_body_lowerlimit):
+						if(O.time<applicationperiod):
+							bdy.append(body.id)	
+	return bdy						
+
+initialpositions=getinitialpos();
+
+forcebodies=getforcebodies();
+
+boundarybodies=getboundarybodies();
+
+
+## definition of functions
+def fixboundaryelements():
+	for i in boundarybodies:
+		O.forces.addF(i,-O.forces.f(i))
+		O.forces.addT(i,-O.forces.m(i))
+
+def applyforcetoelements():
+	for i in forcebodies:
+		if(O.time<applicationperiod):
+#			print 'apply force @'+str(O.time)
+			O.forces.addF(i,-1*O.forces.f(i));
+	
+			O.forces.addF(i,Vector3(sin(omega*O.time)*amplitude,0,0));
+#			plot.addData(force=O.forces.f(i));
+
+def addplot():
+	 plot.addData(force=O.forces.f(forcebodies[1])[0],pos=(O.bodies[forcebodies[1]].state.pos[0]-initialpositions[forcebodies[1]][0]),vel=O.bodies[forcebodies[1]].state.vel[0],t=O.time,time=O.time,tm=O.time)
+		
+for i in forcebodies:
+	O.bodies[i].state.pos+=Vector3(0,0,0.05);
+
+## Adaptive integration engine initialization: we have given the engines in ordered, they are runned sequentally for every substep of the integrator
+
+#integratoreng=RungeKuttaCashKarp54Integrator([	## Resets forces and momenta the act on bodies
+#						ForceResetter(),	
+#						## Apply internal force to the deformable elements and internal force of the interaction element	 
+#						FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+#						PyRunner(virtPeriod=1e-99,command='applyforcetoelements()'),
+#
+#])
+# Integration tolerances of the RungeKuttaCashKarp54Integrator
+#~ 
+#~ integratoreng.rel_err=1e-6;
+#~ 
+#~ integratoreng.abs_err=1e-6;
+
+# We use only the integrator engine
+
+# Time step determines the exiting period of the integrator since the integrator performs one step from current_time to current_time+dt; using many substeps for any value of dt; then stops. 
+
+O.dt=1e-8;
+
+O.engines=[
+	    ForceResetter(),	
+	    ## Apply internal force to the deformable elements and internal force of the interaction element	 
+	    FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+	    PyRunner(iterPeriod=1,command='applyforcetoelements()'),
+	    NewtonIntegrator(damping=0,gravity=[0,0,0]),
+#	    ## Plotting data: adds plots after one step of the integrator engine
+	    PyRunner(iterPeriod=1,command='addplot()')
+
+
+];
+#Tolerances can be set for the optimum accuracy
+
+
+from yade import plot
+
+plot.plots={'t':'vel','time':'pos','tm':'force'}
+plot.plot(subPlots=True)
+
+try:
+	from yade import qt
+	qt.View()
+	qt.Controller()
+except ImportError: pass
+

=== added file 'examples/deformableelem/testDeformableBodies_pressure.py'
--- examples/deformableelem/testDeformableBodies_pressure.py	1970-01-01 00:00:00 +0000
+++ examples/deformableelem/testDeformableBodies_pressure.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,199 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Created by Burak ER
+
+#****** This is the test application of Longitudinal Wave propagation on Deformable Elements
+
+#****** The application is consisted of a free-fixed 1 meter rod having a miliseconds sinusoidal pressure applied on the one side.
+
+#****** The propagation of the wave is investigated.
+from yade.deformableelementsutils import *;
+
+O=Omega()
+
+## Create deformable elements internal materials and interaction element material
+
+mat=LinIsoRayleighDampElastMat(label='aluminiummaterial');# deformable body material
+
+intermat=LinCohesiveStiffPropDampElastMat(label='intermat') # deformable bodies interaction material
+
+intermat.youngmodulus=72800e6; #interaction material stiffness
+
+mat.density=2789; # deformable body density
+
+mat.youngmodulus=72800e7# deformable body youngs modulus
+
+O.materials.append(intermat)# add interaction material to list
+
+O.materials.append(mat)# add deformable body material to list
+
+## Generate and add deformable elements into scene using GMSH2 mesh: 
+
+# arg1 : mesh file
+# arg2 : deformable element type
+# arg3 : deformable element material
+# arg4 : interaction element type
+# arg5 : interaction element material
+modelmesh=tetrahedral_mesh_generator('model.msh',Lin4NodeTetra,'aluminiummaterial',Lin4NodeTetra_Lin4NodeTetra_InteractionElement,'intermat')
+
+## Define the body boundary force-> it is pressure applied on the one end of the rod
+
+# x position limits of bodies that are subject to the force
+force_tail_body_lowerlimit=-1.01;
+
+force_tail_body_upperlimit=-0.9999;
+
+# Pressure Properties
+
+#pressure=Vector3(1.5e6,0,0);
+
+pressure=Vector3(1.5e8,0,0);
+
+period=(3e-4)
+
+omega=2*pi/period;
+
+applicationperiod=period/2;
+
+# Displacement Properties(Displacement Application)
+
+boundary_displacement_vector=Vector3(0.3,0,0);
+
+## Define the fixed boundary
+
+# x position limits of bodies that are subject to the fixed boundary
+
+fixed_tail_body_lowerlimit=0.99;
+
+fixed_tail_body_upperlimit=1.01;
+
+
+def getinitialpos():
+	positions=[];
+	for body in O.bodies:
+		positions.append(body.state.pos)
+	return positions
+
+
+def getboundarybodies(mesh):
+    bdy = [];
+    listofbodies = dict();
+    listofboundarybodies = dict();
+    for body in mesh:
+        if (len(body) > 1):
+            listofbodies[body[0].id] = [];
+            for bdyy in body[1]:
+                if (bdyy.shape.dispIndex == 12):
+                    if (bdyy.state.pos[0] < fixed_tail_body_upperlimit):
+                        if (bdyy.state.pos[0] > fixed_tail_body_lowerlimit):
+                            listofbodies[body[0].id].append(bdyy);  #add node to boundary bodies of body
+                            if (listofbodies[body[0].id].index(
+                                    bdyy) == 2):  #if this body has three nodes of it on the boundary then add it to the traction force list.
+                                listofboundarybodies[body[0].id] = listofbodies[body[0].id];
+    return listofboundarybodies;
+
+
+def getforcebodies(mesh):
+    bdy = [];
+    listofbodies = dict();
+    listofboundarybodies = dict();
+    for body in mesh:
+        if(len(body) > 1):
+            listofbodies[body[0].id] = [];
+            for bdyy in body[1]:
+                if (bdyy.shape.dispIndex == 12):
+                    if (bdyy.state.pos[0] < force_tail_body_upperlimit):
+                        if (bdyy.state.pos[0] > force_tail_body_lowerlimit):
+                            listofbodies[body[0].id].append(bdyy);  #add node to boundary bodies of body
+                            if (listofbodies[body[0].id].index(
+                                    bdyy) == 2):  #if this body has three nodes of it on the boundary then add it to the traction force list.
+                                listofboundarybodies[body[0].id] = listofbodies[body[0].id];
+
+
+    return listofboundarybodies;
+
+initialpositions=getinitialpos();
+
+forcebodies=getforcebodies(modelmesh);
+
+boundarybodies=getboundarybodies(modelmesh);
+
+def displaceelements():
+	for deformablebody in forcebodies:
+		for node in forcebodies[deformablebody]:
+			if(O.time<applicationperiod):
+				O.bodies[node.id].state.pos=O.bodies[node.id].state.pos+boundary_displacement_vector*sin(omega*O.time);
+
+## definition of functions
+def fixboundaryelements():
+	for deformablebody in boundarybodies:
+		for node in boundarybodies[deformablebody]:
+			O.forces.addF(node.id,-O.forces.f(node.id))
+			O.forces.addT(node.id,-O.forces.m(node.id))
+
+def applyforcetoelements():
+
+	for deformablebody in forcebodies:
+		pos0=O.bodies[forcebodies[deformablebody][0].id].state.pos;
+		pos1=O.bodies[forcebodies[deformablebody][1].id].state.pos;
+		pos2=O.bodies[forcebodies[deformablebody][2].id].state.pos;
+		area=((pos1-pos0).cross(pos2-pos0)).norm();
+		
+		T=area*pressure;
+
+		for node in forcebodies[deformablebody]:
+			if(O.time<applicationperiod):
+				O.forces.addF(node.id,(T/3)*sin(omega*O.time));
+#		fixboundaryelements();
+
+def addplot():
+	forcenode=forcebodies[forcebodies.keys()[0]][0].id;
+	boundarynode=boundarybodies[boundarybodies.keys()[0]][0].id;
+	plot.addData(force=O.forces.f(forcenode)[0],pos=(O.bodies[forcenode].state.pos[0]-initialpositions[forcenode][0]),vel=O.bodies[forcenode].state.vel[0],postail=(O.bodies[boundarynode].state.pos[0]-initialpositions[boundarynode][0]),t=O.time,time=O.time,tm=O.time,tt=O.time)
+
+		
+
+
+## Adaptive integration engine initialization: we have given the engines in ordered, they are runned sequentally for every substep of the integrator
+
+integratoreng=RungeKuttaCashKarp54Integrator([	## Resets forces and momenta the act on bodies
+						ForceResetter(),	
+						## Apply internal force to the deformable elements and internal force of the interaction element	 
+						FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+						PyRunner(virtPeriod=1e-99,command='applyforcetoelements()'),
+
+])
+# Integration tolerances of the RungeKuttaCashKarp54Integrator
+
+integratoreng.rel_err=1e-3;
+
+integratoreng.abs_err=1e-3;
+
+# We use only the integrator engine
+
+# Time step determines the exiting period of the integrator since the integrator performs one step from current_time to current_time+dt;
+
+O.dt=1e-3;
+
+O.engines=[
+#		integratoreng,
+	    ForceResetter(),
+#	    ## Apply internal force to the deformable elements and internal force of the interaction element
+	    FEInternalForceEngine([If2_Lin4NodeTetra_LinIsoRayleighDampElast(),If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat()]),
+	    PyRunner(iterPeriod=1,command='applyforcetoelements()'),
+	    NewtonIntegrator(damping=0,gravity=[0,0,0]),
+#	    ## Plotting data: adds plots after one step of the integrator engine
+	    PyRunner(iterPeriod=1,command='addplot()')
+	  ]
+
+from yade import plot
+
+plot.plots={'t':'vel','time':'pos','tm':'force','tt':'postail'}
+plot.plot(subPlots=True)
+
+try:
+	from yade import qt
+	qt.View()
+	qt.Controller()
+except ImportError: pass
+

=== added directory 'pkg/dem/deformablecohesive'
=== added file 'pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.cpp'
--- pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,77 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#include <pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <pkg/common/Aabb.hpp>
+
+void Bo1_DeformableElement_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
+
+	DeformableElement* deformableElement = static_cast<DeformableElement*>(cm.get());
+
+	if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
+
+	Aabb* aabb=static_cast<Aabb*>(bv.get());
+
+	Vector3r min,max;
+	//Not sure this is the best of all possible algorithms, therefore, I think it can be improved
+	for (DeformableElement::NodeMap::iterator it = deformableElement->localmap.begin(); it != deformableElement->localmap.end(); it++)
+	{
+		if(it->first->state->pos(0)<min(0))
+		{
+			min(0)=it->first->state->pos(0);
+		}
+		if(it->first->state->pos(1)<min(1))
+		{
+			min(1)=it->first->state->pos(1);
+		}
+		if(it->first->state->pos(0)<min(2))
+		{
+			min(2)=it->first->state->pos(2);
+		}
+
+		if(it->first->state->pos(0)>max(0))
+		{
+			max(0)=it->first->state->pos(0);
+		}
+		if(it->first->state->pos(1)>max(1))
+		{
+			max(1)=it->first->state->pos(1);
+		}
+		if(it->first->state->pos(2)>max(2))
+		{
+			max(2)=it->first->state->pos(2);
+		}
+
+	}
+
+
+	aabb->min=min;
+	aabb->max=max;
+
+//	if(!scene->isPeriodic){
+//		aabb->min=se3.position-halfSize; aabb->max=se3.position+halfSize;
+//		return;
+//	}
+//	// adjust box size along axes so that DeformableElement doesn't stick out of the box even if sheared (i.e. parallelepiped)
+//	if(scene->cell->hasShear()) {
+//		Vector3r refHalfSize(halfSize);
+//		const Vector3r& cos=scene->cell->getCos();
+//		for(int i=0; i<3; i++){
+//			//cerr<<"cos["<<i<<"]"<<cos[i]<<" ";
+//			int i1=(i+1)%3,i2=(i+2)%3;
+//			halfSize[i1]+=.5*refHalfSize[i1]*(1/cos[i]-1);
+//			halfSize[i2]+=.5*refHalfSize[i2]*(1/cos[i]-1);
+//		}
+//	}
+//	//cerr<<" || "<<halfSize<<endl;
+//	aabb->min = scene->cell->unshearPt(se3.position)-halfSize;
+//	aabb->max = scene->cell->unshearPt(se3.position)+halfSize;
+}
+	
+YADE_PLUGIN((Bo1_DeformableElement_Aabb));

=== added file 'pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.hpp'
--- pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,26 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <pkg/common/Dispatching.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+
+class Bo1_DeformableElement_Aabb : public BoundFunctor
+{
+	public :
+		void go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r&, const Body*);
+	FUNCTOR1D(DeformableElement);
+	YADE_CLASS_BASE_DOC_ATTRS(Bo1_DeformableElement_Aabb,BoundFunctor,"Functor creating :yref:`Aabb` from :yref:`DeformableElement`.",
+		((Real,aabbEnlargeFactor,((void)"deactivated",-1),,"Relative enlargement of the bounding box; deactivated if negative.\n\n.. note::\n\tThis attribute is used to create distant interaction, but is only meaningful with an :yref:`IGeomFunctor` which will not simply discard such interactions: :yref:`Ig2_Sphere_Sphere_ScGeom::interactionDetectionFactor` should have the same value as :yref:`aabbEnlargeFactor<Bo1_Sphere_Aabb::aabbEnlargeFactor>`."))
+	);
+};
+
+REGISTER_SERIALIZABLE(Bo1_DeformableElement_Aabb);
+
+

=== added file 'pkg/dem/deformablecohesive/Bo1_Node_Aabb.cpp'
--- pkg/dem/deformablecohesive/Bo1_Node_Aabb.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Bo1_Node_Aabb.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,38 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#include <pkg/dem/deformablecohesive/Bo1_Node_Aabb.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+#include <pkg/common/Aabb.hpp>
+
+void Bo1_Node_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
+	Node* node = static_cast<Node*>(cm.get());
+	if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
+	Aabb* aabb=static_cast<Aabb*>(bv.get());
+	Vector3r halfSize = (aabbEnlargeFactor>0?aabbEnlargeFactor:1.)*Vector3r(node->radius,node->radius,node->radius);
+	if(!scene->isPeriodic){
+		aabb->min=se3.position-halfSize; aabb->max=se3.position+halfSize;
+		return;
+	}
+	// adjust box size along axes so that Node doesn't stick out of the box even if sheared (i.e. parallelepiped)
+	if(scene->cell->hasShear()) {
+		Vector3r refHalfSize(halfSize);
+		const Vector3r& cos=scene->cell->getCos();
+		for(int i=0; i<3; i++){
+			//cerr<<"cos["<<i<<"]"<<cos[i]<<" ";
+			int i1=(i+1)%3,i2=(i+2)%3;
+			halfSize[i1]+=.5*refHalfSize[i1]*(1/cos[i]-1);
+			halfSize[i2]+=.5*refHalfSize[i2]*(1/cos[i]-1);
+		}
+	}
+	//cerr<<" || "<<halfSize<<endl;
+	aabb->min = scene->cell->unshearPt(se3.position)-halfSize;
+	aabb->max = scene->cell->unshearPt(se3.position)+halfSize;
+}
+	
+YADE_PLUGIN((Bo1_Node_Aabb));

=== added file 'pkg/dem/deformablecohesive/Bo1_Node_Aabb.hpp'
--- pkg/dem/deformablecohesive/Bo1_Node_Aabb.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Bo1_Node_Aabb.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,26 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <pkg/common/Dispatching.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+
+class Bo1_Node_Aabb : public BoundFunctor
+{
+	public :
+		void go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r&, const Body*);
+	FUNCTOR1D(Node);
+	YADE_CLASS_BASE_DOC_ATTRS(Bo1_Node_Aabb,BoundFunctor,"Functor creating :yref:`Aabb` from :yref:`Node`.",
+		((Real,aabbEnlargeFactor,((void)"deactivated",-1),,"Relative enlargement of the bounding box; deactivated if negative.\n\n.. note::\n\tThis attribute is used to create distant interaction, but is only meaningful with an :yref:`IGeomFunctor` which will not simply discard such interactions: :yref:`Ig2_Sphere_Sphere_ScGeom::interactionDetectionFactor` should have the same value as :yref:`aabbEnlargeFactor<Bo1_Sphere_Aabb::aabbEnlargeFactor>`."))
+	);
+};
+
+REGISTER_SERIALIZABLE(Bo1_Node_Aabb);
+
+

=== added file 'pkg/dem/deformablecohesive/CohesiveMat.cpp'
--- pkg/dem/deformablecohesive/CohesiveMat.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/CohesiveMat.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,14 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/CohesiveMat.hpp>
+YADE_PLUGIN((CohesiveDeformableElementMaterial)(LinCohesiveElasticMaterial)(LinCohesiveStiffPropDampElastMat));
+
+CohesiveDeformableElementMaterial::~CohesiveDeformableElementMaterial(void){}
+LinCohesiveElasticMaterial::~LinCohesiveElasticMaterial(void){}
+LinCohesiveStiffPropDampElastMat::~LinCohesiveStiffPropDampElastMat(void){}
+

=== added file 'pkg/dem/deformablecohesive/CohesiveMat.hpp'
--- pkg/dem/deformablecohesive/CohesiveMat.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/CohesiveMat.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,48 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#pragma once
+#include <core/Material.hpp>
+#include <limits>
+/*! Elastic material */
+class CohesiveDeformableElementMaterial: public Material{
+	public:
+	virtual ~CohesiveDeformableElementMaterial();
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CohesiveDeformableElementMaterial,Material,"Deformable Element Material.",
+	//	((Real,density,1,,"Density of the material."))
+			,
+		/*ctor*/ createIndex();
+	);
+	REGISTER_CLASS_INDEX(CohesiveDeformableElementMaterial,Material);
+};
+REGISTER_SERIALIZABLE(CohesiveDeformableElementMaterial);
+
+class LinCohesiveElasticMaterial: public CohesiveDeformableElementMaterial{
+	public:
+	virtual ~LinCohesiveElasticMaterial();
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(LinCohesiveElasticMaterial,CohesiveDeformableElementMaterial,"Linear Isotropic Elastic material",
+			((Real,youngmodulus,.78e5,,"Young's modulus. Initially aluminium."))
+			((Real,poissonratio,.33,,"Poisson ratio. Initially aluminium.")),
+			createIndex();
+		);
+		REGISTER_CLASS_INDEX(LinCohesiveElasticMaterial,CohesiveDeformableElementMaterial);
+};
+REGISTER_SERIALIZABLE(LinCohesiveElasticMaterial);
+
+
+/*Stiffness proportional damping material*/
+class LinCohesiveStiffPropDampElastMat: public LinCohesiveElasticMaterial{
+	public:
+	virtual ~LinCohesiveStiffPropDampElastMat();
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(LinCohesiveStiffPropDampElastMat,LinCohesiveElasticMaterial,"Elastic material with Rayleigh Damping.",
+		((Real,alpha,0,,"Mass propotional damping constant of Rayleigh Damping."))
+		((Real,beta,0,,"Stiffness propotional damping constant of Rayleigh Damping.")),
+		createIndex();
+	);
+	REGISTER_CLASS_INDEX(LinCohesiveStiffPropDampElastMat,LinCohesiveElasticMaterial);
+};
+REGISTER_SERIALIZABLE(LinCohesiveStiffPropDampElastMat);

=== added file 'pkg/dem/deformablecohesive/DeformableCohesiveElement.cpp'
--- pkg/dem/deformablecohesive/DeformableCohesiveElement.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/DeformableCohesiveElement.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,54 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <algorithm>
+#include <core/Scene.hpp>
+#include <pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp>
+#include <core/BodyContainer.hpp>
+#include <core/State.hpp>
+#include <pkg/common/Sphere.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+#include <lib/base/Math.hpp>
+
+DeformableCohesiveElement::~DeformableCohesiveElement(){
+
+}
+YADE_PLUGIN((DeformableCohesiveElement));
+CREATE_LOGGER(DeformableCohesiveElement);
+void DeformableCohesiveElement::addPair(const shared_ptr<Body>& nodeBody1,const shared_ptr<Body>& nodeBody2)
+{
+
+
+	const shared_ptr<Node> node1=YADE_PTR_CAST<Node>(nodeBody1->shape);//Should be checked dynamically otherwise it will always cast: every shape is castable to Node shape
+	const shared_ptr<Node> node2=YADE_PTR_CAST<Node>(nodeBody2->shape);//Should be checked dynamically otherwise it will always cast: every shape is castable to Node shape
+
+	Body::id_t subId1=nodeBody1->getId();
+	Body::id_t subId2=nodeBody2->getId();
+
+	if(node1||node2){} else{ throw std::invalid_argument(("One of the nodes that is given is not a Node therefore cannot be added to the cohesive deformable element "));}
+
+	if(subId1<0||subId2<0){throw std::invalid_argument(("One of the node that is given is not a member of the scene therefore it has no state, not adding exiting"));}
+
+	if(this->localmap.count(nodeBody1)!=0) throw std::invalid_argument(("Node that has Body id #"+boost::lexical_cast<string>(subId1)+" is already part of this cohesive deformable element"));
+	if(this->localmap.count(nodeBody2)!=0) throw std::invalid_argument(("Node that has Body id #"+boost::lexical_cast<string>(subId2)+" is already part of this cohesive deformable element"));
+
+	nodepair pair;
+	pair.node1=nodeBody1;
+	pair.node2=nodeBody2;
+	this->nodepairs[pair]=Se3r();
+	// Add body to localmap
+	this->nodepairs[pair].position=nodeBody1->state->pos-nodeBody2->state->pos;// Initial difference on positions
+
+	return;
+
+}
+void DeformableCohesiveElement::delPair(const shared_ptr<Body>& node1,const shared_ptr<Body>& node2)
+{
+	// erase the subBody; removing body that is not part of the element throws
+//	if(this->localmap.erase(subBody)!=1) throw std::invalid_argument(("Node #"+boost::lexical_cast<string>(subBody->id)+" not a part of the deformable element, not removing...").c_str());
+//	LOG_DEBUG("Removed node #"<<subBody->id);
+}

=== added file 'pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp'
--- pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,82 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <core/Body.hpp>
+#include <core/PartialEngine.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <lib/base/Logging.hpp>
+#include <lib/base/Math.hpp>
+
+//#include <yade/trunk/pkg/dem/deformablecohesive/Node.hpp> //Node shape
+
+/* Before starting the implementation of the deformable element, I am really dissappointed that deformableelement's algorithm relies on its shape.
+Shape means "shape" and I think it should not contain any other physical meaning or anything else.
+
+With respect to this view; The deformable element class is derived from the body and knows the information of 
+its members that are node shaped bodies.
+
+*/
+
+//class NewtonIntegrator;
+
+class DeformableCohesiveElement: public DeformableElement {
+	public:
+
+		struct nodepair:public Serializable{
+				public:
+
+				YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(nodepair,Serializable,"Geometry of a body",
+						((shared_ptr<Body>,node1,,,"Node1 of node pair"))
+						((shared_ptr<Body>,node2,,,"Node2 of node pair")),
+						/*ctor*/,
+						/*py*/
+					);
+
+				// Comparison operator for table sorting.
+				bool operator<(const nodepair& param) const
+				{
+				    if (node1.get() < param.node1.get()) return true;
+				    if (node1.get() > param.node1.get()) return false;
+				    if (node2.get() < param.node2.get()) return true;
+				    if (node2.get() > param.node2.get()) return false;
+				}
+			};
+
+		typedef std::map<nodepair,Se3r> NodePairsMap;//Initial node differences
+		typedef std::map<Vector3r,Se3r> localTriad;//Updated on every step
+		unsigned int max_pair;
+		Matrix calculateStiffness(Real, Real ,Vector3r,Vector3r,Vector3r,Vector3r);
+		Matrix calculateMassMatrix(Real, Real);
+		virtual ~DeformableCohesiveElement();
+		void initialize(void){max_pair=3;}
+
+		void addPair(const shared_ptr<Body>& node1,const shared_ptr<Body>& node2);
+		void delPair(const shared_ptr<Body>& node1,const shared_ptr<Body>& node2);
+
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DeformableCohesiveElement,DeformableElement,"Tetrahedral Deformable Element Composed of Nodes",
+		((NodePairsMap,nodepairs,,,"Ids and relative position+orientation difference of members of the cohesive deformable element in the inital condition (should not be accessed directly)"))
+		,
+		,
+		createIndex(); /*ctor*/
+		initialize();
+		,
+		/*py*/
+		.def("addPair",&DeformableCohesiveElement::addPair,"Add a node shared_pt<:yref:'Body'>& as into the element")
+		.def("removePair",&DeformableCohesiveElement::delPair,"Add a node shared_pt<:yref:'Body'>& as into the element")
+	);
+		DECLARE_LOGGER;
+
+		REGISTER_CLASS_INDEX(DeformableCohesiveElement,DeformableElement);
+
+};
+
+// necessary
+using namespace yade;
+REGISTER_SERIALIZABLE(DeformableCohesiveElement);

=== added file 'pkg/dem/deformablecohesive/DeformableElement.cpp'
--- pkg/dem/deformablecohesive/DeformableElement.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/DeformableElement.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,103 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <algorithm>
+#include <core/Scene.hpp>
+#include <core/BodyContainer.hpp>
+#include <core/State.hpp>
+#include <pkg/common/Sphere.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+#include <string.h>
+#include <boost/lexical_cast.hpp>
+
+DeformableElement::~DeformableElement(){
+
+}
+YADE_PLUGIN((DeformableElement));
+
+boost::python::dict DeformableElement::localmap_get(){
+	boost::python::dict ret;
+	FOREACH(NodeMap::value_type& b, localmap){
+		ret[b.first]=boost::python::make_tuple(b.second.position,b.second.orientation);
+	}
+	return ret;
+}
+void DeformableElement::addFace(Vector3r& indexes){
+
+	faces.push_back(indexes);
+
+}
+//std::vector<Vector3r> DeformableElement::getDisplacements(void)
+//{
+//
+//}
+shared_ptr<Body>  DeformableElement::getNode(int id){
+
+	   NodeMap::iterator i1(this->localmap.begin());
+	   std::advance(i1,id);
+	   return i1->first;
+
+}
+
+void DeformableElement::removeLastFace(void){
+
+	faces.pop_back();
+
+}
+
+void DeformableElement::addNode(const shared_ptr<Body>& nodeBody){
+
+
+	if(this->localmap.size()==maxNodeCount)
+	{
+		std::string errormessage ="This element cannot hold more than"+ boost::lexical_cast<std::string>(maxNodeCount);
+		throw std::out_of_range(errormessage);
+		return;
+	}
+	const shared_ptr<Node> node=YADE_PTR_CAST<Node>(nodeBody->shape);//Should be checked dynamically otherwise it will always cast: every shape is castable to Node shape
+
+	Body::id_t subId=nodeBody->getId();
+
+	if(node){} else{ throw std::invalid_argument(("The body that is given #"+boost::lexical_cast<string>(subId)+" is not a Node therefore cannot be added to the deformable element "));}
+	
+	if(subId<0){throw std::invalid_argument(("The Node that is given is not a member of the scene therefore it has no state, not adding exiting"));}
+
+	if(this->localmap.count(nodeBody)!=0) throw std::invalid_argument(("Node that has Body id #"+boost::lexical_cast<string>(subId)+" is already part of this deformable element"));
+
+	// Add body to localmap
+	this->localmap[nodeBody]=Se3r();// meaningful values will be put in by DeformableElement::updateProperties
+
+	// Get first node
+	//Scene* scene(Omega::instance().getScene().get());	// get scene
+	//const shared_ptr<Body>& member=localmap.begin()->first;
+	
+	//Substract from the current node, therefore find the local value,
+	localmap[nodeBody].position=nodeBody->state->pos;
+
+
+	//cout<<"Local map of "<<subId<<" is ="<<localmap[subId].position;
+	//localmap[subId].orientation=nodeBody->state->ori;
+
+	//this->setBounded(false); // disallow collisions with the element itself
+
+	//If we have more than three nodes define a local triad that is clumped on the first node and initially parallel to the global frame
+	if(this->localmap.size()>=3)
+	{	
+		//define a local triad if needed		
+	}		
+
+	return;
+}
+
+void DeformableElement::delNode(const shared_ptr<Body>& subBody){
+	// erase the subBody; removing body that is not part of the element throws
+	if(this->localmap.erase(subBody)!=1) throw std::invalid_argument(("Node #"+boost::lexical_cast<string>(subBody->id)+" not a part of the deformable element, not removing...").c_str());
+	LOG_DEBUG("Removed node #"<<subBody->id);
+}
+
+

=== added file 'pkg/dem/deformablecohesive/DeformableElement.hpp'
--- pkg/dem/deformablecohesive/DeformableElement.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/DeformableElement.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,92 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <core/Body.hpp>
+#include <core/PartialEngine.hpp>
+#include <core/Shape.hpp>
+#include <lib/base/Logging.hpp>
+#include <lib/base/Math.hpp>
+
+//#include <yade/trunk/pkg/dem/deformablecohesive/Node.hpp> //Node shape
+
+/* Before starting the implementation of the deformable element, I am really dissappointed that deformableelement's algorithm relies on its shape.
+Shape means "shape" and I think it should not contain any other physical meaning or anything else.
+
+With respect to this view; The deformable element class is derived from the body and knows the information of 
+its members that are node shaped bodies.
+
+*/
+
+class NewtonIntegrator;
+class InternalForceFunctor;
+namespace yade{
+typedef Eigen::MatrixXd Matrix;
+
+class DeformableElement: public Shape {
+	public:
+
+		typedef std::map<shared_ptr<Body>,Se3r> NodeMap;//Node id's with initial positions first node is selected as the reference node
+		typedef std::vector<Vector3r> Triangles; // Used for drawing the element
+
+		unsigned int maxNodeCount;//Maximum number of nodes of this element
+		Se3r referenceCoord;//Reference node position in global coordinates
+
+		virtual ~DeformableElement();
+		void addNode(const shared_ptr<Body>& subBody);
+		shared_ptr<Body> getNode(int id);
+
+		void delNode(const shared_ptr<Body>& subBody);
+		std::vector<Vector3r> getDisplacements(void);
+
+		void addFace(Vector3r&);
+		void removeLastFace(void);
+		//! Recalculate physical properties of DeformableElement.
+		//virtual void getMassMatrix()=0;
+
+		Se3r frame_get() const
+		{
+			const shared_ptr<Body>& member=localmap.begin()->first;
+			return member->state->se3;
+		}
+
+		void frame_set(Se3r) const
+		{
+			return;
+		}
+
+		boost::python::dict localmap_get();
+
+		virtual Real getVolume(){return -1;}
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DeformableElement,Shape,"Deformable aggregate of nodes",
+		((NodeMap,localmap,,,"Ids and relative positions+orientations of members of the deformable element (should not be accessed directly)"))
+		((Se3r,elementframe,,,"Position and orientation of the element frame"))
+		((Triangles,faces,,,"Faces of the element for drawing"))
+		,
+		,
+		createIndex(); /*ctor*/
+		//init();
+		,
+		/*py*/
+		.add_property("elementframe",&DeformableElement::frame_get)
+		.def("addNode",&DeformableElement::addNode,"Add a node shared_pt<:yref:'Body'>& as into the element")
+		.def("getNode",&DeformableElement::getNode,"Get a node shared_pt<:yref:'Body'>& as into the element")
+		.def("delNode",&DeformableElement::delNode,"Remove a node shared_pt<:yref:'Body'>& from the element")
+		.def("addFace",&DeformableElement::addFace,"Add a face into the element")
+		.def("removeLastFace",&DeformableElement::removeLastFace,"Remove a face from the element")
+		.def("getVolume",&DeformableElement::getVolume,"Get volume of the element")
+
+	);
+	REGISTER_CLASS_INDEX(DeformableElement,Shape);
+
+};
+}
+// necessary
+using namespace yade;
+REGISTER_SERIALIZABLE(DeformableElement);

=== added file 'pkg/dem/deformablecohesive/FEInternalForceDispatchers.cpp'
--- pkg/dem/deformablecohesive/FEInternalForceDispatchers.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/FEInternalForceDispatchers.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,35 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp>
+YADE_PLUGIN((InternalForceFunctor)(InternalForceDispatcher));
+InternalForceFunctor::~InternalForceFunctor(){};
+
+
+/********************************************************************
+                      InternalForceDispatcher
+*********************************************************************/
+
+CREATE_LOGGER(InternalForceDispatcher);
+void InternalForceDispatcher::action()
+{
+	//There is no need to make an action for this dispatcher its main misson is to return functors for the shape that is given.
+}
+//void InternalForceDispatcher::explicitAction(const shared_ptr<DeformableElement> deformableelement,const Body* bdy){
+//
+//	updateScenePtr();
+//	shared_ptr<DeformableElement> deformableElement=deformableelement;
+//	if(!deformableElement->functorCache.iff){
+//		deformableElement->functorCache.iff=getFunctor1D(deformableElement);
+//		if(!deformableElement->functorCache.iff) throw invalid_argument("InternalForceDispatcher::explicitAction did not find a suitable dispatch for type"+deformableElement->getClassName());
+//		deformableElement->functorCache.iff->go(deformableElement,bdy);
+//	}
+//
+//
+//}
+

=== added file 'pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp'
--- pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,50 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER  burak.er@xxxxxxxxxx                   *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#pragma once
+#include <core/Shape.hpp>
+#include <lib/base/Math.hpp>
+#include <core/Interaction.hpp>
+#include <core/Scene.hpp>
+#include <core/State.hpp>
+#include <core/Shape.hpp>
+#include <core/IGeom.hpp>
+#include <core/IPhys.hpp>
+#include <core/Functor.hpp>
+#include <core/Dispatcher.hpp>
+#include <pkg/common/Aabb.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+
+
+/*Functor of Internal Force Calculation*/
+
+class InternalForceFunctor: public Functor2D<
+	/*dispatch types*/ Shape,
+					   Material,
+	/*return type*/    void ,
+	/*argument types*/ TYPELIST_3(const shared_ptr<Shape>&,const shared_ptr<Material>&,const shared_ptr<Body>&)
+>{
+	public: virtual ~InternalForceFunctor();
+	YADE_CLASS_BASE_DOC(InternalForceFunctor,Functor,"Functor for creating/updating :yref:`Body::bound`.");
+};
+REGISTER_SERIALIZABLE(InternalForceFunctor);
+
+/*Dispatcher of Internal Force Functors*/
+class InternalForceDispatcher: public Dispatcher2D<
+	/* functor type*/ InternalForceFunctor
+>{
+	public:
+		virtual void action();
+	//	void explicitAction(const shared_ptr<DeformableElement>& deformableelement,const Body* bdy);
+
+		//virtual bool isActivated(){ return activated; }
+	DECLARE_LOGGER;
+	YADE_DISPATCHER2D_FUNCTOR_DOC_ATTRS_CTOR_PY(InternalForceDispatcher,InternalForceFunctor,/*doc is optional*/,/*attrs*/,/*ctor*/,/*py*/);
+};
+REGISTER_SERIALIZABLE(InternalForceDispatcher);
+

=== added file 'pkg/dem/deformablecohesive/FEInternalForceEngine.cpp'
--- pkg/dem/deformablecohesive/FEInternalForceEngine.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/FEInternalForceEngine.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,90 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceEngine.hpp>
+
+YADE_PLUGIN((FEInternalForceEngine));
+CREATE_LOGGER(FEInternalForceEngine);
+
+void FEInternalForceEngine::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
+	cout<<"Entered the initialization function";
+	if(boost::python::len(t)==0) return; // nothing to do
+
+	if(boost::python::len(t)!=1) throw invalid_argument("At least 1 functors must be given");
+
+
+
+	boost::python::list vv=boost::python::extract<boost::python::list>(t[0])();
+
+//	FOREACH(shared_ptr<InternalForceFunctor> iff, vv) this->internalforcedispatcher->add(iff);
+
+	for( int i=0;i<len(vv);i++) this->internalforcedispatcher->add(boost::python::extract<shared_ptr<InternalForceFunctor>>(vv[i]));
+	
+
+	t=boost::python::tuple(); // empty the args; not sure if this is OK, as there is some refcounting in raw_constructor code
+	cout<<"Added to the list";
+}
+
+
+void FEInternalForceEngine::action(){
+
+	// update Scene* of the dispatcher
+	internalforcedispatcher->scene=scene;
+	// ask dispatcher to update Scene* of their functors
+	internalforcedispatcher->updateScenePtr();
+
+	// call InternalForceFunctor::preStep
+	//FOREACH(const shared_ptr<InternalForceFunctor>& iff, internalforcedispatcher->functors) iff->preStep();
+
+	/*
+		initialize callbacks; they return pointer (used only in this timestep) to the function to be called
+		returning NULL deactivates the callback in this timestep
+	*/
+//	// pair of callback object and pointer to the function to be called
+//	vector<IntrCallback::FuncPtr> callbackPtrs;
+//	FOREACH(const shared_ptr<IntrCallback> cb, callbacks){
+//		cb->scene=scene;
+//		callbackPtrs.push_back(cb->stepInit());
+//	}
+//	assert(callbackPtrs.size()==callbacks.size());
+//	size_t callbacksSize=callbacks.size();
+
+	// cache transformed cell size
+	//	Matrix3r cellHsize; if(scene->isPeriodic) cellHsize=scene->cell->hSize;
+
+
+	#ifdef YADE_OPENMP
+	const long size=scene->bodies->size();
+	#pragma omp parallel for schedule(guided) num_threads(ompThreads>0 ? ompThreads : omp_get_max_threads())
+	for(long i=0; i<size; i++){
+		shared_ptr<Body>& bdy=(*scene->bodies)[i];
+	#else
+	FOREACH(const shared_ptr<Body>& bdy, *scene->bodies){
+	#endif
+
+			//Try to get internal functor
+			if(bdy->shape->internalforcefunctor.get()==0) {
+				//If there isn't any internalforcefunctor; try to get one
+				bdy->shape->internalforcefunctor=internalforcedispatcher->getFunctor(bdy->shape,bdy->material);
+				//İf we found any of them that is suitable to this element???
+				if(bdy->shape->internalforcefunctor!=0){
+					//If yes try to apply internal force functor
+					shared_ptr<DeformableElement> deformableElement=YADE_PTR_CAST<DeformableElement>(bdy->shape);
+					bdy->shape->internalforcefunctor->go(deformableElement,bdy->material,bdy);
+				}
+			}
+			else{
+				//Take functor from cache and call it's go functor
+				shared_ptr<DeformableElement> deformableElement=YADE_PTR_CAST<DeformableElement>(bdy->shape);
+				bdy->shape->internalforcefunctor->go(deformableElement,bdy->material,bdy);
+			}
+
+	}
+}

=== added file 'pkg/dem/deformablecohesive/FEInternalForceEngine.hpp'
--- pkg/dem/deformablecohesive/FEInternalForceEngine.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/FEInternalForceEngine.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,42 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER  burak.er@xxxxxxxxxx                	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#pragma once
+#include <core/GlobalEngine.hpp>
+#include <pkg/common/Callbacks.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp>
+
+#ifdef USE_TIMING_DELTAS
+	#define TIMING_DELTAS_CHECKPOINT(cpt) timingDeltas->checkpoint(cpt)
+	#define TIMING_DELTAS_START() timingDeltas->start()
+#else
+	#define TIMING_DELTAS_CHECKPOINT(cpt)
+	#define TIMING_DELTAS_START()
+#endif
+
+class FEInternalForceEngine: public GlobalEngine {
+
+//	#ifdef YADE_OPENMP
+//		std::vector<std::list<idPair> > eraseAfterLoopIds;
+//		void eraseAfterLoop(Body::id_t id1,Body::id_t id2){ eraseAfterLoopIds[omp_get_thread_num()].push_back(idPair(id1,id2)); }
+//	#else
+//		list<idPair> eraseAfterLoopIds;
+//		void eraseAfterLoop(Body::id_t id1,Body::id_t id2){ eraseAfterLoopIds.push_back(idPair(id1,id2)); }
+//	#endif
+	public:
+		virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);
+		virtual void action();
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(FEInternalForceEngine,GlobalEngine,"Unified dispatcher for handling Finite Element internal force loop at every step, for parallel performance reasons.\n\n.. admonition:: Special constructor\n\n\tConstructs from 3 lists of :yref:`Ig2<IGeomFunctor>`, :yref:`Ip2<IPhysFunctor>`, :yref:`Law<LawFunctor>` functors respectively; they will be passed to interal dispatchers, which you might retrieve.",
+			((shared_ptr<InternalForceDispatcher>,internalforcedispatcher,new InternalForceDispatcher,Attr::readonly,":yref:`InternalForceDispatcher` object that is used for dispatching of element types."))
+			,
+			/*ctor*/
+			,
+			/*py*/
+		);
+		DECLARE_LOGGER;
+};
+REGISTER_SERIALIZABLE(FEInternalForceEngine);

=== added file 'pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp'
--- pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,98 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#ifdef YADE_OPENGL
+
+#include <pkg/dem/deformablecohesive/Gl1_DeformableElement.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <lib/opengl/OpenGLWrapper.hpp>
+
+typedef DeformableElement::NodeMap NodeMap;
+void Gl1_DeformableElement::go(const shared_ptr<Shape>& cm, const shared_ptr<State>& ,bool wire,const GLViewInfo&)
+{   
+	    DeformableElement* element = static_cast<DeformableElement*>(cm.get());
+	    std::vector<Vector3r> triangles = element->faces;
+
+
+		if(!(cm->wire || wire)){
+			glDisable(GL_CULL_FACE);
+			//Vector3r normal=(facet->vertices[1]-facet->vertices[0]).cross(facet->vertices[2]-facet->vertices[1]); normal.normalize();
+			glColor3v(cm->color);
+			glBegin(GL_TRIANGLES);
+
+			FOREACH(Vector3r vertices,triangles){
+				   NodeMap::iterator i1(element->localmap.begin());
+				   NodeMap::iterator i2(i1);
+				   NodeMap::iterator i3(i1);
+				   NodeMap::iterator i4(i1);
+
+				   //Find the opposite vertex total indice sum equals to six therefore the last one is going to be 6-sum of indices
+				   // I accept it is very uncommon
+				   int oppositevertexindex=6-vertices.sum();
+
+				   std::advance(i1,vertices[0]);
+				   std::advance(i2,vertices[1]);
+				   std::advance(i3,vertices[2]);
+				   std::advance(i4,oppositevertexindex);
+
+				   const shared_ptr<Body>& member1=i1->first;
+				   const shared_ptr<Body>& member2=i2->first;
+				   const shared_ptr<Body>& member3=i3->first;
+
+				   Vector3r& vertex0=i1->first->state->pos;
+				   Vector3r& vertex1=i2->first->state->pos;
+				   Vector3r& vertex2=i3->first->state->pos;
+				   Vector3r& vertex3=i4->first->state->pos;
+
+   				   Vector3r normal=(vertex1-vertex0).cross(vertex2-vertex0);
+				   normal.normalize();	
+
+			   	   if((vertex3-vertex0).dot(normal)>0)
+        				   normal=-normal;
+
+
+				   glNormal3v(normal); // this makes every triangle different WRT the light   
+				   glVertex3v(member1->state->pos);
+      				   glVertex3v(member2->state->pos);
+				   glVertex3v(member3->state->pos);
+
+			}
+		 }
+			glEnd();
+
+			glBegin(GL_LINE_LOOP);
+			glColor3v(Vector3r(0,0,0));
+			FOREACH(Vector3r vertices,triangles){
+				   
+                                 NodeMap::iterator i1(element->localmap.begin());
+                                 NodeMap::iterator i2(i1);
+                                 NodeMap::iterator i3(i1);
+
+                                 std::advance(i1,vertices[0]);
+                                 std::advance(i2,vertices[1]);
+                                 std::advance(i3,vertices[2]);
+
+                                 const shared_ptr<Body>& member1=i1->first;
+                                 const shared_ptr<Body>& member2=i2->first;
+                                 const shared_ptr<Body>& member3=i3->first;
+
+
+                                 glVertex3v(member1->state->pos);
+                                 glVertex3v(member2->state->pos);
+                                 glVertex3v(member3->state->pos);
+
+
+
+			}
+
+			glEnd();
+
+}
+
+YADE_PLUGIN((Gl1_DeformableElement));
+
+#endif /* YADE_OPENGL */

=== added file 'pkg/dem/deformablecohesive/Gl1_DeformableElement.hpp'
--- pkg/dem/deformablecohesive/Gl1_DeformableElement.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Gl1_DeformableElement.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,24 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#pragma once
+
+#include <pkg/common/GLDrawFunctors.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+
+class Gl1_DeformableElement : public GlShapeFunctor
+{	
+	public:
+		virtual void go(const shared_ptr<Shape>&, const shared_ptr<State>&,bool,const GLViewInfo&);
+		YADE_CLASS_BASE_DOC(Gl1_DeformableElement,GlShapeFunctor,"Renders :yref:`Node` object"
+		);
+	RENDERS(DeformableElement);
+};
+
+REGISTER_SERIALIZABLE(Gl1_DeformableElement);
+
+

=== added file 'pkg/dem/deformablecohesive/Gl1_Node.cpp'
--- pkg/dem/deformablecohesive/Gl1_Node.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Gl1_Node.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,182 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER    burak.er@xxxxxxxxxx              	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#ifdef YADE_OPENGL
+
+
+#include <pkg/dem/deformablecohesive/Gl1_Node.hpp>
+#include <lib/opengl/OpenGLWrapper.hpp>
+#include <pkg/common/Sphere.hpp>
+bool Gl1_Node::wire;
+bool Gl1_Node::stripes;
+int  Gl1_Node::glutSlices;
+int  Gl1_Node::glutStacks;
+Real  Gl1_Node::quality;
+bool  Gl1_Node::localSpecView;
+vector<Vector3r> Gl1_Node::vertices, Gl1_Node::faces;
+int Gl1_Node::glStripedSphereList=-1;
+int Gl1_Node::glGlutSphereList=-1;
+Real  Gl1_Node::prevQuality=0;
+
+void Gl1_Node::go(const shared_ptr<Shape>& cm, const shared_ptr<State>& ,bool wire2, const GLViewInfo&)
+{
+	glClearDepth(1.0f);
+	glEnable(GL_NORMALIZE);
+
+	Real r=(static_cast<Sphere*>(cm.get()))->radius;
+	glColor3v(cm->color);
+	if (wire || wire2) glutWireSphere(r,quality*glutSlices,quality*glutStacks);
+	else {
+		//Check if quality has been modified or if previous lists are invalidated (e.g. by creating a new qt view), then regenerate lists
+		bool somethingChanged = (abs(quality-prevQuality)>0.001 || glIsList(glStripedSphereList)!=GL_TRUE);
+		if (somethingChanged) {initStripedGlList(); initGlutGlList(); prevQuality=quality;}
+		glScalef(r,r,r);
+		if(stripes) glCallList(glStripedSphereList);
+		else glCallList(glGlutSphereList);
+	}
+	return;
+}
+YADE_PLUGIN((Gl1_Node));
+
+void Gl1_Node::subdivideTriangle(Vector3r& v1,Vector3r& v2,Vector3r& v3, int depth){
+	Vector3r v;
+	//Change color only at the appropriate level, i.e. 8 times in total, since we draw 8 mono-color sectors one after another
+	if (depth==int(quality) || quality<=0){
+		v = (v1+v2+v3)/3.0;
+		GLfloat matEmit[4];
+		if (v[1]*v[0]*v[2]>0){
+			matEmit[0] = 0.3;
+			matEmit[1] = 0.3;
+			matEmit[2] = 0.3;
+			matEmit[3] = 1.f;
+		}else{
+			matEmit[0] = 0.15;
+			matEmit[1] = 0.15;
+			matEmit[2] = 0.15;
+			matEmit[3] = 0.2;
+		}
+ 		glMaterialfv(GL_FRONT, GL_EMISSION, matEmit);
+	}
+
+	if (depth==1){//Then display 4 triangles
+		Vector3r v12 = v1+v2;
+		Vector3r v23 = v2+v3;
+		Vector3r v31 = v3+v1;
+		v12.normalize();
+		v23.normalize();
+		v31.normalize();
+		//Use TRIANGLE_STRIP for faster display of adjacent facets
+		glBegin(GL_TRIANGLE_STRIP);
+			glNormal3v(v1); glVertex3v(v1);
+			glNormal3v(v31); glVertex3v(v31);
+			glNormal3v(v12); glVertex3v(v12);
+			glNormal3v(v23); glVertex3v(v23);
+			glNormal3v(v2); glVertex3v(v2);
+		glEnd();
+		//terminate with this triangle left behind
+		glBegin(GL_TRIANGLES);
+			glNormal3v(v3); glVertex3v(v3);
+			glNormal3v(v23); glVertex3v(v23);
+			glNormal3v(v31); glVertex3v(v31);
+		glEnd();
+		return;
+	}
+	Vector3r v12 = v1+v2;
+	Vector3r v23 = v2+v3;
+	Vector3r v31 = v3+v1;
+	v12.normalize();
+	v23.normalize();
+	v31.normalize();
+	subdivideTriangle(v1,v12,v31,depth-1);
+	subdivideTriangle(v2,v23,v12,depth-1);
+	subdivideTriangle(v3,v31,v23,depth-1);
+	subdivideTriangle(v12,v23,v31,depth-1);
+}
+
+void Gl1_Node::initStripedGlList() {
+	if (!vertices.size()){//Fill vectors with vertices and facets
+		//Define 6 points for +/- coordinates
+		vertices.push_back(Vector3r(-1,0,0));//0
+		vertices.push_back(Vector3r(1,0,0));//1
+		vertices.push_back(Vector3r(0,-1,0));//2
+		vertices.push_back(Vector3r(0,1,0));//3
+		vertices.push_back(Vector3r(0,0,-1));//4
+		vertices.push_back(Vector3r(0,0,1));//5
+		//Define 8 sectors of the sphere
+		faces.push_back(Vector3r(3,4,1));
+		faces.push_back(Vector3r(3,0,4));
+		faces.push_back(Vector3r(3,5,0));
+		faces.push_back(Vector3r(3,1,5));
+		faces.push_back(Vector3r(2,1,4));
+		faces.push_back(Vector3r(2,4,0));
+		faces.push_back(Vector3r(2,0,5));
+		faces.push_back(Vector3r(2,5,1));
+	}
+	//Generate the list. Only once for each qtView, or more if quality is modified.
+	glDeleteLists(glStripedSphereList,1);
+	glStripedSphereList = glGenLists(1);
+	glNewList(glStripedSphereList,GL_COMPILE);
+	glEnable(GL_LIGHTING);
+	glShadeModel(GL_SMOOTH);
+	// render the sphere now
+	for (int i=0;i<8;i++)
+		subdivideTriangle(vertices[(unsigned int)faces[i][0]],vertices[(unsigned int)faces[i][1]],vertices[(unsigned int)faces[i][2]],1+ (int) quality);
+	glEndList();
+
+}
+
+void Gl1_Node::initGlutGlList(){
+	//Generate the "no-stripes" display list, each time quality is modified
+	glDeleteLists(glGlutSphereList,1);
+	glGlutSphereList = glGenLists(1);
+	glNewList(glGlutSphereList,GL_COMPILE);
+		glEnable(GL_LIGHTING);
+		glShadeModel(GL_SMOOTH);
+		glutSolidSphere(1.0,max(quality*glutSlices,(Real)2.),max(quality*glutStacks,(Real)3.));
+	glEndList();
+}
+
+#endif /* YADE_OPENGL */
+
+//      ///The old Galizzi's lists
+// 	if (!vertices.size()) {
+// 		Real X = 0.525731112119133606;
+// 		Real Z = 0.850650808352039932;
+// 		vertices.push_back(Vector3r(-X,0,Z));//0
+// 		vertices.push_back(Vector3r(X,0,Z));//1
+// 		vertices.push_back(Vector3r(-X,0,-Z));//2
+// 		vertices.push_back(Vector3r(X,0,-Z));//3
+// 		vertices.push_back(Vector3r(0,Z,X));//4
+// 		vertices.push_back(Vector3r(0,Z,-X));//5
+// 		vertices.push_back(Vector3r(0,-Z,X));//6
+// 		vertices.push_back(Vector3r(0,-Z,-X));//7
+// 		vertices.push_back(Vector3r(Z,X,0));//8
+// 		vertices.push_back(Vector3r(-Z,X,0));//9
+// 		vertices.push_back(Vector3r(Z,-X,0));//10
+// 		vertices.push_back(Vector3r(-Z,-X,0));//11
+// 		faces.push_back(Vector3r(0,4,1));
+// 		faces.push_back(Vector3r(0,9,4));
+// 		faces.push_back(Vector3r(9,5,4));
+// 		faces.push_back(Vector3r(4,5,8));
+// 		faces.push_back(Vector3r(4,8,1));
+// 		faces.push_back(Vector3r(8,10,1));
+// 		faces.push_back(Vector3r(8,3,10));
+// 		faces.push_back(Vector3r(5,3,8));
+// 		faces.push_back(Vector3r(5,2,3));
+// 		faces.push_back(Vector3r(2,7,3));
+// 		faces.push_back(Vector3r(7,10,3));
+// 		faces.push_back(Vector3r(7,6,10));
+// 		faces.push_back(Vector3r(7,11,6));
+// 		faces.push_back(Vector3r(11,0,6));
+// 		faces.push_back(Vector3r(0,1,6));
+// 		faces.push_back(Vector3r(6,1,10));
+// 		faces.push_back(Vector3r(9,0,11));
+// 		faces.push_back(Vector3r(9,11,2));
+// 		faces.push_back(Vector3r(9,2,5));
+// 		faces.push_back(Vector3r(7,2,11));}
+

=== added file 'pkg/dem/deformablecohesive/Gl1_Node.hpp'
--- pkg/dem/deformablecohesive/Gl1_Node.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Gl1_Node.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,40 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER   burak.er@xxxxxxxxxx                	 *
+*																		 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#pragma once
+
+#include <pkg/common/GLDrawFunctors.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+
+
+class Gl1_Node : public GlShapeFunctor{
+	private:
+		// for stripes
+		static vector<Vector3r> vertices, faces;
+		static int glStripedSphereList;
+		static int glGlutSphereList;
+		void subdivideTriangle(Vector3r& v1,Vector3r& v2,Vector3r& v3, int depth);
+// 		void drawSphere(const Vector3r& color);
+		//Generate GlList for GLUT sphere
+		void initGlutGlList();
+		//Generate GlList for sliced spheres
+		void initStripedGlList();
+		//for regenerating glutSphere list if needed
+		static Real prevQuality;
+	public:
+		virtual void go(const shared_ptr<Shape>&, const shared_ptr<State>&,bool,const GLViewInfo&);
+	YADE_CLASS_BASE_DOC_STATICATTRS(Gl1_Node,GlShapeFunctor,"Renders :yref:`Node` object",
+		((Real,quality,1.0,,"Change discretization level of spheres. quality>1  for better image quality, at the price of more cpu/gpu usage, 0<quality<1 for faster rendering. If mono-color spheres are displayed (:yref:`Gl1_Node::stripes` = False), quality mutiplies :yref:`Gl1_Node::glutSlices` and :yref:`Gl1_Node::glutStacks`. If striped spheres are displayed (:yref:`Gl1_Node::stripes` = True), only integer increments are meaningfull : quality=1 and quality=1.9 will give the same result, quality=2 will give finer result."))
+		((bool,wire,false,,"Only show wireframe (controlled by ``glutSlices`` and ``glutStacks``."))
+		((bool,stripes,false,,"In non-wire rendering, show stripes clearly showing particle rotation."))
+		((bool,localSpecView,true,,"Compute specular light in local eye coordinate system."))
+		((int,glutSlices,12,(Attr::noSave | Attr::readonly),"Base number of sphere slices, multiplied by :yref:`Gl1_Node::quality` before use); not used with ``stripes`` (see `glut{Solid,Wire}Sphere reference <http://www.opengl.org/documentation/specs/glut/spec3/node81.html>`_)"))
+		((int,glutStacks,6,(Attr::noSave | Attr::readonly),"Base number of sphere stacks, multiplied by :yref:`Gl1_Node::quality` before use; not used with ``stripes`` (see `glut{Solid,Wire}Sphere reference <http://www.opengl.org/documentation/specs/glut/spec3/node81.html>`_)"))
+	);
+	RENDERS(Node);
+};
+REGISTER_SERIALIZABLE(Gl1_Node);

=== added file 'pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.cpp'
--- pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,61 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER    burak.er@xxxxxxxxxx              	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#include <pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp>
+#include <pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.hpp>
+YADE_PLUGIN((If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat));
+If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat::~If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat(){};
+
+
+/********************************************************************
+                      InternalForceDispatcher
+*********************************************************************/
+typedef std::map<DeformableCohesiveElement::nodepair,Se3r> NodePairsMap;//Initial node differences
+
+CREATE_LOGGER(If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat);
+void If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat::go(const shared_ptr<Shape>& element,const shared_ptr<Material>& material,const shared_ptr<Body>& bdy)
+{
+
+	shared_ptr<Lin4NodeTetra_Lin4NodeTetra_InteractionElement> interactionelement=YADE_PTR_CAST<Lin4NodeTetra_Lin4NodeTetra_InteractionElement>(element);
+	shared_ptr<LinCohesiveStiffPropDampElastMat> mat=YADE_PTR_CAST<LinCohesiveStiffPropDampElastMat>(material);
+
+
+	NodePairsMap::iterator i1(interactionelement->nodepairs.begin());
+	shared_ptr<Body> node11=i1->first.node1;shared_ptr<Body> node12=i1->first.node2;
+	Vector3r initial1=i1->second.position;
+	std::advance(i1,1);
+	shared_ptr<Body> node21= i1->first.node1;shared_ptr<Body> node22=i1->first.node2;
+	Vector3r initial2=i1->second.position;
+	std::advance(i1,1);
+	shared_ptr<Body> node31= i1->first.node1;shared_ptr<Body> node32=i1->first.node2;
+	Vector3r initial3=i1->second.position;
+
+	Vector3r disp1=(node11->state->pos-node12->state->pos)-initial1;
+	Vector3r disp2=(node21->state->pos-node22->state->pos)-initial2;
+	Vector3r disp3=(node31->state->pos-node32->state->pos)-initial3;
+
+
+
+	Vector3r l1=node11->state->pos-node21->state->pos;
+	Vector3r l2=node31->state->pos-node21->state->pos;
+
+	Real A=0.5*fabs(l1.cross(l2).norm());
+
+	Vector3r f1=(0.083333333)*A*mat->youngmodulus*(2*disp1+disp2+disp3);
+	Vector3r f2=(0.083333333)*A*mat->youngmodulus*(disp1+2*disp2+disp3);
+	Vector3r f3=(0.083333333)*A*mat->youngmodulus*(disp1+disp2+2*disp3);
+
+	//cout<<"forces are \n"<<f1<<"\n"<<f2<<"\n"<<f3<<"\n";
+
+	scene->forces.addForce(node11->getId(),-f1);	scene->forces.addForce(node12->getId(),f1);
+	scene->forces.addForce(node21->getId(),-f2);	scene->forces.addForce(node22->getId(),f2);
+	scene->forces.addForce(node31->getId(),-f3);	scene->forces.addForce(node32->getId(),f3);
+
+
+	return;
+}

=== added file 'pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.hpp'
--- pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,39 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER  burak.er@xxxxxxxxxx                   *
+*									 									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#pragma once
+#include <core/Shape.hpp>
+#include <lib/base/Math.hpp>
+#include <core/Interaction.hpp>
+#include <core/Scene.hpp>
+#include <core/State.hpp>
+#include <core/Shape.hpp>
+#include <core/IGeom.hpp>
+#include <core/IPhys.hpp>
+#include <core/Functor.hpp>
+#include <core/Dispatcher.hpp>
+#include <pkg/common/Aabb.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp>
+#include <pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp>
+#include <pkg/dem/deformablecohesive/CohesiveMat.hpp>
+
+
+
+class If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat : public InternalForceFunctor
+{
+	public :
+
+		virtual void go(const shared_ptr<Shape>&,const shared_ptr<Material>&,const shared_ptr<Body>&);
+		virtual ~If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat();
+		FUNCTOR2D(Lin4NodeTetra_Lin4NodeTetra_InteractionElement,LinCohesiveStiffPropDampElastMat);
+
+		YADE_CLASS_BASE_DOC(If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat,InternalForceFunctor,"Apply internal forces of the tetrahedral element using lumped mass theory")
+};
+REGISTER_SERIALIZABLE(If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat);
+
+

=== added file 'pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.cpp'
--- pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,82 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER    burak.er@xxxxxxxxxx              	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.hpp>
+YADE_PLUGIN((If2_Lin4NodeTetra_LinIsoRayleighDampElast));
+If2_Lin4NodeTetra_LinIsoRayleighDampElast::~If2_Lin4NodeTetra_LinIsoRayleighDampElast(){};
+
+
+/********************************************************************
+                      InternalForceDispatcher
+*********************************************************************/
+
+typedef DeformableElement::NodeMap NodeMap;
+#define VECTOR12_TEMPLATE(Scalar) Eigen::Matrix<Scalar,12,1>
+typedef VECTOR12_TEMPLATE(Real) Vector12r;
+
+CREATE_LOGGER(If2_Lin4NodeTetra_LinIsoRayleighDampElast);
+void If2_Lin4NodeTetra_LinIsoRayleighDampElast::go(const shared_ptr<Shape>& element,const shared_ptr<Material>& material,const shared_ptr<Body>& bdy)
+{
+
+	shared_ptr<Lin4NodeTetra> tetel=YADE_PTR_CAST<Lin4NodeTetra>(element);
+	shared_ptr<LinIsoRayleighDampElastMat> mat=YADE_PTR_CAST<LinIsoRayleighDampElastMat>(material);
+
+	   DeformableElement::NodeMap::iterator i0(tetel->localmap.begin());
+	   DeformableElement::NodeMap::iterator i1(i0);
+	   DeformableElement::NodeMap::iterator i2(i0);
+	   DeformableElement::NodeMap::iterator i3(i0);
+
+	   std::advance(i1,1);
+	   std::advance(i2,2);
+	   std::advance(i3,3);
+
+	if(tetel->massMatrixInvProductstiffnessMatrix==0)
+	{
+
+		   Vector3r node0relpos=Vector3r(0,0,0);
+		   Vector3r node1relpos=i1->second.position-i0->second.position;
+		   Vector3r node2relpos=i2->second.position-i0->second.position;
+		   Vector3r node3relpos=i3->second.position-i0->second.position;
+		   // I dont know wheter this is optimum or not
+		   tetel->massMatrixInvProductstiffnessMatrix=shared_ptr<Matrix>
+		   (
+				   new Matrix(
+				   tetel->calculateMassMatrix(mat->density,mat->poissonratio).inverse()*
+				   tetel->calculateStiffness(mat->youngmodulus,mat->poissonratio,node0relpos,node1relpos,node2relpos,node3relpos)
+				   )
+		   );
+
+
+	}
+
+	//apply internal forces to the tetrahedron
+	//Calculate displacements
+	   Vector12r displacements;
+	   Vector12r displacementvelocity;
+
+	   displacements<<i0->first->state->pos - i0->second.position,
+			   	   	  i1->first->state->pos - i1->second.position,
+			   	   	  i2->first->state->pos - i2->second.position,
+			   	   	  i3->first->state->pos - i3->second.position;
+	   displacementvelocity<<i0->first->state->vel,
+			   	   	  i1->first->state->vel,
+			   	   	  i2->first->state->vel,
+			   	   	  i3->first->state->vel;
+
+
+	//Now calculate the forces
+	Vector12r forces=-(*tetel->massMatrixInvProductstiffnessMatrix)*displacements-(mat->alpha*Matrix::Identity(12,12)+(*tetel->massMatrixInvProductstiffnessMatrix)*(mat->beta))*displacementvelocity;
+
+	scene->forces.addForce(i0->first->getId(),forces.segment(0,3));
+	scene->forces.addForce(i1->first->getId(),forces.segment(3,3));
+	scene->forces.addForce(i2->first->getId(),forces.segment(6,3));
+	scene->forces.addForce(i3->first->getId(),forces.segment(9,3));
+
+	return;
+}

=== added file 'pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.hpp'
--- pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,39 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER  burak.er@xxxxxxxxxx                   *
+*									 									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+
+#pragma once
+#include <core/Shape.hpp>
+#include <lib/base/Math.hpp>
+#include <core/Interaction.hpp>
+#include <core/Scene.hpp>
+#include <core/State.hpp>
+#include <core/Shape.hpp>
+#include <core/IGeom.hpp>
+#include <core/IPhys.hpp>
+#include <core/Functor.hpp>
+#include <core/Dispatcher.hpp>
+#include <pkg/common/Aabb.hpp>
+#include <pkg/dem/deformablecohesive/FEInternalForceDispatchers.hpp>
+#include <pkg/dem/deformablecohesive/Lin4NodeTetra.hpp>
+#include <pkg/dem/deformablecohesive/LinElastMat.hpp>
+
+
+
+class If2_Lin4NodeTetra_LinIsoRayleighDampElast : public InternalForceFunctor
+{
+	public :
+
+		virtual void go(const shared_ptr<Shape>&,const shared_ptr<Material>&,const shared_ptr<Body>&);
+		virtual ~If2_Lin4NodeTetra_LinIsoRayleighDampElast();
+		FUNCTOR2D(Lin4NodeTetra,LinIsoRayleighDampElastMat);
+
+		YADE_CLASS_BASE_DOC(If2_Lin4NodeTetra_LinIsoRayleighDampElast,InternalForceFunctor,"Apply internal forces of the tetrahedral element using lumped mass theory")
+};
+REGISTER_SERIALIZABLE(If2_Lin4NodeTetra_LinIsoRayleighDampElast);
+
+

=== added file 'pkg/dem/deformablecohesive/Lin4NodeTetra.cpp'
--- pkg/dem/deformablecohesive/Lin4NodeTetra.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Lin4NodeTetra.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,127 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/Lin4NodeTetra.hpp>
+#include <algorithm>
+#include <core/Scene.hpp>
+#include <core/BodyContainer.hpp>
+#include <core/State.hpp>
+#include <pkg/common/Sphere.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+#include <lib/base/Math.hpp>
+
+YADE_PLUGIN((Lin4NodeTetra));
+CREATE_LOGGER(Lin4NodeTetra);
+
+Lin4NodeTetra::~Lin4NodeTetra(){
+
+}
+void Lin4NodeTetra::initialize(void){
+	maxNodeCount=4;
+}
+Matrix Lin4NodeTetra::calculateMassMatrix(Real density,Real v)
+{
+	   Matrix mass(12,12);
+
+	   mass<<2,0,0,1,0,0,1,0,0,1,0,0,
+			 0,2,0,0,1,0,0,1,0,0,1,0,
+			 0,0,2,0,0,1,0,0,1,0,0,1,
+			 1,0,0,2,0,0,1,0,0,1,0,0,
+			 0,1,0,0,2,0,0,1,0,0,1,0,
+			 0,0,1,0,0,2,0,0,1,0,0,1,
+			 1,0,0,1,0,0,2,0,0,1,0,0,
+			 0,1,0,0,1,0,0,2,0,0,1,0,
+			 0,0,1,0,0,1,0,0,2,0,0,1,
+			 1,0,0,1,0,0,1,0,0,2,0,0,
+			 0,1,0,0,1,0,0,1,0,0,2,0,
+			 0,0,1,0,0,1,0,0,1,0,0,2;
+
+	   mass=0.05*(density*v)*mass;
+	   return mass;
+}
+
+
+Matrix Lin4NodeTetra::calculateStiffness(Real E, Real v,Vector3r pos0,Vector3r pos1,Vector3r pos2,Vector3r pos3)
+{
+		/*
+		 * The calculation is relative, therefore, we do not need position of the first node.
+		 * All other nodes are calculated with respect to first node which is at zero on local coordinates.
+		 * The local coordinates are the coordinates that is fixed at node0 and parallel to global axes.
+		 *
+		 * */
+
+	   Vector3r pos01=-pos1;
+	   Vector3r pos02=-pos2;
+	   Vector3r pos03=-pos3;
+	   Vector3r pos12= pos1-pos2;
+	   Vector3r pos13= pos1-pos3;
+	   Vector3r pos23= pos2-pos3;
+
+	   Matrix J(4,4);
+	
+	  
+
+	   J.col(0)<<1,pos0;
+	   J.col(1)<<1,pos1;
+	   J.col(2)<<1,pos2;
+	   J.col(3)<<1,pos3;
+
+
+	   Real x12=pos01(0), x13=pos02(0), x14=pos03(0), x23= pos12(0), x24=pos13(0), x34= pos23(0);
+
+	   Real x21=-x12, x31=-x13, x41=-x14, x32=-x23, x42=-x24, x43=-x34;
+
+	   Real y12=pos01(1),  y13=pos02(1),  y14=pos03(1),  y23= pos12(1),  y24=pos13(1),  y34= pos23(1);
+
+	   Real y21=-y12,  y31=-y13,  y41=-y14,  y32=-y23,  y42=-y24,  y43=-y34;
+
+	   Real z12=pos01(2),  z13=pos02(2),  z14=pos03(2),  z23= pos12(2),  z24=pos13(2),  z34= pos23(2);
+
+	   Real z21=-z12,  z31=-z13,  z41=-z14,  z32=-z23,  z42=-z24,  z43=-z34;
+
+	   Real V=fabs(((0.166666667)*J.determinant()));
+		
+
+
+	   Real a1=y42*z32-y32*z42, b1=x32*z42-x42*z32, c1=x42*y32-x32*y42;
+	   Real a2=y31*z43-y34*z13, b2=x43*z31-x13*z34, c2=x31*y43-x34*y13;
+	   Real a3=y24*z14-y14*z24, b3=x14*z24-x24*z14, c3=x24*y14-x14*y24;
+	   Real a4=y13*z21-y12*z31, b4=x21*z13-x31*z12, c4=x13*y21-x12*y31;
+
+	  //std::cout<<"Volume of the element is "<<V<<"\n";
+ 
+	   Matrix B(6,12);
+	   //Construction of B matrix
+	   B<<a1,0,0,a2,0,0,a3,0,0,a4,0,0,
+	      0,b1,0,0,b2,0,0,b3,0,0,b4,0,
+	      0,0,c1,0,0,c2,0,0,c3,0,0,c4,
+	      b1,a1,0,b2,a2,0,b3,a3,0,b4,a4,0,
+	      0,c1,b1,0,c2,b2,0,c3,b3,0,c4,b4,
+	      c1,0,a1,c2,0,a2,c3,0,a3,c4,0,a4;
+		//cout<<"B is"<<std::endl<<B<<std::endl;
+
+	   B=(1/(6*V))*B;
+
+	   //Construction of Elasticity matrix
+	   Matrix Emtr(6,6);
+
+	   Emtr<<1-v,v,v,0,0,0,
+			v,1-v,v,0,0,0,
+			v,v,1-v,0,0,0,
+			0,0,0,0.5-v,0,0,
+			0,0,0,0,0.5-v,0,
+			0,0,0,0,0,0.5-v;
+
+	   Emtr=E/((1+v)*(1-v))*Emtr;
+	   Matrix stiffness=V*B.transpose()*Emtr*B;
+
+	   return stiffness;
+
+}
+
+
+

=== added file 'pkg/dem/deformablecohesive/Lin4NodeTetra.hpp'
--- pkg/dem/deformablecohesive/Lin4NodeTetra.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Lin4NodeTetra.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,100 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <core/Body.hpp>
+#include <core/PartialEngine.hpp>
+#include <pkg/dem/deformablecohesive/DeformableElement.hpp>
+#include <lib/base/Logging.hpp>
+#include <lib/base/Math.hpp>
+
+
+class NewtonIntegrator;
+
+namespace yade{
+
+#define VECTOR4_TEMPLATE(Scalar) Eigen::Matrix<Scalar,4,1>
+typedef VECTOR4_TEMPLATE(Real) Vector4r;
+
+class Lin4NodeTetra: public DeformableElement {
+	public:
+
+		friend class If2_Lin4NodeTetra_LinIsoRayleighDampElast;
+		shared_ptr<Matrix> massMatrixInvProductstiffnessMatrix;
+		Matrix calculateStiffness(Real, Real ,Vector3r,Vector3r,Vector3r,Vector3r);
+		Matrix calculateMassMatrix(Real, Real);
+		virtual ~Lin4NodeTetra();
+		void initialize(void);
+		Real getVolume(void){
+
+
+			   NodeMap::iterator i0(localmap.begin());
+			   NodeMap::iterator i1(i0);
+			   NodeMap::iterator i2(i0);
+			   NodeMap::iterator i3(i0);
+
+			   std::advance(i1,1);
+			   std::advance(i2,2);
+			   std::advance(i3,3);
+
+			   Matrix J(4,4);
+			   Vector3r pos0=Vector3r(0,0,0);
+			   Vector3r pos1=i1->second.position-i0->second.position;
+			   Vector3r pos2=i2->second.position-i0->second.position;
+			   Vector3r pos3=i3->second.position-i0->second.position;
+
+			   Vector3r pos01=-pos1;
+			   Vector3r pos02=-pos2;
+			   Vector3r pos03=-pos3;
+			   Vector3r pos12= pos1-pos2;
+			   Vector3r pos13= pos1-pos3;
+			   Vector3r pos23= pos2-pos3;
+
+
+	 			  J.col(0)<<1,pos0;
+	 			  J.col(1)<<1,pos1;
+	 			  J.col(2)<<1,pos2;
+	 			  J.col(3)<<1,pos3;
+
+
+	   		   Real x12=pos01(0), x13=pos02(0), x14=pos03(0), x23= pos12(0), x24=pos13(0), x34= pos23(0);
+
+	   		   Real x21=-x12, x31=-x13, x41=-x14, x32=-x23, x42=-x24, x43=-x34;
+
+	  		   Real y12=pos01(1),  y13=pos02(1),  y14=pos03(1),  y23= pos12(1),  y24=pos13(1),  y34= pos23(1);
+
+	  		   Real y21=-y12,  y31=-y13,  y41=-y14,  y32=-y23,  y42=-y24,  y43=-y34;
+
+	   		   Real z12=pos01(2),  z13=pos02(2),  z14=pos03(2),  z23= pos12(2),  z24=pos13(2),  z34= pos23(2);
+
+	  		   Real z21=-z12,  z31=-z13,  z41=-z14,  z32=-z23,  z42=-z24,  z43=-z34;
+
+	  		   Real V=fabs(((0.166666667)*J.determinant()));
+
+			   return V;
+		}
+	
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(Lin4NodeTetra,DeformableElement,"Tetrahedral Deformable Element Composed of Nodes",
+		,
+		,
+		createIndex(); /*ctor*/
+		initialize();
+		,
+		/*py*/
+
+	);
+		DECLARE_LOGGER;
+
+		REGISTER_CLASS_INDEX(Lin4NodeTetra,DeformableElement);
+
+};
+}
+// necessary
+using namespace yade;
+REGISTER_SERIALIZABLE(Lin4NodeTetra);

=== added file 'pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.cpp'
--- pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,30 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp>
+#include <algorithm>
+#include <core/Scene.hpp>
+#include <core/BodyContainer.hpp>
+#include <core/State.hpp>
+#include <pkg/common/Sphere.hpp>
+#include <pkg/dem/deformablecohesive/Node.hpp>
+#include <lib/base/Math.hpp>
+
+YADE_PLUGIN((Lin4NodeTetra_Lin4NodeTetra_InteractionElement));
+CREATE_LOGGER(Lin4NodeTetra_Lin4NodeTetra_InteractionElement);
+
+Lin4NodeTetra_Lin4NodeTetra_InteractionElement::~Lin4NodeTetra_Lin4NodeTetra_InteractionElement(){
+
+}
+void Lin4NodeTetra_Lin4NodeTetra_InteractionElement::initialize(void){
+
+}
+
+
+
+
+

=== added file 'pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp'
--- pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,44 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+ 
+#pragma once
+
+#include <map>
+#include <stdexcept>
+#include <core/Body.hpp>
+#include <lib/base/Logging.hpp>
+#include <lib/base/Math.hpp>
+#include <core/PartialEngine.hpp>
+#include <pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp>
+
+
+
+class Lin4NodeTetra_Lin4NodeTetra_InteractionElement: public DeformableCohesiveElement {
+	public:
+
+		friend class If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat;
+		virtual ~Lin4NodeTetra_Lin4NodeTetra_InteractionElement();
+		void initialize(void);
+	
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(Lin4NodeTetra_Lin4NodeTetra_InteractionElement,DeformableCohesiveElement,"Tetrahedral Deformable Element Composed of Nodes",
+		,
+		,
+		createIndex(); /*ctor*/
+		initialize();
+		,
+		/*py*/
+
+	);
+		DECLARE_LOGGER;
+
+		REGISTER_CLASS_INDEX(Lin4NodeTetra_Lin4NodeTetra_InteractionElement,DeformableCohesiveElement);
+
+};
+// necessary
+using namespace yade;
+REGISTER_SERIALIZABLE(Lin4NodeTetra_Lin4NodeTetra_InteractionElement);

=== added file 'pkg/dem/deformablecohesive/LinElastMat.cpp'
--- pkg/dem/deformablecohesive/LinElastMat.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/LinElastMat.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,14 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#include <pkg/dem/deformablecohesive/LinElastMat.hpp>
+YADE_PLUGIN((DeformableElementMaterial)(LinIsoElastMat)(LinIsoRayleighDampElastMat));
+
+DeformableElementMaterial::~DeformableElementMaterial(void){}
+LinIsoElastMat::~LinIsoElastMat(void){}
+LinIsoRayleighDampElastMat::~LinIsoRayleighDampElastMat(void){}
+

=== added file 'pkg/dem/deformablecohesive/LinElastMat.hpp'
--- pkg/dem/deformablecohesive/LinElastMat.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/LinElastMat.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,47 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#pragma once
+#include <core/Material.hpp>
+#include <limits>
+/*! Elastic material */
+class DeformableElementMaterial: public Material{
+	public:
+	virtual ~DeformableElementMaterial();
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(DeformableElementMaterial,Material,"Deformable Element Material.",
+		((Real,density,1,,"Density of the material.")),
+		/*ctor*/ createIndex();
+	);
+	REGISTER_CLASS_INDEX(DeformableElementMaterial,Material);
+};
+REGISTER_SERIALIZABLE(DeformableElementMaterial);
+
+class LinIsoElastMat: public DeformableElementMaterial{
+	public:
+	virtual ~LinIsoElastMat();
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(LinIsoElastMat,DeformableElementMaterial,"Linear Isotropic Elastic material",
+			((Real,youngmodulus,.78e5,,"Young's modulus. Initially aluminium."))
+			((Real,poissonratio,.33,,"Poisson ratio. Initially aluminium.")),
+			createIndex();
+		);
+		REGISTER_CLASS_INDEX(LinIsoElastMat,DeformableElementMaterial);
+};
+REGISTER_SERIALIZABLE(LinIsoElastMat);
+
+
+/*Standard damped linear elastic material*/
+class LinIsoRayleighDampElastMat: public LinIsoElastMat{
+	public:
+	virtual ~LinIsoRayleighDampElastMat();
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(LinIsoRayleighDampElastMat,LinIsoElastMat,"Elastic material with Rayleigh Damping.",
+		((Real,alpha,0,,"Mass propotional damping constant of Rayleigh Damping."))
+		((Real,beta,0,,"Stiffness propotional damping constant of Rayleigh Damping.")),
+		createIndex();
+	);
+	REGISTER_CLASS_INDEX(LinIsoRayleighDampElastMat,LinIsoElastMat);
+};
+REGISTER_SERIALIZABLE(LinIsoRayleighDampElastMat);

=== added file 'pkg/dem/deformablecohesive/Node.cpp'
--- pkg/dem/deformablecohesive/Node.cpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Node.cpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,3 @@
+#include <pkg/dem/deformablecohesive/Node.hpp>
+Node::~Node(){}
+YADE_PLUGIN((Node));

=== added file 'pkg/dem/deformablecohesive/Node.hpp'
--- pkg/dem/deformablecohesive/Node.hpp	1970-01-01 00:00:00 +0000
+++ pkg/dem/deformablecohesive/Node.hpp	2016-01-07 17:49:32 +0000
@@ -0,0 +1,34 @@
+/*************************************************************************
+*  Copyright (C) 2013 by Burak ER                                 	 *
+*									 *
+*                                                                        *
+*  This program is free software; it is licensed under the terms of the  *
+*  GNU General Public License v2 or later. See file LICENSE for details. *
+*************************************************************************/
+#ifndef NODE_HPP_
+#define NODE_HPP_
+#include <core/Shape.hpp>
+//TODO: Look at Sphere hack to work around problem
+// HACK to work around https://bugs.launchpad.net/yade/+bug/528509
+// see comments there for explanation
+namespace yade{
+
+class Node: public Shape{
+	public:
+		Node(Real _radius): radius(_radius){ createIndex();}
+		virtual ~Node ();
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(Node,Shape,"Geometry of node particle.",
+		((Real,radius,0.1,,"Radius [m]")),
+		createIndex(); /*ctor*/
+	);
+	REGISTER_CLASS_INDEX(Node,Shape);
+
+};
+
+}
+// necessary
+using namespace yade; 
+
+// must be outside yade namespace
+REGISTER_SERIALIZABLE(Node);
+#endif

=== added file 'py/deformableelementsutils.py'
--- py/deformableelementsutils.py	1970-01-01 00:00:00 +0000
+++ py/deformableelementsutils.py	2016-01-07 17:49:32 +0000
@@ -0,0 +1,386 @@
+# encoding: utf-8
+#
+# utility functions for deformable cohesive elements
+#
+# burak er buraker88@xxxxxxxxxx
+
+
+import math,random,doctest,geom,numpy
+from yade import *
+from yade.wrapper import *
+from yade.utils import *
+try: # use psyco if available
+	import psyco
+	psyco.full()
+except ImportError: pass
+
+
+from minieigen import *
+
+# c++ implementations for performance reasons
+from yade._utils import *
+from yade.utils import _commonBodySetup
+
+#Deformable Element Node
+def node(center,radius,dynamic=None,fixed=True,wire=False,color=None,highlight=False,material=-1,mask=1):
+	"""Create sphere with given parameters; mass and inertia computed automatically.
+
+	Last assigned material is used by default (*material* = -1), and utils.defaultMaterial() will be used if no material is defined at all.
+
+	:param Vector3 center: center
+	:param float radius: radius
+	:param float dynamic: deprecated, see "fixed"
+	:param float fixed: generate the body with all DOFs blocked?
+	:param material:
+		specify :yref:`Body.material`; different types are accepted:
+			* int: O.materials[material] will be used; as a special case, if material==-1 and there is no shared materials defined, utils.defaultMaterial() will be assigned to O.materials[0]
+			* string: label of an existing material that will be used
+			* :yref:`Material` instance: this instance will be used
+			* callable: will be called without arguments; returned Material value will be used (Material factory object, if you like)
+	:param int mask: :yref:`Body.mask` for the body
+	:param wire: display as wire sphere?
+	:param highlight: highlight this body in the viewer?
+	:param Vector3-or-None: body's color, as normalized RGB; random color will be assigned if ``None``.
+	
+	:return:
+		A Body instance with desired characteristics.
+
+
+	Creating default shared material if none exists neither is given::
+
+		>>> O.reset()
+		>>> from yade import utils
+		>>> len(O.materials)
+		0
+		>>> s0=utils.sphere([2,0,0],1)
+		>>> len(O.materials)
+		1
+
+	Instance of material can be given::
+
+		>>> s1=utils.sphere([0,0,0],1,wire=False,color=(0,1,0),material=ElastMat(young=30e9,density=2e3))
+		>>> s1.shape.wire
+		False
+		>>> s1.shape.color
+		Vector3(0,1,0)
+		>>> s1.mat.density
+		2000.0
+
+	Material can be given by label::
+
+		>>> O.materials.append(FrictMat(young=10e9,poisson=.11,label='myMaterial'))
+		1
+		>>> s2=utils.sphere([0,0,2],1,material='myMaterial')
+		>>> s2.mat.label
+		'myMaterial'
+		>>> s2.mat.poisson
+		0.11
+
+	Finally, material can be a callable object (taking no arguments), which returns a Material instance.
+	Use this if you don't call this function directly (for instance, through yade.pack.randomDensePack), passing
+	only 1 *material* parameter, but you don't want material to be shared.
+
+	For instance, randomized material properties can be created like this:
+
+		>>> import random
+		>>> def matFactory(): return ElastMat(young=1e10*random.random(),density=1e3+1e3*random.random())
+		...
+		>>> s3=utils.sphere([0,2,0],1,material=matFactory)
+		>>> s4=utils.sphere([1,2,0],1,material=matFactory)
+
+	"""
+	b=Body()
+	b.shape=Node(radius=radius,color=color if color else randomColor(),wire=wire,highlight=highlight)
+	V=(4./3)*math.pi*radius**3
+	geomInert=(2./5.)*V*radius**2
+	_commonBodySetup(b,V,Vector3(geomInert,geomInert,geomInert),material,pos=center,dynamic=dynamic,fixed=fixed,blockedDOFs='XYZ')
+	b.aspherical=False
+	b.mask=mask
+	b.bounded=True
+	return b
+
+def randomColor():
+	"""Return random Vector3 with each component in interval 0…1 (uniform distribution)"""
+	return Vector3(random.random(),random.random(),random.random())
+
+# Meshing
+def clear_mesh(gmshmeshhandle_):
+    sceneelements=gmshmeshhandle_[1];
+
+    #first remove elements and nodes from the scene
+    for elem in sceneelements:
+	bdy=elem[0];
+	nodes=elem[1];
+	O.bodies.erase(bdy.id);
+	for node in nodes:
+	    O.bodies.erase(node.id);
+
+def tetrahedronvolume(nodes):
+
+	    
+     V =0.166666666*numpy.linalg.det([[nodes[0][0], nodes[1][0] ,nodes[2][0] ,nodes[3][0]],[nodes[0][1], nodes[1][1], nodes[2][1] ,nodes[3][1]], [nodes[0][2] ,nodes[1][2], nodes[2][2], nodes[3][2]], [ 1,1,1,1]]);
+	
+     return V
+
+def tetrahedral_mesh_generator(filename,tetrahedralelementshape,elementmat,interfaceelementshape,interfacemat):
+	
+
+	[nodeList,elementList,interactionList]=mshreader(filename)
+
+	nodes=nodeList
+  	
+	meshelements=elementList
+
+	interfacepairs=interactionList
+
+	scenebodies=[]
+
+	for elem in elementList:  
+	#Create the corresponding mesh element
+		nodesofelement=[nodes[elem[0]],nodes[elem[1]],nodes[elem[2]],nodes[elem[3]]]
+		noderadius=0.1*(0.75*tetrahedronvolume(nodesofelement))**0.33333333;
+
+		[elbody, nodebodies]=tetrahedral_element(elementmat,nodesofelement,tetrahedralelementshape,radius=noderadius)
+
+		scenebodies.append([elbody,nodebodies])
+
+	#Create the interfacing element pairs
+	for interpair in interfacepairs: 
+		
+		#get element pair
+		elementpair=interpair[0];
+		#get node pairs
+		pairofnodes=interpair[1]
+		interfaceelementpairs=[]
+
+		for pair in pairofnodes:
+
+           		firstid=pair[0];
+           		secondid=pair[1];
+			el1nodebodies=scenebodies[elementpair[0]][1];
+			el2nodebodies=scenebodies[elementpair[1]][1];
+            		node1=el1nodebodies[firstid]
+            		node2=el2nodebodies[secondid]
+ 	    		interfaceelementpairs.append([node1, node2])
+
+        	[elbody, nodebodies]=interaction_element(interfacemat,interfaceelementpairs,interfaceelementshape);
+		scenebodies.append([elbody,nodebodies])
+
+        return scenebodies
+
+
+#Read mesh file and get elements nodes and interactions
+def mshreader(meshfile="file.mesh",shift=Vector3.Zero,scale=1.0,orientation=Quaternion.Identity,**kw):
+	""" Imports volume mesh from gmsh2 file
+	:Parameters:
+		`shift`: [float,float,float]
+			[X,Y,Z] parameter moves the specimen.
+		`scale`: float
+			factor scales the given data.
+		`orientation`: quaternion
+			orientation of the imported mesh
+		`**kw`: (unused keyword arguments)
+				is passed to :yref:`yade.utils.facet`
+	:Returns: list of nodes and elements for the specimen.
+	"""
+	infile = open(meshfile,"r")
+	lines = infile.readlines()
+	infile.close()
+
+	nodelistVector3=[]
+	elementList=[]
+	interactionList=[]	
+	findVerticesString=0
+	
+	while (lines[findVerticesString].split()[0]<>'$Nodes'): #Find the string with the number of Vertices
+		findVerticesString+=1
+	findVerticesString+=1
+	numNodes = int(lines[findVerticesString].split()[0])
+	
+	for line in lines[findVerticesString+1:numNodes+findVerticesString+1]:
+		data = line.split()
+		nodelistVector3.append(orientation*Vector3(float(data[1])*scale,float(data[2])*scale,float(data[3])*scale)+shift)
+	
+	findElementString=findVerticesString+numNodes
+	while (lines[findElementString].split()[0]<>'$Elements'): #Find the string with the number of Elements
+		findElementString+=1
+	findElementString+=1
+	numElements = int(lines[findElementString].split()[0])
+
+
+	for line in lines[findElementString+1:findElementString+numElements+1]:
+		data = line.split()
+		numberofnodes=data[1]
+
+		if(int(numberofnodes)==4):#tetrahedral element	
+
+			id1 = int(data[5])-1
+			id2 = int(data[6])-1
+			id3 = int(data[7])-1
+			id4 = int(data[8])-1
+		        elementList.append([id1,id2,id3,id4])
+	#Create the interaction list
+ 	i=0
+	numVolElements=elementList.__len__()
+	for elem in elementList:
+		j=i+1
+
+		while j<numVolElements :
+
+			pair=check_coinciding_nodes(elem,elementList[j])
+			if(pair.__len__()>0):
+				interactionList.append([Vector2i(i,j),pair])
+			j=j+1
+		i=i+1
+	return [nodelistVector3,elementList,interactionList]
+
+def check_coinciding_nodes(element1,element2):
+
+	pairstemp=[]
+	#for each node of the element1
+	i=0
+	j=0
+	for node1 in element1:
+
+		for node2 in element2:
+						
+			if(node1==node2):
+				pairstemp.append([i,j])
+			j=j+1
+		i=i+1
+		j=0
+	if(3<=pairstemp.__len__()):
+		pairs=pairstemp
+	else:
+		pairs=[]			
+	return pairs
+
+def interaction_element(material,nodepairs,elementshape,radius=0.0015,dynamic=None,fixed=True,wire=False,color=Vector3(1,0,0),highlight=False,mask=1):
+	
+	# triangles for drawing(node indices)
+	#faces=[Vector3(0,1,3),Vector3(1,2,3),Vector3(2,0,3),Vector3(0,1,2)]
+	faces=[];
+	shape=elementshape()
+	shape.color=color if color else randomColor();
+	[body_,nodes_]=finite_element(material,shape,nodepairs,faces,radius,interface=True)
+
+	return [body_,nodes_]
+
+def tetrahedral_element(material,nodes,elementshape,radius=0.0015,dynamic=None,fixed=True,wire=False,color=Vector3(1,0,0),highlight=False,mask=1):
+	
+	# triangles for drawing(node indices)
+	#faces are in the format [face_vertex0,face_vertex1,face_vertex2,opposite_vertex]
+	faces=[Vector3(1,2,0),Vector3(2,1,3),Vector3(2,0,3),Vector3(3,1,0)]
+
+	shape=elementshape()
+	shape.color=color if color else randomColor();
+	[body_,nodes_]=finite_element(material,shape,nodes,faces,radius)
+
+	return [body_,nodes_]
+
+def finite_element(material,shape,nodes,faces,radius,dynamic=None,fixed=True,wire=False,Color=None,highlight=False,mask=1,interface=False):
+	"""Create sphere with given parameters; mass and inertia computed automatically.
+
+	Last assigned material is used by default (*material* = -1), and utils.defaultMaterial() will be used if no material is defined at all.
+
+	:param Vector3 center: center
+	:param float radius: radius
+	:param float dynamic: deprecated, see "fixed"
+	:param float fixed: generate the body with all DOFs blocked?
+	:param material:
+		specify :yref:`Body.material`; different types are accepted:
+			* int: O.materials[material] will be used; as a special case, if material==-1 and there is no shared materials defined, utils.defaultMaterial() will be assigned to O.materials[0]
+			* string: label of an existing material that will be used
+			* :yref:`Material` instance: this instance will be used
+			* callable: will be called without arguments; returned Material value will be used (Material factory object, if you like)
+	:param int mask: :yref:`Body.mask` for the body
+	:param wire: display as wire sphere?
+	:param highlight: highlight this body in the viewer?
+	:param Vector3-or-None: body's color, as normalized RGB; random color will be assigned if ``None``.
+	
+	:return:
+		A Body instance with desired characteristics.
+
+
+	Creating default shared material if none exists neither is given::
+
+		>>> O.reset()
+		>>> from yade import utils
+		>>> len(O.materials)
+		0
+		>>> s0=utils.sphere([2,0,0],1)
+		>>> len(O.materials)
+		1
+
+	Instance of material can be given::
+
+		>>> s1=utils.sphere([0,0,0],1,wire=False,color=(0,1,0),material=ElastMat(young=30e9,density=2e3))
+		>>> s1.shape.wire
+		False
+		>>> s1.shape.color
+		Vector3(0,1,0)
+		>>> s1.mat.density
+		2000.0
+
+	Material can be given by label::
+
+		>>> O.materials.append(FrictMat(young=10e9,poisson=.11,label='myMaterial'))
+		1
+		>>> s2=utils.sphere([0,0,2],1,material='myMaterial')
+		>>> s2.mat.label
+		'myMaterial'
+		>>> s2.mat.poisson
+		0.11
+
+	Finally, material can be a callable object (taking no arguments), which returns a Material instance.
+	Use this if you don't call this function directly (for instance, through yade.pack.randomDensePack), passing
+	only 1 *material* parameter, but you don't want material to be shared.
+
+	For instance, randomized material properties can be created like this:
+
+		>>> import random
+		>>> def matFactory(): return ElastMat(young=1e10*random.random(),density=1e3+1e3*random.random())
+		...
+		>>> s3=utils.sphere([0,2,0],1,material=matFactory)
+		>>> s4=utils.sphere([1,2,0],1,material=matFactory)
+
+	"""
+	b=Body();
+	b.shape=shape;
+	O.bodies.append(b)
+	nodes_ret=[];
+	#b.shape.color=Color;
+	#add nodes to the scene and keep them in the nodes list
+	if(interface==False):
+	#Deformable Element
+		for vec in nodes:        # Second Example
+        	    nod=node(vec,radius)
+		    O.bodies.append(nod)
+		    b.shape.addNode(nod)
+		    nodes_ret.append(nod)
+		#add faces for drawing purposes
+		for face in faces:
+		    b.shape.addFace(face)
+	else:
+	#Deformable Cohesive Element
+		for nodepair in nodes:        # Second Example
+		    b.shape.addPair(nodepair[0],nodepair[1])
+		#add faces for drawing purposes
+		for face in faces:
+		    b.shape.addFace(face)
+
+	V=1;#For symbolical
+	geomInert=Vector3(1,1,1)#For symbolical
+	#Only add body to draw it not for integration, therefore block all dof
+	_commonBodySetup(b,V,geomInert,material,pos=Vector3(0,0,0),dynamic=False,fixed=True,blockedDOFs='xyzXYZ')
+	b.aspherical=False
+	b.mask=mask
+	b.bounded=False
+	return [b,nodes_ret]
+
+
+
+
+
+##**********************End of Deformable Elements*********************************
+

=== modified file 'py/utils.py'
--- py/utils.py	2015-12-10 12:18:07 +0000
+++ py/utils.py	2016-01-07 17:49:32 +0000
@@ -110,7 +110,7 @@
 	"""
 	return FrictMat(density=1e3,young=1e7,poisson=.3,frictionAngle=.5,label='defaultMat')
 
-def _commonBodySetup(b,volume,geomInertia,material,pos,noBound=False,resetState=True,dynamic=None,fixed=False):
+def _commonBodySetup(b,volume,geomInertia,material,pos,noBound=False,resetState=True,dynamic=None,fixed=False,blockedDOFs='xyzXYZ'):
 	"""Assign common body parameters."""
 	if isinstance(material,int):
 		if material<0 and len(O.materials)==0: O.materials.append(defaultMaterial());
@@ -129,7 +129,7 @@
 		import warnings
 		warnings.warn('dynamic=%s is deprecated, use fixed=%s instead'%(str(dynamic),str(not dynamic)),category=DeprecationWarning,stacklevel=2)
 		fixed=not dynamic
-	b.state.blockedDOFs=('xyzXYZ' if fixed else '')
+	b.state.blockedDOFs=(blockedDOFs if fixed else '')
 
 
 def sphere(center,radius,dynamic=None,fixed=False,wire=False,color=None,highlight=False,material=-1,mask=1):

=== modified file 'py/ymport.py'
--- py/ymport.py	2015-12-09 00:21:24 +0000
+++ py/ymport.py	2016-01-07 17:49:32 +0000
@@ -165,6 +165,7 @@
 	infile.close()
 
 	nodelistVector3=[]
+	elementlistVector3=[] # for deformable elements
 	findVerticesString=0
 	
 	while (lines[findVerticesString].split()[0]<>'Vertices'): #Find the string with the number of Vertices