diff --git a/package.cmake b/package.cmake
index 40850b341..78851f012 100644
--- a/package.cmake
+++ b/package.cmake
@@ -1,76 +1,76 @@
 #===============================================================================
 # @file   package.cmake
 #
 #
 #
 # @brief  
 #
 # @section LICENSE
 #
 # Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
 # Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
 #
 #===============================================================================
 
 package_declare(traction-at-split-node-contact
   DESCRIPTION "The super contact of David"
   DEPENDS iohelper)
 
 package_declare_sources(traction-at-split-node-contact
   common/synchronized_array.cc
   common/parameter_reader.cc
   common/manual_restart.cc
   functions/boundary_functions.cc
   ntn_contact/ntn_base_contact.cc
   ntn_contact/ntn_contact.cc
   ntn_contact/ntrf_contact.cc
   ntn_contact/ntn_base_friction.cc
   ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc
   ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc
   ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc
   ntn_contact/ntn_initiation_function.cc
 
   common/ast_common.hh
-  akantu_simtools.hh
+  tasn_contact.hh
 
   # headers
   common/synchronized_array.hh
   common/parameter_reader.hh
   common/manual_restart.hh
 
   functions/boundary_functions.hh
   functions/node_filter.hh
 
   boundary_conditions/force_based_dirichlet.hh
   boundary_conditions/spring_bc.hh
   boundary_conditions/inclined_flat_dirichlet.hh
 
   ntn_contact/ntn_base_contact.hh
   ntn_contact/ntn_contact.hh
   ntn_contact/ntrf_contact.hh
   ntn_contact/ntn_base_friction.hh
 
   ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh
   ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh
   ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh
 
   ntn_contact/friction_laws/ntn_friclaw_coulomb.hh
   ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh
   ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh
   ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh
   ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh
   ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh
 
   ntn_contact/ntn_friction.hh
   ntn_contact/ntn_friction_tmpl.hh
   ntn_contact/ntrf_friction.hh
   ntn_contact/ntrf_friction_tmpl.hh
 
   ntn_contact/ntn_initiation_function.hh
 
   # inlines
   common/synchronized_array_inline_impl.cc
   ntn_contact/ntn_base_contact_inline_impl.cc
   )
 
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index e55bc99cf..000000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-#===============================================================================
-# @file   CMakeLists.txt
-#
-#
-#
-# @brief  
-#
-# @section LICENSE
-#
-# Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
-# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
-#
-#===============================================================================
-
-cmake_minimum_required(VERSION 2.6)
-project(Akantu_SimTools)
-
-set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries.")
-
-set(AKANTU_SIMTOOLS_SRCS
-
-  common/synchronized_array.cc
-  common/parameter_reader.cc
-  common/manual_restart.cc
-
-  functions/boundary_functions.cc
-
-  ntn_contact/ntn_base_contact.cc
-  ntn_contact/ntn_contact.cc
-  ntn_contact/ntrf_contact.cc
-
-  ntn_contact/ntn_base_friction.cc
-  ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc
-  ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc
-  ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc
-
-  ntn_contact/ntn_initiation_function.cc
-  )
-
-set(AKANTU_SIMTOOLS_HDRS
-  common/ast_common.hh
-  akantu_simtools.hh
-
-  # headers
-  common/synchronized_array.hh
-  common/parameter_reader.hh
-  common/manual_restart.hh
-
-  functions/boundary_functions.hh
-  functions/node_filter.hh
-
-  boundary_conditions/force_based_dirichlet.hh
-  boundary_conditions/spring_bc.hh
-  boundary_conditions/inclined_flat_dirichlet.hh
-
-  ntn_contact/ntn_base_contact.hh
-  ntn_contact/ntn_contact.hh
-  ntn_contact/ntrf_contact.hh
-  ntn_contact/ntn_base_friction.hh
-
-  ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh
-  ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh
-  ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh
-
-  ntn_contact/friction_laws/ntn_friclaw_coulomb.hh
-  ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh
-  ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh
-  ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh
-  ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh
-  ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh
-
-  ntn_contact/ntn_friction.hh
-  ntn_contact/ntn_friction_tmpl.hh
-  ntn_contact/ntrf_friction.hh
-  ntn_contact/ntrf_friction_tmpl.hh
-
-  ntn_contact/ntn_initiation_function.hh
-
-  # inlines
-  common/synchronized_array_inline_impl.cc
-  ntn_contact/ntn_base_contact_inline_impl.cc
-  )
-
-
-find_package(Akantu REQUIRED)
-include_directories(${AKANTU_INCLUDE_DIR}
-  ${AKANTU_BOOST_INCLUDE_DIR}
-  ${AKANTU_IOHELPER_INCLUDE_DIR})
-
-
-add_library(akantu_simtools
-  ${AKANTU_SIMTOOLS_SRCS}
-  )
-
-include_directories(common/)
-include_directories(ntn_contact/)
-include_directories(ntn_contact/friction_laws/)
-include_directories(ntn_contact/friction_regularisations/)
-include_directories(ntrf_contact/)
-include_directories(ntrf_contact/friction_laws/)
-
-target_link_libraries(akantu_simtools akantu)
-#target_link_libraries(akantu_simtools ${AKANTU_LIBRARIES})
-set_target_properties(akantu_simtools
-  PROPERTIES PUBLIC_HEADER "${AKANTU_SIMTOOLS_HDRS}")
-
-install(TARGETS akantu_simtools
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-  PUBLIC_HEADER DESTINATION include/akantu_simtools
-  )
diff --git a/src/boundary_conditions/force_based_dirichlet.hh b/src/boundary_conditions/force_based_dirichlet.hh
index 25b3ca215..2671dd131 100644
--- a/src/boundary_conditions/force_based_dirichlet.hh
+++ b/src/boundary_conditions/force_based_dirichlet.hh
@@ -1,128 +1,122 @@
 /**
  * @file   force_based_dirichlet.hh
  *
  * @author Dana Christen <dana.christen@epfl.ch>
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  dirichlet boundary condition that tries
  * to keep the force at a given value
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_FORCE_BASED_DIRICHLET_HH__
 #define __AST_FORCE_BASED_DIRICHLET_HH__
 
 // akantu
 #include "aka_common.hh"
 
-// simtools
-#include "ast_common.hh"
-
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class ForceBasedDirichlet : public BC::Dirichlet::IncrementValue {
 
 protected:
   typedef const Array<Real> * RealArrayPtr;
   typedef const Array<Int> * IntArrayPtr;
 
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   ForceBasedDirichlet(SolidMechanicsModel & model, 
 		      BC::Axis ax, 
 		      Real target_f,
 		      Real mass = 0.) :
     IncrementValue(0., ax), 
     model(model),
     mass(mass), 
     velocity(0.), 
     target_force(target_f),
     total_residual(0.)
   {}
 
   virtual ~ForceBasedDirichlet() {}
 
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   void updateTotalResidual() {
     SubBoundarySet::iterator it  = this->subboundaries.begin();
     SubBoundarySet::iterator end = this->subboundaries.end();
     this->total_residual = 0.;
     for (; it != end; ++it) {
       this->total_residual += integrateResidual(*it, this->model, this->axis);
     }
   }
 
   virtual Real update() {
     AKANTU_DEBUG_IN();
     
     this->updateTotalResidual();
     Real total_force = this->target_force + this->total_residual;
     
     Real a = total_force / this->mass;
     Real dt = model.getTimeStep();  
     this->velocity += 0.5*dt*a;
     this->value     = this->velocity*dt + 0.5*dt*dt*a;  // increment position dx
     this->velocity += 0.5*dt*a;
     
     AKANTU_DEBUG_OUT();
     return this->total_residual;
   }
 
   Real applyYourself() {
     AKANTU_DEBUG_IN();
     Real reaction = this->update();
 
     SubBoundarySet::iterator it  = this->subboundaries.begin();
     SubBoundarySet::iterator end = this->subboundaries.end();
     for (; it != end; ++it) {
       this->model.applyBC(*this,*it);
     }
    
     AKANTU_DEBUG_OUT();
     return reaction;
   }
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_SET_MACRO(Mass, mass, Real);
   AKANTU_SET_MACRO(TargetForce, target_force, Real);
 
   void insertSubBoundary(const std::string & sb_name) {
     this->subboundaries.insert(sb_name);
   }
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
   typedef std::set<std::string> SubBoundarySet;
 protected:
   SolidMechanicsModel & model;
   SubBoundarySet subboundaries;
 
   Real mass;
   Real velocity;
   Real target_force;
   Real total_residual;
 };
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_FORCE_BASED_DIRICHLET_HH__ */
diff --git a/src/boundary_conditions/inclined_flat_dirichlet.hh b/src/boundary_conditions/inclined_flat_dirichlet.hh
index 369da797d..3cd0bc2a1 100644
--- a/src/boundary_conditions/inclined_flat_dirichlet.hh
+++ b/src/boundary_conditions/inclined_flat_dirichlet.hh
@@ -1,80 +1,74 @@
 /**
  * @file   inclined_flat_dirichlet.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  inclined dirichlet
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_INCLINED_FLAT_DIRICHLET_HH__
 #define __AST_INCLINED_FLAT_DIRICHLET_HH__
 
 // akantu
 #include "aka_common.hh"
 
-// simtools
-#include "ast_common.hh"
-
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class InclinedFlatDirichlet : public BC::Dirichlet::DirichletFunctor {
   
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   InclinedFlatDirichlet(Real val,
 			BC::Axis ax,
 			BC::Axis incl_ax,
 			Real center_coord,
 			Real tang) : 
     DirichletFunctor(ax),
     value(val),
     incl_ax(incl_ax),
     center_coord(center_coord),
     tang(tang) {};
 
   virtual ~InclinedFlatDirichlet() {}
 
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   inline void operator()(UInt node, 
 			 Vector<bool> & flags, 
 			 Vector<Real> & primal,
 			 const Vector<Real> & coord) const {
     AKANTU_DEBUG_IN();
 
     Real dist = coord(incl_ax) - this->center_coord;
     flags(axis) = true;
     primal(axis) = this->value + this->tang * dist;
     
     AKANTU_DEBUG_OUT();
   }
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   Real value;
   BC::Axis incl_ax;
   Real center_coord;
   Real tang;
 };
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_INCLINED_FLAT_DIRICHLET_HH__ */
diff --git a/src/boundary_conditions/spring_bc.hh b/src/boundary_conditions/spring_bc.hh
index 4c2822f66..241c62a9a 100644
--- a/src/boundary_conditions/spring_bc.hh
+++ b/src/boundary_conditions/spring_bc.hh
@@ -1,140 +1,137 @@
 /**
  * @file   spring_bc.hh
  *
  * @author Dana Christen <dana.christen@epfl.ch>
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  spring boundary condition
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_SPRING_BC_HH__
 #define __AST_SPRING_BC_HH__
 
 // simtools
 #include "force_based_dirichlet.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class SpringBC : public ForceBasedDirichlet {
 
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   SpringBC(SolidMechanicsModel & model, 
 	   BC::Axis ax, 
 	   Real stiffness,
 	   Real mass = 0.) :
     ForceBasedDirichlet(model, ax, 0., mass), 
     stiffness(stiffness), 
     elongation(0.)
   {}
 
   virtual ~SpringBC() {}
 
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   virtual Real update() {
     AKANTU_DEBUG_IN();
 
     this->target_force = - this->stiffness * this->elongation;
     Real reaction = ForceBasedDirichlet::update();
     this->elongation += this->value;
 
     AKANTU_DEBUG_OUT();
     return reaction;
   }
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_GET_MACRO(Elongation, elongation, Real);
 
   inline void setToEquilibrium() {
     AKANTU_DEBUG_IN();
   
     this->updateTotalResidual();
 
     this->target_force = - this->total_residual;
     this->elongation = - this->target_force / this->stiffness;
   
     AKANTU_DEBUG_OUT();
   }
 
   /// change elongation
   /// dx > 0 -> target_force < 0
   inline void incrementElongation(Real dx) {
     AKANTU_DEBUG_IN();
 
     this->elongation += dx;
 
     AKANTU_DEBUG_OUT();
   }
   //friend std::ostream& operator<<(std::ostream& out, const SpringBC & spring);
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   Real stiffness;
   Real elongation;
 };
 
 
 
 
 
 
 
 
 
 
 // class SpringBCRestricted : public SpringBC {
 // public:
 //   SpringBCRestricted(BC::Axis ax, Real target_force, BC::Axis surface_axis, Real min, Real max)
 //     :SpringBC(ax, target_force), surface_axis(surface_axis), min(min), max(max) {}
 
 //   virtual ~SpringBCRestricted() {}
 
 // public:
 //   inline void operator()(UInt node, Vector<bool> & flags, Vector<Real> & primal, const Vector<Real> & coord) const {
 //     if(coord(surface_axis) > min && coord(surface_axis) < max) {
 //       SpringBC::operator()(node, flags, primal, coord);
 //     }
 //   }
 // private:
 //   BC::Axis surface_axis;
 //   Real min;
 //   Real max;
 // };
 
 // std::ostream& operator<<(std::ostream& out, const SpringBC & spring) {
 //   out << "Real total_residual: " << *spring.total_residual << std::endl;
 //   out << "Real mass: " << spring.mass << std::endl;
 //   out << "Real k: " << spring.k << std::endl;
 //   out << "Real delta_x: " << spring.delta_x << std::endl;
 //   out << "Real dt: " << spring.dt << std::endl;
 //   out << "Real v: " << spring.v << std::endl;
 //   out << "Real dx: " << spring.dx << std::endl;
 //   out << "Real forcing_vel: " << spring.forcing_vel << std::endl;
 //   return out;
 // }
 
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_SPRING_BC_HH__ */
diff --git a/src/common/ast_common.hh b/src/common/ast_common.hh
deleted file mode 100644
index fcb5da85c..000000000
--- a/src/common/ast_common.hh
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @file   ast_common.hh
- *
- *
- *
- * @brief  
- *
- * @section LICENSE
- *
- * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
- * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
- *
- */
-
-#define __BEGIN_SIMTOOLS__ namespace akantu_simtools {
-#define __END_SIMTOOLS__ }
diff --git a/src/common/parameter_reader.cc b/src/common/parameter_reader.cc
index 7113e6a3e..7b1612da7 100644
--- a/src/common/parameter_reader.cc
+++ b/src/common/parameter_reader.cc
@@ -1,447 +1,447 @@
 /**
  * @file   parameter_reader.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of parameter reader
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // std
 #include <iostream>
 #include <fstream>
 #include <utility>
 #include <algorithm>
 
 // simtools
 #include "parameter_reader.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 ParameterReader::ParameterReader() : 
   data_types(),
   element_type_data(), 
   string_data(), 
   int_data(), 
   uint_data(), 
   real_data(), 
   bool_data()
 {
   AKANTU_DEBUG_IN();
 
   // setup of types of element
   data_types.insert("elementtype");
   data_types.insert("string");
   data_types.insert("uint");
   data_types.insert("int");
   data_types.insert("real");
   data_types.insert("bool");
   //  data_types.insert("surface");
   
   // define conversion maps
   _input_to_akantu_element_types["_segment_2"] = akantu::_segment_2;
   _input_to_akantu_element_types["_segment_3"] = akantu::_segment_3;
   _input_to_akantu_element_types["_triangle_3"] = akantu::_triangle_3;
   _input_to_akantu_element_types["_triangle_6"] = akantu::_triangle_6;
   _input_to_akantu_element_types["_tetrahedron_4"] = akantu::_tetrahedron_4;
   _input_to_akantu_element_types["_tetrahedron_10"] = akantu::_tetrahedron_10;
   _input_to_akantu_element_types["_quadrangle_4"] = akantu::_quadrangle_4;
   _input_to_akantu_element_types["_quadrangle_8"] = akantu::_quadrangle_8;
   _input_to_akantu_element_types["_hexahedron_8"] = akantu::_hexahedron_8;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void ParameterReader::readInputFile(std::string file_name) {
   AKANTU_DEBUG_IN();
   
   char comment_char = '#';
   char equal_char = '=';
 
   // open a file called file name 
   std::ifstream infile;
   infile.open(file_name.c_str());
 
   if(!infile.good()) {
     std::cerr << "Cannot open file " << file_name << "!!!" << std::endl;
     exit(EXIT_FAILURE);
   }
 
   std::string line;
   std::string clean_line;
   while(infile.good()) {
     getline(infile, line);
     clean_line = line;
 
     // take out comments
     size_t found_comment;
     found_comment = line.find_first_of(comment_char);
     if (found_comment != std::string::npos)
       clean_line = line.substr(0,found_comment);
     if (clean_line.empty())
       continue;
 
     std::stringstream sstr(clean_line);
 
     // check if data type exists
     std::string type;
     sstr >> type;
     std::transform(type.begin(),type.end(),type.begin(),::tolower);
     if (this->data_types.find(type) == this->data_types.end()) {
       std::cerr << " *** WARNING *** Data type " << type << " does not exist"
 		<< " in this input data structure. Ignore line: ";
       std::cerr << clean_line << std::endl;
       continue;
     }
     
     std::string keyword;
     std::string equal;
     std::string value;
 
     // get keyword
     sstr >> keyword;
     size_t equal_p = keyword.find_first_of(equal_char);
     if (equal_p != std::string::npos) {
       equal = keyword.substr(equal_p,std::string::npos);
       keyword = keyword.substr(0,equal_p);
     }
 
     // get equal
     if (equal.empty())
       sstr >> equal;
     if (equal.length() != 1) {
       value = equal.substr(1,std::string::npos);
       equal = equal[0];
     }
     if (equal[0] != equal_char) {
       std::cerr << " *** WARNING *** Unrespected convention! Ignore line: ";
       std::cerr << clean_line << std::endl;
       continue;
     }
    
     // get value
     if (value.empty())
       sstr >> value;
     
     // no value
     if (value.empty()) {
       std::cerr << " *** WARNING *** No value given! Ignore line: ";
       std::cerr << clean_line << std::endl;
       continue;
     }
     
     // put value in map
     std::stringstream convert(value);
     if (type.compare("elementtype") == 0) {
       std::map<std::string, akantu::ElementType>::const_iterator it;
       it = this->_input_to_akantu_element_types.find(value);
       if (it != this->_input_to_akantu_element_types.end())
 	this->element_type_data.insert(std::make_pair(keyword,it->second));
       else {
 	std::cerr << " *** WARNING *** ElementType " << value << " does not exist. Ignore line: ";
 	std::cerr << clean_line << std::endl;
 	continue;
       }
     }
     else if (type.compare("string") == 0) {
       this->string_data.insert(std::make_pair(keyword,value));
     }
     /*
     else if (type.compare("surface") == 0) {
       //Surface surf;
       UInt surf;
       convert >> surf;
       //this->surface_data.insert(std::make_pair(keyword,surf));
       this->uint_data.insert(std::make_pair(keyword,surf));
     }
     */
     else if (type.compare("int") == 0) {
       Int i;
       convert >> i;
       this->int_data.insert(std::make_pair(keyword,i));
     }
     else if (type.compare("uint") == 0) {
       UInt i;
       convert >> i;
       this->uint_data.insert(std::make_pair(keyword,i));
     }
     else if (type.compare("real") == 0) {
       Real r;
       convert >> r;
       this->real_data.insert(std::make_pair(keyword,r));
     }
     else if (type.compare("bool") == 0) {
       std::transform(value.begin(),value.end(),value.begin(),::tolower);
       bool b;
       if (value.compare("true") == 0)
 	b = true;
       else if (value.compare("false") == 0)
 	b = false;
       else {
 	std::cerr << " *** WARNING *** boolean cannot be " << value << ". Ignore line: ";
 	std::cerr << clean_line << std::endl;
 	continue;
       }
       this->bool_data.insert(std::make_pair(keyword,b));
     }
     else {
       std::cerr << " *** ERROR *** Could not add data to InputData for line: ";
       std::cerr << clean_line << std::endl;
       continue;
       exit(EXIT_FAILURE);
     }
   }
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void ParameterReader::writeInputFile(std::string file_name) const {
   AKANTU_DEBUG_IN();
   
   // open file to write input information
   std::ofstream outfile;
   outfile.open(file_name.c_str());
 
   // element type
   for (std::map<std::string, akantu::ElementType>::const_iterator it = element_type_data.begin();
        it != element_type_data.end(); ++it) {
     for (std::map<std::string, ElementType>::const_iterator et = _input_to_akantu_element_types.begin();
 	 et != _input_to_akantu_element_types.end(); ++et) {
       if (it->second == et->second) {
 	outfile << "ElementType " << it->first << " = " << et->first << std::endl;
 	continue;
       }
     }
   }
   
   // string
   for (std::map<std::string, std::string>::const_iterator it = string_data.begin();
        it != string_data.end(); ++it)
     outfile << "string " << it->first << " = " << it->second << std::endl;
 
   // Surface
   /*
   for (std::map<std::string, akantu::Surface>::const_iterator it = surface_data.begin();
        it != surface_data.end(); ++it)
     outfile << "Surface " << it->first << " = " << it->second << std::endl;
   */
   // Int
   for (std::map<std::string, akantu::Int>::const_iterator it = int_data.begin();
        it != int_data.end(); ++it)
     outfile << "Int " << it->first << " = " << it->second << std::endl;
 
   // UInt
   for (std::map<std::string, akantu::UInt>::const_iterator it = uint_data.begin();
        it != uint_data.end(); ++it)
     outfile << "UInt " << it->first << " = " << it->second << std::endl;
 
   // Real
   for (std::map<std::string, akantu::Real>::const_iterator it = real_data.begin();
        it != real_data.end(); ++it)
     outfile << "Real " << it->first << " = " << it->second << std::endl;
  
   // Bool
   for (std::map<std::string, bool>::const_iterator it = bool_data.begin();
        it != bool_data.end(); ++it) {
     std::string b = "false";
     if (it->second)
       b = "true";
     outfile << "bool " << it->first << " = " << b << std::endl;
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 akantu::UInt ParameterReader::get<akantu::UInt>(std::string key) const {
   std::map<std::string,akantu::UInt>::const_iterator it;
   it = this->uint_data.find(key);
   
   // if not in map
   if (it == this->uint_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "UInt " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 akantu::ElementType ParameterReader::get<akantu::ElementType>(std::string key) const {
   std::map<std::string,akantu::ElementType>::const_iterator it;
   it = this->element_type_data.find(key);
   
   // if not in map
   if (it == this->element_type_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "ElementType " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 std::string ParameterReader::get<std::string>(std::string key) const {
   std::map<std::string,std::string>::const_iterator it;
   it = this->string_data.find(key);
   
   // if not in map
   if (it == this->string_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "string " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 /*
 template<>
 akantu::Surface ParameterData::get<akantu::Surface>(std::string key) const {
   std::map<std::string,akantu::Surface>::const_iterator it;
   it = this->surface_data.find(key);
   
   // if not in map
   if (it == this->surface_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "Surface " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 */
 
 /* -------------------------------------------------------------------------- */
 template<>
 akantu::Int ParameterReader::get<akantu::Int>(std::string key) const {
   std::map<std::string,akantu::Int>::const_iterator it;
   it = this->int_data.find(key);
   
   // if not in map
   if (it == this->int_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "Int " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 akantu::Real ParameterReader::get<akantu::Real>(std::string key) const {
   std::map<std::string,akantu::Real>::const_iterator it;
   it = this->real_data.find(key);
   
   // if not in map
   if (it == this->real_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "Real " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 bool ParameterReader::get<bool>(std::string key) const {
   std::map<std::string,bool>::const_iterator it;
   it = this->bool_data.find(key);
   
   // if not in map
   if (it == this->bool_data.end()) {
     std::cerr << " *** ERROR *** This data was not in input file. " 
 	      << "You need the following line in your input file: ";
     std::cerr << "bool " << key << " = ???" << std::endl;
     exit(EXIT_FAILURE);
   }
   
   else 
     return it->second;
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 bool ParameterReader::has<bool>(std::string key) const {
   std::map<std::string,bool>::const_iterator it;
   it = this->bool_data.find(key);
   return (it != this->bool_data.end());
 }
 template<>
 bool ParameterReader::has<std::string>(std::string key) const {
   std::map<std::string,std::string>::const_iterator it;
   it = this->string_data.find(key);
   return (it != this->string_data.end());
 }
 template<>
 bool ParameterReader::has<akantu::Int>(std::string key) const {
   std::map<std::string,akantu::Int>::const_iterator it;
   it = this->int_data.find(key);
   return (it != this->int_data.end());
 }
 template<>
 bool ParameterReader::has<akantu::UInt>(std::string key) const {
   std::map<std::string,akantu::UInt>::const_iterator it;
   it = this->uint_data.find(key);
   return (it != this->uint_data.end());
 }
 template<>
 bool ParameterReader::has<akantu::Real>(std::string key) const {
   std::map<std::string,akantu::Real>::const_iterator it;
   it = this->real_data.find(key);
   return (it != this->real_data.end());
 }
 
 /* -------------------------------------------------------------------------- */
 void ParameterReader::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
 
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "ParameterReader [" << std::endl;
   /*
   stream << space << this->element_type_data << std::endl;
   stream << space << this->string_data << std::endl;
   stream << space << this->surface_data << std::endl;
   stream << space << this->int_data << std::endl;
   stream << space << this->uint_data << std::endl;
   stream << space << this->real_data << std::endl;
   stream << space << this->bool_data << std::endl;
   */
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/common/parameter_reader.hh b/src/common/parameter_reader.hh
index 7c41b5444..e75749bbe 100644
--- a/src/common/parameter_reader.hh
+++ b/src/common/parameter_reader.hh
@@ -1,105 +1,99 @@
 /**
  * @file   parameter_reader.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  for simulations to read parameters from an input file
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_PARAMETER_READER_HH__
 #define __AST_PARAMETER_READER_HH__
 
 /* -------------------------------------------------------------------------- */
 // std
 #include <set>
 #include <map>
 
 // akantu
 #include "aka_common.hh"
 
-// simtools
-#include "ast_common.hh"
-
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class ParameterReader {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   ParameterReader();
   virtual ~ParameterReader() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// read input file
   void readInputFile(std::string file_name);
 
   /// write input file
   void writeInputFile(std::string file_name) const;
   
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   /// 
   template<typename T>
   T get(std::string key) const;
 
   template<typename T>
   bool has(std::string key) const;
   
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   /// type of data available
   std::set<std::string> data_types;
 
   /// data
   std::map<std::string,akantu::ElementType> element_type_data;
   std::map<std::string,std::string> string_data;
   std::map<std::string,akantu::Int> int_data;
   std::map<std::string,akantu::UInt> uint_data;
   std::map<std::string,akantu::Real> real_data;
   std::map<std::string,bool> bool_data;
 
   /// convert string to element type
   std::map<std::string, ElementType> _input_to_akantu_element_types;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "parameter_reader_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, const ParameterReader & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_PARAMETER_READER_HH__ */
diff --git a/src/common/synchronized_array.cc b/src/common/synchronized_array.cc
index 0374e0b94..efffb2de4 100644
--- a/src/common/synchronized_array.cc
+++ b/src/common/synchronized_array.cc
@@ -1,222 +1,222 @@
 /**
  * @file   synchronized_array.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of synchronized array function
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // std
 #include <iostream>
 #include <fstream>
 
 // simtools
 #include "synchronized_array.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template<class T>
 SynchronizedArray<T>::SynchronizedArray(UInt size,
 					UInt nb_component,
 					SynchronizedArray<T>::const_reference value,
 					const ID & id,
 					SynchronizedArray<T>::const_reference default_value,
 					const std::string restart_name) :
   SynchronizedArrayBase(),
   Array<T>(size, nb_component, value, id),
   default_value(default_value),
   restart_name(restart_name),
   deleted_elements(0),
   nb_added_elements(size),
   depending_arrays(0) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<class T>
 void SynchronizedArray<T>::syncElements(SyncChoice sync_choice) {
   AKANTU_DEBUG_IN();
 
   if (sync_choice == _deleted) {
     std::vector<SynchronizedArrayBase *>::iterator it;
     for (it=depending_arrays.begin(); it != depending_arrays.end(); ++it) {
       UInt vec_size = (*it)->syncDeletedElements(this->deleted_elements);
       AKANTU_DEBUG_ASSERT(vec_size == this->size,
 			  "Synchronized arrays do not have the same length" <<
 			  "(may be a double synchronization)");
     }
     this->deleted_elements.clear();
   }
 
   else if (sync_choice == _added) {
     std::vector<SynchronizedArrayBase *>::iterator it;
     for (it=depending_arrays.begin(); it != depending_arrays.end(); ++it) {
       UInt vec_size = (*it)->syncAddedElements(this->nb_added_elements);
       AKANTU_DEBUG_ASSERT(vec_size == this->size,
 			  "Synchronized arrays do not have the same length" <<
 			  "(may be a double synchronization)");
     }
     this->nb_added_elements = 0;
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<class T>
 UInt SynchronizedArray<T>::syncDeletedElements(std::vector<UInt> & del_elements) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_ASSERT(nb_added_elements == 0 && deleted_elements.size() == 0,
 		      "Cannot sync with a SynchronizedArray if it has already been modified");
 
   std::vector<UInt>::const_iterator it;
   for (it = del_elements.begin(); it != del_elements.end(); ++it) {
     erase(*it);
   }
   syncElements(_deleted);
 
   AKANTU_DEBUG_OUT();
   return this->size;
 }
 
 /* -------------------------------------------------------------------------- */
 template<class T>
 UInt SynchronizedArray<T>::syncAddedElements(UInt nb_add_elements) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_ASSERT(nb_added_elements == 0 && deleted_elements.size() == 0,
 		      "Cannot sync with a SynchronizedArray if it has already been modified");
 
   for (UInt i=0; i<nb_add_elements; ++i) {
     push_back(this->default_value);
   }
   syncElements(_added);
 
   AKANTU_DEBUG_OUT();
   return this->size;
 }
 
 /* -------------------------------------------------------------------------- */
 template<typename T>
 void SynchronizedArray<T>::registerDependingArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
 
   this->depending_arrays.push_back(&array);
   array.syncAddedElements(this->size);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<typename T>
 void SynchronizedArray<T>::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
 
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "SynchronizedArray<" << debug::demangle(typeid(T).name()) << "> [" << std::endl;
   stream << space << " + default_value     : " << this->default_value << std::endl;
   stream << space << " + nb_added_elements : " << this->nb_added_elements << std::endl;
   stream << space << " + deleted_elements  : ";
   for(std::vector<UInt>::const_iterator it = this->deleted_elements.begin();
       it != this->deleted_elements.end();
       ++it)
     stream << *it << " ";
   stream << std::endl;
 
   stream << space << " + depending_arrays : ";
   for (std::vector<SynchronizedArrayBase *>::const_iterator it = this->depending_arrays.begin();
        it!=this->depending_arrays.end();
        ++it)
     stream << (*it)->getID() << " ";
   stream << std::endl;
 
   Array<T>::printself(stream, indent+1);
 
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<typename T>
 void SynchronizedArray<T>::dumpRestartFile(std::string file_name) const {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_ASSERT(nb_added_elements == 0 && deleted_elements.size() == 0,
 		      "Restart File for SynchronizedArray " << this->id <<
 		      " should not be dumped as it is not synchronized yet");
 
   std::stringstream name;
   name << file_name << "-" << this->restart_name << ".rs";
 
   std::ofstream out_restart;
   out_restart.open(name.str().c_str());
 
   out_restart << this->size << " " << this->nb_component << std::endl;
   Real size_comp = this->size * this->nb_component;
   for (UInt i=0; i<size_comp; ++i)
     out_restart << std::setprecision(12) << this->values[i] << " ";
   //    out_restart << std::hex << std::setprecision(12) << this->values[i] << " ";
   out_restart <<  std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template<typename T>
 void SynchronizedArray<T>::readRestartFile(std::string file_name) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_ASSERT(nb_added_elements == 0 && deleted_elements.size() == 0,
 		      "Restart File for SynchronizedArray " << this->id <<
 		      " should not be read as it is not synchronized yet");
 
   std::stringstream name;
   name << file_name << "-" << this->restart_name << ".rs";
   std::ifstream infile;
   infile.open(name.str().c_str());
 
   std::string line;
 
   // get size and nb_component info
   AKANTU_DEBUG_ASSERT(infile.good(), "Could not read restart file for " <<
 		      "SynchronizedArray " << this->id);
   getline(infile, line);
   std::stringstream size_comp(line);
   size_comp >> this->size;
   size_comp >> this->nb_component;
 
   // get elements in array
   getline(infile, line);
   std::stringstream data(line);
   for (UInt i=0; i<this->size * this->nb_component; ++i) {
     AKANTU_DEBUG_ASSERT(!data.eof(), "Read SynchronizedArray " << this->id <<
 			" got to the end of the file before having read all data!");
     data >> this->values[i];
     //    data >> std::hex >> this->values[i];
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template class SynchronizedArray<Real>;
 template class SynchronizedArray<UInt>;
 template class SynchronizedArray<Int>;
 template class SynchronizedArray<bool>;
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/common/synchronized_array.hh b/src/common/synchronized_array.hh
index 8df0f9741..8e0edb5b9 100644
--- a/src/common/synchronized_array.hh
+++ b/src/common/synchronized_array.hh
@@ -1,195 +1,189 @@
 /**
  * @file   synchronized_array.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  synchronized array: a array can be registered to another (hereafter called top) array. If an element is added to or removed from the top array, the registered array removes or adds at the same position an element. The two arrays stay therefore synchronized.
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_SYNCHRONIZED_ARRAY_HH__
 #define __AST_SYNCHRONIZED_ARRAY_HH__
 
 /* -------------------------------------------------------------------------- */
 // std
 #include <vector>
 
 // akantu
 #include "aka_array.hh"
 
-// simtools
-#include "ast_common.hh"
-
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 enum SyncChoice {_added, _deleted};
 
 /* -------------------------------------------------------------------------- */
 class SynchronizedArrayBase {
 public:
   SynchronizedArrayBase() {};
   ~SynchronizedArrayBase() {};
 
   virtual ID getID() const { return "call should be virtual"; };
 
   virtual UInt syncDeletedElements(std::vector<UInt> & delete_el) = 0;
   virtual UInt syncAddedElements(UInt nb_added_el) = 0;
 };
 
 /* -------------------------------------------------------------------------- */
 template<class T>
 class SynchronizedArray : public SynchronizedArrayBase, protected Array<T> {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   typedef typename Array<T>::value_type      value_type;
   typedef typename Array<T>::reference       reference;
   typedef typename Array<T>::pointer_type    pointer_type;
   typedef typename Array<T>::const_reference const_reference;
   
   SynchronizedArray(UInt size, UInt nb_component,
 		   const_reference value, const ID & id,
 		   const_reference default_value, 
 		   const std::string restart_name);
   virtual ~SynchronizedArray() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// push_back
   inline void push_back(const_reference value);
   inline void push_back(const value_type new_element[]);
 
   /// erase
   inline void erase(UInt i);
   //template<typename R>
   //inline void erase(const iterator<R> & it);
   
   /// synchronize elements
   void syncElements(SyncChoice sync_choice);
 
   /// dump restart file
   void dumpRestartFile(std::string file_name) const;
   
   /// read restart file
   void readRestartFile(std::string file_name);
 
   /// register depending array
   void registerDependingArray(SynchronizedArrayBase & array);
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
   /// find position of element
   Int find(const T & elem) const { return Array<T>::find(elem); };
 
   /// set values to zero
   inline void clear() { Array<T>::clear(); };
   //  inline void clear() { memset(values, 0, size*nb_component*sizeof(T)); };
 
   /// set all entries of the array to the value t
   /// @param t value to fill the array with
   inline void set(T t) { Array<T>::set(t); }
 
   /// set
   template<template<typename> class C>
   inline void set(const C<T> & vm) { Array<T>::set(vm); };
 
   /// set all entries of the array to value t and set default value
   inline void setAndChangeDefault(T t) { 
     this->set(t); 
     this->default_value = t;
   }
 
   /// copy the content of an other array
   void copy(const SynchronizedArray<T> & vect) { Array<T>::copy(vect); };
   
   /// give the address of the memory allocated for this array
   T * storage() const { return Array<T>::storage(); };
   //  T * storage() const { return this->values; };
 
   // get nb component
   UInt getNbComponent() const { return Array<T>::getNbComponent(); };
 
 protected:
   UInt syncDeletedElements(std::vector<UInt> & del_elements);
   UInt syncAddedElements(UInt nb_add_elements);
 
   /* ------------------------------------------------------------------------ */
   /* Operators                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   inline reference operator()(UInt i, UInt j = 0) {
     return Array<T>::operator()(i,j);
   }
   inline const_reference operator()(UInt i, UInt j = 0) const {
     return Array<T>::operator()(i,j);
   }
  
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_SET_MACRO(DefaultValue, default_value, T);
 
   UInt getSize() const{ return this->size; };
 
   ID getID() const { return Array<T>::getID(); };
 
   const Array<T> & getArray() const {
     const Array<T> & a = *(dynamic_cast<const Array<T> *>(this));
     return a;
   };
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   /// init value when new elements added
   T default_value;
   
   /// restart file_name
   const std::string restart_name;
 
   /// elements that have been deleted
   std::vector<UInt> deleted_elements;
 
   /// number of elements to add
   UInt nb_added_elements;
 
   /// pointers to arrays to be updated
   std::vector<SynchronizedArrayBase *> depending_arrays;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 #include "synchronized_array_inline_impl.cc"
 
 /// standard output stream operator
 template <typename T>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const SynchronizedArray<T> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_SYNCHRONIZED_ARRAY_HH__ */
diff --git a/src/functions/boundary_functions.cc b/src/functions/boundary_functions.cc
index d942fded2..a27722761 100644
--- a/src/functions/boundary_functions.cc
+++ b/src/functions/boundary_functions.cc
@@ -1,63 +1,63 @@
 /**
  * @file   boundary_functions.cc
  *
  *
  *
  * @brief  
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 #include "boundary_functions.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 Real integrateResidual(const std::string & sub_boundary_name,
 		       const SolidMechanicsModel & model,
 		       UInt dir) {
   Real int_res = 0.;
   
   const Mesh & mesh = model.getMesh();
   const Array<Real> & residual = model.getResidual();
 
   // do not need try catch, as all subboundaries should be everywhere. 
   //  try {
   const ElementGroup & boundary = mesh.getElementGroup(sub_boundary_name);
   ElementGroup::const_node_iterator nit  = boundary.node_begin();
   ElementGroup::const_node_iterator nend = boundary.node_end();
   for (; nit != nend; ++nit) {
     bool is_local_node = mesh.isLocalOrMasterNode(*nit);
     if (is_local_node) {
       int_res += residual(*nit, dir);
     }
   }
   // } catch(debug::Exception e) {
   //   // AKANTU_DEBUG_ERROR("Error computing integrateResidual. Cannot get SubBoundary: " 
   //   // 		       << sub_boundary_name << " [" << e.what() << "]");
   // }
 
   StaticCommunicator::getStaticCommunicator().allReduce(&int_res, 1, _so_sum);
   return int_res;
 }
 
 /* -------------------------------------------------------------------------- */
 void boundaryFix(Mesh & mesh, 
 		 const std::vector<std::string> & sub_boundary_names) {
   
    std::vector<std::string>::const_iterator it  = sub_boundary_names.begin();
   std::vector<std::string>::const_iterator end = sub_boundary_names.end();
 
   for (; it != end; ++it) {
     if (mesh.element_group_find(*it) == mesh.element_group_end()) {
       mesh.createElementGroup(*it,mesh.getSpatialDimension()-1); // empty element group
     }
   }
 }
 
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/functions/boundary_functions.hh b/src/functions/boundary_functions.hh
index bb007d5c8..cf882b8fa 100644
--- a/src/functions/boundary_functions.hh
+++ b/src/functions/boundary_functions.hh
@@ -1,36 +1,31 @@
 /**
  * @file   boundary_functions.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  functions for boundaries
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // akantu
 #include "aka_common.hh"
 #include "solid_mechanics_model.hh"
 
-// simtools
-#include "ast_common.hh"
-
-__BEGIN_SIMTOOLS__
-
-using namespace akantu;
+__BEGIN_AKANTU__
 
 Real integrateResidual(const std::string & sub_boundary_name,
 		       const SolidMechanicsModel & model,
 		       UInt dir);
 
 /// this is a fix so that all subboundaries exist on all procs
 void boundaryFix(Mesh & mesh,
 		 const std::vector<std::string> & sub_boundary_names);
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/functions/node_filter.hh b/src/functions/node_filter.hh
index 54fb26562..eabff8efc 100644
--- a/src/functions/node_filter.hh
+++ b/src/functions/node_filter.hh
@@ -1,110 +1,106 @@
 /**
  * @file   node_filter.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  to filter nodes with functors
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NODE_FILTER_HH__
 #define __AST_NODE_FILTER_HH__
 
 /* -------------------------------------------------------------------------- */
 // akantu
 #include "aka_common.hh"
 #include "mesh_filter.hh"
 
-// simtools
-#include "ast_common.hh"
 
-__BEGIN_SIMTOOLS__
-
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class GeometryFilter : public NodeFilterFunctor {
 
 public:
   GeometryFilter(const Mesh & mesh,
 		 UInt dir,
 		 Real limit) :
     NodeFilterFunctor(),
     mesh(mesh), dir(dir), limit(limit) { 
     this->positions = &(mesh.getNodes());
   };
   ~GeometryFilter() {};
   
   bool operator() (UInt node) {
     AKANTU_DEBUG_TO_IMPLEMENT();
   };
 
 protected:
   const Mesh & mesh;
   UInt dir;
   Real limit;
   const Array<Real> * positions;
 };
 
 /* -------------------------------------------------------------------------- */
 class FilterPositionsGreaterThan : public GeometryFilter {
 public:
   FilterPositionsGreaterThan(const Mesh & mesh,
 			     UInt dir,
 			     Real limit) : GeometryFilter(mesh, dir, limit) {};
   ~FilterPositionsGreaterThan() {};
 
   bool operator() (UInt node) {
     AKANTU_DEBUG_IN();
     bool to_filter = true;
     if((*this->positions)(node,this->dir) > this->limit)
       to_filter = false;
     AKANTU_DEBUG_OUT();
     return to_filter;
   };
 };
 
 /* -------------------------------------------------------------------------- */
 class FilterPositionsLessThan : public GeometryFilter {
 public:
   FilterPositionsLessThan(const Mesh & mesh,
 			     UInt dir,
 			     Real limit) : GeometryFilter(mesh, dir, limit) {};
   ~FilterPositionsLessThan() {};
 
   bool operator() (UInt node) {
     AKANTU_DEBUG_IN();
     bool to_filter = true;
     if((*this->positions)(node,this->dir) < this->limit)
       to_filter = false;
     AKANTU_DEBUG_OUT();
     return to_filter;
   };
 };
 
 /* -------------------------------------------------------------------------- */
 // this filter is erase because the convention of filter has changed!!
 // filter == true -> keep node
 
 // template<class FilterType>
 // void applyNodeFilter(Array<UInt> & nodes, FilterType & filter) {
 
 //   Array<UInt>::iterator<> it = nodes.begin();
 
 //   for (; it != nodes.end(); ++it) {
 //     if (filter(*it)) {
 //       it = nodes.erase(it);
 //     }
 //   }
 // }; 
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NODE_FILTER_HH__ */
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_coulomb.hh b/src/ntn_contact/friction_laws/ntn_friclaw_coulomb.hh
index 064a08183..d1bdb1efc 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_coulomb.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_coulomb.hh
@@ -1,97 +1,95 @@
 /**
  * @file   ntn_friclaw_coulomb.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  coulomb friction with \mu_s = \mu_k (constant)
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_FRICLAW_COULOMB_HH__
 #define __AST_NTN_FRICLAW_COULOMB_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_no_regularisation.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 template <class Regularisation = NTNFricRegNoRegularisation>
 class NTNFricLawCoulomb : public Regularisation {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricLawCoulomb(NTNBaseContact * contact,
 		    const FrictionID & id = "coulomb",
 		    const MemoryID & memory_id = 0);
   virtual ~NTNFricLawCoulomb() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// register synchronizedarrays for sync
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
 
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
   
 protected:
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength();
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   // friction coefficient
   SynchronizedArray<Real> mu;
 };
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 /// standard output stream operator
 template <class Regularisation>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricLawCoulomb<Regularisation> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #include "ntn_friclaw_coulomb_tmpl.hh"
 
 #endif /* __AST_NTN_FRICLAW_COULOMB_HH__ */
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh b/src/ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh
index 532e07b3b..f00661ee5 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_coulomb_tmpl.hh
@@ -1,147 +1,147 @@
 /**
  * @file   ntn_friclaw_coulomb_tmpl.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of coulomb friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #include "dumper_nodal_field.hh"
 
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 NTNFricLawCoulomb<Regularisation>::NTNFricLawCoulomb(NTNBaseContact * contact,
 						     const FrictionID & id,
 						     const MemoryID & memory_id) :
   Regularisation(contact,id,memory_id),
   mu(0,1,0.,id+":mu",0.,"mu") {
   AKANTU_DEBUG_IN();
 
   Regularisation::registerSynchronizedArray(this->mu);
 
   this->registerParam("mu", this->mu, _pat_parsmod, "friction coefficient");
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::computeFrictionalStrength() {
   AKANTU_DEBUG_IN();
 
   // get contact arrays
   const SynchronizedArray<bool> & is_in_contact = this->internalGetIsInContact();
   const SynchronizedArray<Real> & pressure = this->internalGetContactPressure();
 
   // array to fill
   SynchronizedArray<Real> & strength = this->internalGetFrictionalStrength();
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // node pair is NOT in contact
     if (!is_in_contact(n))
       strength(n) = 0.;
 
     // node pair is in contact
     else {
       // compute frictional strength
       strength(n) = this->mu(n) * pressure(n);
     }
   }
 
   Regularisation::computeFrictionalStrength();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
 
   this->mu.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
 
   this->mu.dumpRestartFile(file_name);
 
   Regularisation::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
 
   this->mu.readRestartFile(file_name);
 
   Regularisation::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTNFricLawCoulomb [" << std::endl;
   Regularisation::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawCoulomb<Regularisation>::addDumpFieldToDumper(const std::string & dumper_name,
 							     const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
 
   if(field_id == "mu") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->mu.getArray()));
   }
   /*
   else if (field_id == "frictional_contact_pressure") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new DumperIOHelper::NodalField<Real>(this->frictional_contact_pressure.getArray()));
   }
   */
   else {
     Regularisation::addDumpFieldToDumper(dumper_name, field_id);
   }
 
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh b/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh
index 4dae2440e..bc51f045f 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive.hh
@@ -1,103 +1,101 @@
 /**
  * @file   ntn_friclaw_linear_cohesive.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  linear cohesive law
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_FRICLAW_LINEAR_COHESIVE_HH__
 #define __AST_NTN_FRICLAW_LINEAR_COHESIVE_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_no_regularisation.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 template <class Regularisation = NTNFricRegNoRegularisation>
 class NTNFricLawLinearCohesive : public Regularisation {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricLawLinearCohesive(NTNBaseContact * contact,
 			   const FrictionID & id = "linear_cohesive",
 			   const MemoryID & memory_id = 0);
   virtual ~NTNFricLawLinearCohesive() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// register synchronizedarrays for sync
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
 
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
   
 protected:
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength();
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
   
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   // fracture energy
   SynchronizedArray<Real> G_c;
 
   // peak value of cohesive law
   SynchronizedArray<Real> tau_c;
 
   // residual value of cohesive law (for slip > d_c)
   SynchronizedArray<Real> tau_r;
 };
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 /// standard output stream operator
 template <class Regularisation>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricLawLinearCohesive<Regularisation> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #include "ntn_friclaw_linear_cohesive_tmpl.hh"
 
 #endif /* __AST_NTN_FRICLAW_LINEAR_COHESIVE_HH__ */
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh b/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh
index 59158a6ae..3dca6e87d 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_linear_cohesive_tmpl.hh
@@ -1,170 +1,170 @@
 /**
  * @file   ntn_friclaw_linear_cohesive_tmpl.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of linear cohesive law
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 //#include "dumper_text.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 NTNFricLawLinearCohesive<Regularisation>::NTNFricLawLinearCohesive(NTNBaseContact * contact,
 								   const FrictionID & id,
 								   const MemoryID & memory_id) :
   Regularisation(contact,id,memory_id),
   G_c(0,1,0.,id+":G_c",0.,"G_c"),
   tau_c(0,1,0.,id+":tau_c",0.,"tau_c"),
   tau_r(0,1,0.,id+":tau_r",0.,"tau_r") {
   AKANTU_DEBUG_IN();
 
   Regularisation::registerSynchronizedArray(this->G_c);
   Regularisation::registerSynchronizedArray(this->tau_c);
   Regularisation::registerSynchronizedArray(this->tau_r);
 
   this->registerParam("G_c",   this->G_c,   _pat_parsmod, "fracture energy");
   this->registerParam("tau_c", this->tau_c, _pat_parsmod, "peak shear strength");
   this->registerParam("tau_r", this->tau_r, _pat_parsmod, "residual shear strength");
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::computeFrictionalStrength() {
   AKANTU_DEBUG_IN();
 
   // get arrays
   const SynchronizedArray<bool> & is_in_contact = this->internalGetIsInContact();
   const SynchronizedArray<Real> & slip  = this->internalGetSlip();
 
   // array to fill
   SynchronizedArray<Real> & strength = this->internalGetFrictionalStrength();
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // node pair is NOT in contact
     if (!is_in_contact(n))
       strength(n) = 0.;
 
     // node pair is in contact
     else {
       if (this->G_c(n) == 0.) {
 	// strength(n) = 0.;
 	strength(n) = this->tau_r(n);
       }
       else {
 	Real slope = (this->tau_c(n) - this->tau_r(n)) * (this->tau_c(n) - this->tau_r(n)) / (2*this->G_c(n));
 	// no strength < tau_r
 	strength(n) = std::max(this->tau_c(n) - slope * slip(n), this->tau_r(n));
 	// strength(n) = std::max(this->tau_c(n) - slope * slip(n), 0.); // no negative strength
 
 	// if we want to keep strength loss after restick,
 	// we need to do min between new strength and previous strength
       }
     }
   }
 
   Regularisation::computeFrictionalStrength();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
 
   this->G_c.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
 
   this->G_c.dumpRestartFile(file_name);
   this->tau_c.dumpRestartFile(file_name);
   this->tau_r.dumpRestartFile(file_name);
 
   Regularisation::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
 
   this->G_c.readRestartFile(file_name);
   this->tau_c.readRestartFile(file_name);
   this->tau_r.readRestartFile(file_name);
 
   Regularisation::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::printself(std::ostream & stream,
 							 int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTNFricLawLinearCohesive [" << std::endl;
   Regularisation::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearCohesive<Regularisation>::addDumpFieldToDumper(const std::string & dumper_name,
 							     const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
 
   if(field_id == "G_c") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->G_c.getArray()));
   }
   else if(field_id == "tau_c") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->tau_c.getArray()));
   }
   else if(field_id == "tau_r") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->tau_r.getArray()));
   }
   else {
     Regularisation::addDumpFieldToDumper(dumper_name, field_id);
   }
 
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh b/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh
index f01a3ea8b..40e39c65a 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening.hh
@@ -1,105 +1,103 @@
 /**
  * @file   ntn_friclaw_linear_slip_weakening.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  linear slip weakening
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_FRICLAW_LINEAR_SLIP_WEAKENING_HH__
 #define __AST_NTN_FRICLAW_LINEAR_SLIP_WEAKENING_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_friclaw_coulomb.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 template <class Regularisation = NTNFricRegNoRegularisation>
 class NTNFricLawLinearSlipWeakening : public NTNFricLawCoulomb<Regularisation> {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricLawLinearSlipWeakening(NTNBaseContact * contact,
 				const FrictionID & id = "linear_slip_weakening",
 				const MemoryID & memory_id = 0);
   virtual ~NTNFricLawLinearSlipWeakening() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// register synchronizedarrays for sync
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
 
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
   
 protected:
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength();
   /// computes the friction coefficient as a function of slip
   virtual void computeFrictionCoefficient();
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
   
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   // static coefficient of friction
   SynchronizedArray<Real> mu_s;
 
   // kinetic coefficient of friction
   SynchronizedArray<Real> mu_k;
 
   // Dc the length over which slip weakening happens
   SynchronizedArray<Real> d_c;
 };
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 /// standard output stream operator
 template <class Regularisation>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricLawLinearSlipWeakening<Regularisation> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #include "ntn_friclaw_linear_slip_weakening_tmpl.hh"
 
 #endif /* __AST_NTN_FRICLAW_LINEAR_SLIP_WEAKENING_HH__ */
diff --git a/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh b/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh
index 783cf4a5e..71cde4c78 100644
--- a/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh
+++ b/src/ntn_contact/friction_laws/ntn_friclaw_linear_slip_weakening_tmpl.hh
@@ -1,171 +1,171 @@
 /**
  * @file   ntn_friclaw_linear_slip_weakening_tmpl.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of linear slip weakening
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #include "dumper_text.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 NTNFricLawLinearSlipWeakening<Regularisation>::NTNFricLawLinearSlipWeakening(NTNBaseContact * contact,
 									     const FrictionID & id,
 									     const MemoryID & memory_id) :
   NTNFricLawCoulomb<Regularisation>(contact,id,memory_id),
   mu_s(0,1,0.,id+":mu_s",0.,"mu_s"),
   mu_k(0,1,0.,id+":mu_k",0.,"mu_k"),
   d_c(0,1,0.,id+":d_c",0.,"d_c") {
   AKANTU_DEBUG_IN();
 
   NTNFricLawCoulomb<Regularisation>::registerSynchronizedArray(this->mu_s);
   NTNFricLawCoulomb<Regularisation>::registerSynchronizedArray(this->mu_k);
   NTNFricLawCoulomb<Regularisation>::registerSynchronizedArray(this->d_c);
 
   this->registerParam("mu_s", this->mu_s, _pat_parsmod, "static friction coefficient");
   this->registerParam("mu_k", this->mu_k, _pat_parsmod, "kinetic friction coefficient");
   this->registerParam("d_c",  this->d_c,  _pat_parsmod, "slip weakening length");
 
   this->setParamAccessType("mu", _pat_readable);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::computeFrictionalStrength() {
   AKANTU_DEBUG_IN();
 
   computeFrictionCoefficient();
   NTNFricLawCoulomb<Regularisation>::computeFrictionalStrength();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::computeFrictionCoefficient() {
   AKANTU_DEBUG_IN();
 
   // get arrays
   const SynchronizedArray<bool> & stick = this->internalGetIsSticking();
   const SynchronizedArray<Real> & slip  = this->internalGetSlip();
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     if (stick(n)) {
       this->mu(n) = this->mu_s(n);
     }
     else {
       if (slip(n) >= this->d_c(n)) {
 	this->mu(n) = this->mu_k(n);
       }
       else {
 	// mu = mu_k + (1 - slip / Dc) * (mu_s - mu_k)
 	this->mu(n) = this->mu_k(n)
 		    + (1 - (slip(n) / this->d_c(n))) * (this->mu_s(n) - this->mu_k(n));
       }
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
 
   this->mu_s.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
 
   this->mu_s.dumpRestartFile(file_name);
   this->mu_k.dumpRestartFile(file_name);
   this->d_c.dumpRestartFile(file_name);
 
   NTNFricLawCoulomb<Regularisation>::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
 
   this->mu_s.readRestartFile(file_name);
   this->mu_k.readRestartFile(file_name);
   this->d_c.readRestartFile(file_name);
 
   NTNFricLawCoulomb<Regularisation>::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTNFricLawLinearSlipWeakening [" << std::endl;
   NTNFricLawCoulomb<Regularisation>::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <class Regularisation>
 void NTNFricLawLinearSlipWeakening<Regularisation>::addDumpFieldToDumper(const std::string & dumper_name,
 							     const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
 
   if(field_id == "mu_s") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->mu_s.getArray()));
   }
   else if(field_id == "mu_k") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->mu_k.getArray()));
   }
   else if(field_id == "d_c") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->d_c.getArray()));
   }
   else {
     NTNFricLawCoulomb<Regularisation>::addDumpFieldToDumper(dumper_name, field_id);
   }
 
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc b/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc
index f52da7a40..5bc2c340f 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.cc
@@ -1,147 +1,147 @@
 /**
  * @file   ntn_fricreg_no_regularisation.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of no regularisation
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_no_regularisation.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNFricRegNoRegularisation::NTNFricRegNoRegularisation(NTNBaseContact * contact,
 						       const FrictionID & id,
 						       const MemoryID & memory_id) :
   NTNBaseFriction(contact, id, memory_id),
   frictional_contact_pressure(0,1,0.,id+":frictional_contact_pressure",0.,
 			      "frictional_contact_pressure") {
   AKANTU_DEBUG_IN();
   
   NTNBaseFriction::registerSynchronizedArray(this->frictional_contact_pressure);
 
   this->registerParam("frictional_contact_pressure", this->frictional_contact_pressure,
 		      _pat_internal , "contact pressure used for friction law");
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 const SynchronizedArray<Real> & NTNFricRegNoRegularisation::internalGetContactPressure() {
   AKANTU_DEBUG_IN();
 
   this->computeFrictionalContactPressure();
 
   AKANTU_DEBUG_OUT();
   return this->frictional_contact_pressure;
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::computeFrictionalContactPressure() {
   AKANTU_DEBUG_IN();
   
   SolidMechanicsModel & model = this->contact->getModel();
   UInt dim = model.getSpatialDimension();
 
   // get contact arrays
   const SynchronizedArray<bool> & is_in_contact = this->internalGetIsInContact();
   const Array<Real> & pressure = this->contact->getContactPressure().getArray();
   Array<Real>::const_iterator< Vector<Real> > it = pressure.begin(dim);
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // node pair is NOT in contact
     if (!is_in_contact(n))
       this->frictional_contact_pressure(n) = 0.;
 
     // node pair is in contact
     else {
       // compute frictional contact pressure
       const Vector<Real> & pres = it[n];
       this->frictional_contact_pressure(n) = pres.norm();
     }
   }
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
   
   this->frictional_contact_pressure.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
   
   this->frictional_contact_pressure.dumpRestartFile(file_name);
 
   NTNBaseFriction::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
   
   this->frictional_contact_pressure.readRestartFile(file_name);
 
   NTNBaseFriction::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::printself(std::ostream & stream, 
 					   int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTNFricRegNoRegularisation [" << std::endl;
   NTNBaseFriction::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegNoRegularisation::addDumpFieldToDumper(const std::string & dumper_name,
 						      const std::string & field_id) {
   AKANTU_DEBUG_IN();
   
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
   
   if (field_id == "frictional_contact_pressure") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->frictional_contact_pressure.getArray()));
   }
   else {
     NTNBaseFriction::addDumpFieldToDumper(dumper_name, field_id);
   }
   
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh b/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh
index f020378f5..8301e296a 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_no_regularisation.hh
@@ -1,122 +1,120 @@
 /**
  * @file   ntn_fricreg_no_regularisation.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  regularisation that does nothing
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 
 #ifndef __AST_NTN_FRICREG_NO_REGULARISATION_HH__
 #define __AST_NTN_FRICREG_NO_REGULARISATION_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_friction.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 class NTNFricRegNoRegularisation : public NTNBaseFriction {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricRegNoRegularisation(NTNBaseContact * contact,
 			     const FrictionID & id = "no_regularisation",
 			     const MemoryID & memory_id = 0);
   virtual ~NTNFricRegNoRegularisation() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// set to steady state for no regularisation -> do nothing
   virtual void setToSteadyState() {};
 
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
   virtual void dumpRestart(const std::string & file_name) const;
   virtual void readRestart(const std::string & file_name);
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
 protected:
   virtual void computeFrictionalContactPressure();
 
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength() {};
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
   
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
 protected:
   /// get the is_in_contact array
   virtual const SynchronizedArray<bool> & internalGetIsInContact() {
     return this->contact->getIsInContact();
   };
 
   /// get the contact pressure (the norm: scalar value)
   virtual const SynchronizedArray<Real> & internalGetContactPressure();
 
   /// get the frictional strength array
   virtual SynchronizedArray<Real> & internalGetFrictionalStrength() {
     return this->frictional_strength;
   };
 
   /// get the is_sticking array
   virtual SynchronizedArray<bool> & internalGetIsSticking() {
     return this->is_sticking;
   }
   
   /// get the slip array
   virtual SynchronizedArray<Real> & internalGetSlip() {
     return this->slip;
   }
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   // contact pressure (absolut value) for computation of friction
   SynchronizedArray<Real> frictional_contact_pressure;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntn_fricreg_no_regularisation_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricRegNoRegularisation & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_FRICREG_NO_REGULARISATION_HH__ */
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc b/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc
index ed60f2dd6..a51ce0fc4 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.cc
@@ -1,154 +1,154 @@
 /**
  * @file   ntn_fricreg_rubin_ampuero.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of no regularisation
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_rubin_ampuero.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNFricRegRubinAmpuero::NTNFricRegRubinAmpuero(NTNBaseContact * contact,
 					       const FrictionID & id,
 					       const MemoryID & memory_id) :
   NTNFricRegNoRegularisation(contact, id, memory_id),
   t_star(0,1,0.,id+":t_star",0.,"t_star") {
   AKANTU_DEBUG_IN();
   
   NTNFricRegNoRegularisation::registerSynchronizedArray(this->t_star);
 
   this->registerParam("t_star", this->t_star, _pat_parsmod, "time scale of regularization");
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 const SynchronizedArray<Real> & NTNFricRegRubinAmpuero::internalGetContactPressure() {
   AKANTU_DEBUG_IN();
   
   SolidMechanicsModel & model = this->contact->getModel();
   UInt dim = model.getSpatialDimension();
   Real delta_t = model.getTimeStep();
   
   // get contact arrays
   const SynchronizedArray<bool> & is_in_contact = this->internalGetIsInContact();
   const Array<Real> & pressure = this->contact->getContactPressure().getArray();
   Array<Real>::const_iterator< Vector<Real> > it = pressure.begin(dim);
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // node pair is NOT in contact
     if (!is_in_contact(n))
       this->frictional_contact_pressure(n) = 0.;
 
     // if t_star is too small compute like Coulomb friction (without regularization)
     else if (Math::are_float_equal(this->t_star(n), 0.)) {
       const Vector<Real> & pres = it[n];
       this->frictional_contact_pressure(n) = pres.norm();
     }
     
     else {
       // compute frictional contact pressure
       // backward euler method: first order implicit numerical integration method
       // \reg_pres_n+1 = (\reg_pres_n + \delta_t / \t_star * \cur_pres)
       //               / (1 + \delta_t / \t_star)
       Real alpha = delta_t / this->t_star(n);
       const Vector<Real> & pres = it[n];
       this->frictional_contact_pressure(n) += alpha * pres.norm();
       this->frictional_contact_pressure(n) /= 1 + alpha;
     }
   }
 
   AKANTU_DEBUG_OUT();
   return this->frictional_contact_pressure;
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::setToSteadyState() {
   AKANTU_DEBUG_IN();
   NTNFricRegNoRegularisation::computeFrictionalContactPressure();
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
   
   this->t_star.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
   
   this->t_star.dumpRestartFile(file_name);
 
   NTNFricRegNoRegularisation::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
   
   this->t_star.readRestartFile(file_name);
 
   NTNFricRegNoRegularisation::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::printself(std::ostream & stream, 
 				       int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTNFricRegRubinAmpuero [" << std::endl;
   NTNFricRegNoRegularisation::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegRubinAmpuero::addDumpFieldToDumper(const std::string & dumper_name,
 						  const std::string & field_id) {
   AKANTU_DEBUG_IN();
   
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
   
   if (field_id == "t_star") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->t_star.getArray()));
   }
   else {
     NTNFricRegNoRegularisation::addDumpFieldToDumper(dumper_name, field_id);
   }
   
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh b/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh
index e0505d8d2..b6f3472de 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_rubin_ampuero.hh
@@ -1,93 +1,91 @@
 /**
  * @file   ntn_fricreg_rubin_ampuero.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  regularisation that regularizes the contact pressure
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_FRICREG_RUBIN_AMPUERO_HH__
 #define __AST_NTN_FRICREG_RUBIN_AMPUERO_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_no_regularisation.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 class NTNFricRegRubinAmpuero : public NTNFricRegNoRegularisation {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricRegRubinAmpuero(NTNBaseContact * contact,
 			 const FrictionID & id = "rubin_ampuero",
 			 const MemoryID & memory_id = 0);
   virtual ~NTNFricRegRubinAmpuero() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
   virtual void dumpRestart(const std::string & file_name) const;
   virtual void readRestart(const std::string & file_name);
 
   virtual void setToSteadyState();
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
   
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
 protected:
   /// get the contact pressure (the norm: scalar value)
   virtual const SynchronizedArray<Real> & internalGetContactPressure();
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   SynchronizedArray<Real> t_star;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntn_fricreg_rubin_ampuero_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricRegRubinAmpuero & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_FRICREG_RUBIN_AMPUERO_HH__ */
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc b/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc
index db3f18e70..068ec3dd6 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.cc
@@ -1,144 +1,144 @@
 /**
  * @file   ntn_fricreg_simplified_prakash_clifton.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of simplified prakash clifton with one parameter
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_simplified_prakash_clifton.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNFricRegSimplifiedPrakashClifton::NTNFricRegSimplifiedPrakashClifton(NTNBaseContact * contact,
 								       const FrictionID & id,
 								       const MemoryID & memory_id) :
   NTNFricRegNoRegularisation(contact, id, memory_id),
   t_star(0,1,0.,id+":t_star",0.,"t_star"),
   spc_internal(0,1,0.,id+":spc_internal",0.,"spc_internal") {
   AKANTU_DEBUG_IN();
   
   NTNFricRegNoRegularisation::registerSynchronizedArray(this->t_star);
   NTNFricRegNoRegularisation::registerSynchronizedArray(this->spc_internal);
 
   this->registerParam("t_star", this->t_star, _pat_parsmod, "time scale of regularisation");
   this->registerParam("spc_internal", this->spc_internal, _pat_internal, "");
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::computeFrictionalStrength() {
   AKANTU_DEBUG_IN();
   
   SolidMechanicsModel & model = this->contact->getModel();
   Real delta_t = model.getTimeStep();
   
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     Real alpha = delta_t / this->t_star(n);
     this->frictional_strength(n) += alpha * this->spc_internal(n);
     this->frictional_strength(n) /= 1 + alpha;
   }  
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::setToSteadyState() {
   AKANTU_DEBUG_IN();
 
   /// fill the spc_internal array
   computeFrictionalStrength();
 
   /// set strength without regularisation
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     this->frictional_strength(n) = this->spc_internal(n);
   }  
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
   
   this->t_star.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
   
   this->t_star.dumpRestartFile(file_name);
   this->spc_internal.dumpRestartFile(file_name);
 
   NTNFricRegNoRegularisation::dumpRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
   
   this->t_star.readRestartFile(file_name);
   this->spc_internal.readRestartFile(file_name);
 
   NTNFricRegNoRegularisation::readRestart(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::printself(std::ostream & stream, 
 						   int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTNFricRegSimplifiedPrakashClifton [" << std::endl;
   NTNFricRegNoRegularisation::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNFricRegSimplifiedPrakashClifton::addDumpFieldToDumper(const std::string & dumper_name,
 							      const std::string & field_id) {
   AKANTU_DEBUG_IN();
   
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
   
   if (field_id == "t_star") {
     this->internalAddDumpFieldToDumper(dumper_name,
 				       field_id,
 				       new dumper::NodalField<Real>(this->t_star.getArray()));
   }
   else {
     NTNFricRegNoRegularisation::addDumpFieldToDumper(dumper_name, field_id);
   }
   
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh b/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh
index 13a898773..40e621670 100644
--- a/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh
+++ b/src/ntn_contact/friction_regularisations/ntn_fricreg_simplified_prakash_clifton.hh
@@ -1,102 +1,100 @@
 /**
  * @file   ntn_fricreg_simplified_prakash_clifton.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  regularisation that regularizes the frictional strength with one parameter
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_FRICREG_SIMPLIFIED_PRAKASH_CLIFTON_HH__
 #define __AST_NTN_FRICREG_SIMPLIFIED_PRAKASH_CLIFTON_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_fricreg_no_regularisation.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
-using namespace akantu;
-
 class NTNFricRegSimplifiedPrakashClifton : public NTNFricRegNoRegularisation {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNFricRegSimplifiedPrakashClifton(NTNBaseContact * contact,
 			 const FrictionID & id = "simplified_prakash_clifton",
 			 const MemoryID & memory_id = 0);
   virtual ~NTNFricRegSimplifiedPrakashClifton() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
   virtual void dumpRestart(const std::string & file_name) const;
   virtual void readRestart(const std::string & file_name);
 
   virtual void setToSteadyState();
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
 protected:
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength();
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
   
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
 protected:
   /// get the frictional strength array
   virtual SynchronizedArray<Real> & internalGetFrictionalStrength() {
     return this->spc_internal;
   };
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   SynchronizedArray<Real> t_star;
 
   // to get the incremental frictional strength
   SynchronizedArray<Real> spc_internal;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntn_fricreg_simplified_prakash_clifton_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFricRegSimplifiedPrakashClifton & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_FRICREG_SIMPLIFIED_PRAKASH_CLIFTON_HH__ */
diff --git a/src/ntn_contact/ntn_base_contact.cc b/src/ntn_contact/ntn_base_contact.cc
index 7bf9d7690..d97df5cf4 100644
--- a/src/ntn_contact/ntn_base_contact.cc
+++ b/src/ntn_contact/ntn_base_contact.cc
@@ -1,556 +1,556 @@
 /**
  * @file   ntn_base_contact.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of ntn base contact
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_contact.hh"
 #include "dumpable_inline_impl.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNContactSynchElementFilter::NTNContactSynchElementFilter(NTNBaseContact * contact) :
   contact(contact),
   connectivity(contact->getModel().getMesh().getConnectivities()) {
   AKANTU_DEBUG_IN();
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 bool NTNContactSynchElementFilter::operator()(const Element & e) {
   AKANTU_DEBUG_IN();
 
   ElementType type = e.type;
   UInt element = e.element;
   GhostType ghost_type = e.ghost_type;
   
   // loop over all nodes of this element
   bool need_element = false;
   UInt nb_nodes = Mesh::getNbNodesPerElement(type);
   for (UInt n=0; n<nb_nodes; ++n) {
     UInt nn = this->connectivity(type, ghost_type)(element,n);
     
     // if one nodes is in this contact, we need this element
     if (this->contact->getNodeIndex(nn) >= 0) {
       need_element = true;
       break;
     }
   }
 
   AKANTU_DEBUG_OUT();
   return need_element;
 }
 
 /* -------------------------------------------------------------------------- */
 NTNBaseContact::NTNBaseContact(SolidMechanicsModel & model,
 			       const ContactID & id,
 			       const MemoryID & memory_id) : 
   Memory(id,memory_id), Dumpable(), model(model),
   slaves(0,1,0,id+":slaves",std::numeric_limits<UInt>::quiet_NaN(),"slaves"),
   normals(0,model.getSpatialDimension(),0,id+":normals",
 	  std::numeric_limits<Real>::quiet_NaN(),"normals"),
   contact_pressure(0,model.getSpatialDimension(),0,id+":contact_pressure",
 		   std::numeric_limits<Real>::quiet_NaN(),"contact_pressure"),
   is_in_contact(0,1,false,id+":is_in_contact",false,"is_in_contact"),
   lumped_boundary_slaves(0,1,0,id+":lumped_boundary_slaves",
 			 std::numeric_limits<Real>::quiet_NaN(),"lumped_boundary_slaves"),
   impedance(0,1,0,id+":impedance",std::numeric_limits<Real>::quiet_NaN(),"impedance"),
   contact_surfaces(),
   slave_elements("slave_elements", id, memory_id),
   node_to_elements(),
   synch_registry(NULL)
 {
   AKANTU_DEBUG_IN();
 
   FEEngine & boundary_fem = this->model.getFEEngineBoundary();
   for (ghost_type_t::iterator gt = ghost_type_t::begin();  gt != ghost_type_t::end(); ++gt) {
     boundary_fem.initShapeFunctions(*gt);
   }
 
   Mesh & mesh = this->model.getMesh();
   UInt spatial_dimension = this->model.getSpatialDimension();
 
   mesh.initElementTypeMapArray(this->slave_elements,
 			       1,
 			       spatial_dimension - 1);
 
   MeshUtils::buildNode2Elements(mesh,
 				this->node_to_elements,
 				spatial_dimension - 1);
 
   this->registerDumper<DumperText>("text_all", id, true);
   this->addDumpFilteredMesh(mesh, 
 			    slave_elements, 
 			    slaves.getArray(), 
 			    spatial_dimension - 1, 
 			    _not_ghost,
 			    _ek_regular);
 
   // parallelisation
   this->synch_registry = new SynchronizerRegistry(*this);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 NTNBaseContact::~NTNBaseContact() {
   AKANTU_DEBUG_IN();
 
   if(this->synch_registry) delete this->synch_registry;
 
   if(this->synchronizer) delete this->synchronizer;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::initParallel() {
   AKANTU_DEBUG_IN();
 
   NTNContactSynchElementFilter elem_filter(this);
   this->synchronizer = FilteredSynchronizer::
     createFilteredSynchronizer(this->model.getSynchronizer(),
 			       elem_filter);
 
   this->synch_registry->registerSynchronizer(*(this->synchronizer), _gst_cf_nodal);
   this->synch_registry->registerSynchronizer(*(this->synchronizer), _gst_cf_incr);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::findBoundaryElements(const Array<UInt> & interface_nodes, 
 					  ElementTypeMapArray<UInt> & elements) {
   AKANTU_DEBUG_IN();
 
   UInt nb_interface_nodes = interface_nodes.getSize();
   const ElementTypeMapArray<UInt> & connectivity = this->model.getMesh().getConnectivities();
   
   // add connected boundary elements that have all nodes on this contact
   for (UInt i=0; i<nb_interface_nodes; ++i) {
     UInt node = interface_nodes(i);
     
     CSR<Element>::iterator it   = this->node_to_elements.begin(node);
     CSR<Element>::iterator it_e = this->node_to_elements.end(node);
     for (; it != it_e; ++it) { // loop over all elements connected to node
       ElementType type = it->type;
       UInt element = it->element;
       GhostType ghost_type = it->ghost_type;
 
       UInt nb_nodes = Mesh::getNbNodesPerElement(type);
       UInt nb_found_nodes = 0;
       for (UInt n=0; n<nb_nodes; ++n) {
 	UInt nn = connectivity(type,ghost_type)(element,n);
 	if (interface_nodes.find(nn) >= 0)
 	  nb_found_nodes++;
 	else
 	  break;
       }
       
       // this is an element between all contact nodes
       // and is not already in the elements 
       if ((nb_found_nodes == nb_nodes) 
 	  && (elements(type,ghost_type).find(element) < 0)) {
 	elements(type, ghost_type).push_back(element);
       }
     }
   }
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::addSplitNode(UInt node) {
   AKANTU_DEBUG_IN();
   
   UInt dim = this->model.getSpatialDimension();
   
   // add to node arrays
   this->slaves.push_back(node);
   
   // set contact as false
   this->is_in_contact.push_back(false);
   
   // before initializing
   // set contact pressure, normal, lumped_boundary to Nan
   this->contact_pressure.push_back(std::numeric_limits<Real>::quiet_NaN());
   this->impedance.push_back(std::numeric_limits<Real>::quiet_NaN());
   this->lumped_boundary_slaves.push_back(std::numeric_limits<Real>::quiet_NaN());
   
   Real nan_normal[dim];
   for (UInt d=0; d<dim; ++d)
     nan_normal[d] = std::numeric_limits<Real>::quiet_NaN();
   this->normals.push_back(nan_normal);
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
   
   this->slaves.registerDependingArray(array);
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
   
   this->slaves.dumpRestartFile(file_name);
   this->normals.dumpRestartFile(file_name);
   this->is_in_contact.dumpRestartFile(file_name);
   this->contact_pressure.dumpRestartFile(file_name);
   this->lumped_boundary_slaves.dumpRestartFile(file_name);
   this->impedance.dumpRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
   
   this->slaves.readRestartFile(file_name);
   this->normals.readRestartFile(file_name);
   this->is_in_contact.readRestartFile(file_name);
   this->contact_pressure.readRestartFile(file_name);
   this->lumped_boundary_slaves.readRestartFile(file_name);
   this->impedance.readRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 UInt NTNBaseContact::getNbNodesInContact() const {
   AKANTU_DEBUG_IN();
   
   UInt nb_contact = 0;
   
   UInt nb_nodes = this->getNbContactNodes();
   const Mesh & mesh = this->model.getMesh();
 
   for (UInt n = 0; n < nb_nodes; ++n) {
     bool is_local_node = mesh.isLocalOrMasterNode(this->slaves(n));
     bool is_pbc_slave_node = this->model.isPBCSlaveNode(this->slaves(n));
     if (is_local_node && !is_pbc_slave_node && this->is_in_contact(n)) {
       nb_contact++;
     }
   }
   
   StaticCommunicator::getStaticCommunicator().allReduce(&nb_contact, 1, _so_sum);
   
   AKANTU_DEBUG_OUT();
   return nb_contact;
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::updateInternalData() {
   AKANTU_DEBUG_IN();
   
   updateNormals();
   updateLumpedBoundary();
   updateImpedance();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::updateLumpedBoundary() {
   AKANTU_DEBUG_IN();
   
   this->internalUpdateLumpedBoundary(this->slaves.getArray(),
 				     this->slave_elements,
 				     this->lumped_boundary_slaves);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::internalUpdateLumpedBoundary(const Array<UInt> & nodes,
 						  const ElementTypeMapArray<UInt> & elements,
 						  SynchronizedArray<Real> & boundary) {
   AKANTU_DEBUG_IN();
 
   // set all values in lumped_boundary to zero
   boundary.clear();
   
   UInt dim = this->model.getSpatialDimension();
   //  UInt nb_contact_nodes = getNbContactNodes();
   
   const FEEngine & boundary_fem = this->model.getFEEngineBoundary();
   
   const Mesh & mesh = this->model.getMesh();
   
   for (ghost_type_t::iterator gt = ghost_type_t::begin();  gt != ghost_type_t::end(); ++gt) {
     Mesh::type_iterator it = mesh.firstType(dim-1, *gt);
     Mesh::type_iterator last = mesh.lastType(dim-1, *gt);
     for (; it != last; ++it) {
       UInt nb_elements = mesh.getNbElement(*it, *gt);
       UInt nb_nodes_per_element = mesh.getNbNodesPerElement(*it);
       const Array<UInt> & connectivity = mesh.getConnectivity(*it, *gt);
 
       // get shapes and compute integral
       const Array<Real> & shapes = boundary_fem.getShapes(*it, *gt);
       Array<Real> area(nb_elements,nb_nodes_per_element);
       boundary_fem.integrate(shapes,area,nb_nodes_per_element,*it, *gt);
 
       if (this->contact_surfaces.size() == 0) {
 	AKANTU_DEBUG_WARNING("No surfaces in ntn base contact." 
 			     << " You have to define the lumped boundary by yourself.");
       }
 
       Array<UInt>::const_iterator<UInt> elem_it     = (elements)(*it, *gt).begin();
       Array<UInt>::const_iterator<UInt> elem_it_end = (elements)(*it, *gt).end();
       // loop over contact nodes
       for (; elem_it != elem_it_end; ++elem_it) {
         for (UInt q=0; q<nb_nodes_per_element; ++q) {
           UInt node = connectivity(*elem_it,q);
           UInt node_index = nodes.find(node);
           AKANTU_DEBUG_ASSERT(node_index != UInt(-1), 
 			      "Could not find node " << node 
 			      << " in the array!");
           Real area_to_add = area(*elem_it,q);
           boundary(node_index) += area_to_add;
         }
       }
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::computeContactPressure() {
   AKANTU_DEBUG_IN();
 
   UInt dim = this->model.getSpatialDimension();
   Real delta_t = this->model.getTimeStep();
   UInt nb_contact_nodes = getNbContactNodes();
 
   AKANTU_DEBUG_ASSERT(delta_t > 0., 
 		      "Cannot compute contact pressure if no time step is set");
 
   // synchronize data
   this->synch_registry->synchronize(_gst_cf_nodal);
 
   // pre-compute the acceleration 
   // (not increment acceleration, because residual is still Kf)
   Array<Real> acceleration(this->model.getMesh().getNbNodes(), dim, 0.);
   this->model.solveLumped(acceleration,
 			  this->model.getMass(),
 			  this->model.getResidual(),
 			  this->model.getBlockedDOFs(),
 			  this->model.getF_M2A());
 
   // compute relative normal fields of displacement, velocity and acceleration 
   Array<Real> r_disp(0,1);
   Array<Real> r_velo(0,1);
   Array<Real> r_acce(0,1);
   Array<Real> r_old_acce(0,1);
   computeNormalGap(r_disp);
   //  computeRelativeNormalField(this->model.getCurrentPosition(), r_disp);
   computeRelativeNormalField(this->model.getVelocity(),        r_velo);
   computeRelativeNormalField(acceleration,                     r_acce);
   computeRelativeNormalField(this->model.getAcceleration(),    r_old_acce);
 
   AKANTU_DEBUG_ASSERT(r_disp.getSize() == nb_contact_nodes, 
 		      "computeRelativeNormalField does not give back arrays " 
 		      << "size == nb_contact_nodes. nb_contact_nodes = " << nb_contact_nodes
 		      << " | array size = " << r_disp.getSize());
 
   // compute gap array for all nodes
   Array<Real> gap(nb_contact_nodes, 1);
   Real * gap_p = gap.storage();
   Real * r_disp_p = r_disp.storage();
   Real * r_velo_p = r_velo.storage();
   Real * r_acce_p = r_acce.storage();
   Real * r_old_acce_p = r_old_acce.storage();
   for (UInt i=0; i<nb_contact_nodes; ++i) {
     *gap_p = *r_disp_p + delta_t * *r_velo_p + delta_t * delta_t * *r_acce_p - 0.5 * delta_t * delta_t * *r_old_acce_p;
     // increment pointers
     gap_p++;
     r_disp_p++;
     r_velo_p++;
     r_acce_p++;
     r_old_acce_p++;
   }
 
   // check if gap is negative -> is in contact
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     if (gap(n) <= 0.) {
       for (UInt d=0; d<dim; ++d) {
 	this->contact_pressure(n,d) = this->impedance(n) * gap(n) / (2 * delta_t) 
 	                            * this->normals(n,d);
       }
       this->is_in_contact(n) = true;
     }
     else {
       for (UInt d=0; d<dim; ++d)
 	this->contact_pressure(n,d) = 0.;
       this->is_in_contact(n) = false;
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::applyContactPressure() {
   AKANTU_DEBUG_IN();
 
   UInt nb_contact_nodes = getNbContactNodes();
   UInt dim = this->model.getSpatialDimension();
 
   Array<Real> & residual = this->model.getResidual();
 
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     UInt slave = this->slaves(n);
     
     for (UInt d=0; d<dim; ++d) {
       //residual(master,d) += this->lumped_boundary(n,0) * this->contact_pressure(n,d);
       residual(slave, d) -= this->lumped_boundary_slaves(n) * this->contact_pressure(n,d);
     }
   }
   
   AKANTU_DEBUG_OUT();
 }
 
 
 /* -------------------------------------------------------------------------- */
 Int NTNBaseContact::getNodeIndex(UInt node) const {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_OUT();
   return this->slaves.find(node);
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTNBaseContact [" << std::endl;
   stream << space << " + id            : " << id << std::endl;
   stream << space << " + slaves        : " << std::endl;
   this->slaves.printself(stream, indent + 2);
   stream << space << " + normals       : " << std::endl;
   this->normals.printself(stream, indent + 2);
   stream << space << " + contact_pressure : " << std::endl;
   this->contact_pressure.printself(stream, indent + 2);
 
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::syncArrays(SyncChoice sync_choice) {
   AKANTU_DEBUG_IN();
   
   this->slaves.syncElements(sync_choice);
   this->normals.syncElements(sync_choice);
   this->is_in_contact.syncElements(sync_choice);
   this->contact_pressure.syncElements(sync_choice);
   this->lumped_boundary_slaves.syncElements(sync_choice);
   this->impedance.syncElements(sync_choice);
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseContact::addDumpFieldToDumper(const std::string & dumper_name,
 					  const std::string & field_id) {
   AKANTU_DEBUG_IN();
   
 #ifdef AKANTU_USE_IOHELPER
   const Array<UInt> & nodal_filter = this->slaves.getArray();
 
 
   
   
 #define ADD_FIELD(field_id, field, type)				\
   internalAddDumpFieldToDumper(dumper_name,				\
 			       field_id,				\
 			       new dumper::NodalField< type, true,	\
 			                               Array<type>,	\
                         			       Array<UInt> >(field, 0, 0, &nodal_filter))
   
   if(field_id == "displacement") {
     ADD_FIELD(field_id, this->model.getDisplacement(), Real);
   }
   else if(field_id == "mass") {
     ADD_FIELD(field_id, this->model.getMass(), Real);
   }
   else if(field_id == "velocity") {
     ADD_FIELD(field_id, this->model.getVelocity(), Real);
   }
   else if(field_id == "acceleration") {
     ADD_FIELD(field_id, this->model.getAcceleration(), Real);
   }
   else if(field_id == "force") {
     ADD_FIELD(field_id, this->model.getForce(), Real);
   }
   else if(field_id == "residual") {
     ADD_FIELD(field_id, this->model.getResidual(), Real);
   }
   else if(field_id == "blocked_dofs") {
     ADD_FIELD(field_id, this->model.getBlockedDOFs(), bool);
   }
   else if(field_id == "increment") {
     ADD_FIELD(field_id, this->model.getIncrement(), Real);
   }
   else if(field_id == "normal") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<Real>(this->normals.getArray()));
   }
   else if(field_id == "contact_pressure") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<Real>(this->contact_pressure.getArray()));
   }
   else if(field_id == "is_in_contact") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<bool>(this->is_in_contact.getArray()));
   }
   else if(field_id == "lumped_boundary_slave") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<Real>(this->lumped_boundary_slaves.getArray()));
   }
   else if(field_id == "impedance") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<Real>(this->impedance.getArray()));
   }
   else {
     std::cerr << "Could not add field '" << field_id 
 	      << "' to the dumper. Just ignored it." << std::endl;
   }
 
 #undef ADD_FIELD
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntn_base_contact.hh b/src/ntn_contact/ntn_base_contact.hh
index e4c663724..98d233552 100644
--- a/src/ntn_contact/ntn_base_contact.hh
+++ b/src/ntn_contact/ntn_base_contact.hh
@@ -1,232 +1,229 @@
 /**
  * @file   ntn_base_contact.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  base contact for ntn and ntrf contact
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_BASE_CONTACT_HH__
 #define __AST_NTN_BASE_CONTACT_HH__
 
 /* -------------------------------------------------------------------------- */
 // akantu
 #include "solid_mechanics_model.hh"
 #include "filtered_synchronizer.hh"
 
 // simtools
 #include "synchronized_array.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 class NTNBaseContact;
 
 /* -------------------------------------------------------------------------- */
 class NTNContactSynchElementFilter : public SynchElementFilter {
 public:
   // constructor
   NTNContactSynchElementFilter(NTNBaseContact * contact);
 
   // answer to: do we need this element ?
   virtual bool operator()(const Element & e);
 
 private:
   const NTNBaseContact * contact;
   const ElementTypeMapArray<UInt> & connectivity;
 };
 
 
 
 /* -------------------------------------------------------------------------- */
 class NTNBaseContact : protected Memory,
 		       public DataAccessor,
 		       public Dumpable {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNBaseContact(SolidMechanicsModel & model,
 		 const ContactID & id = "contact",
 		 const MemoryID & memory_id = 0);
   virtual ~NTNBaseContact();
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// initializes ntn contact parallel
   virtual void initParallel();
 
   /// add split node
   virtual void addSplitNode(UInt node);
 
   /// update normals, lumped boundary, and impedance
   virtual void updateInternalData();
 
   /// update (compute the normals)
   virtual void updateNormals() = 0;
 
   /// update the lumped boundary B matrix
   virtual void updateLumpedBoundary();
 
   /// update the impedance matrix
   virtual void updateImpedance() = 0;
 
   /// compute the normal contact force
   virtual void computeContactPressure();
 
   /// impose the normal contact force
   virtual void applyContactPressure();
 
   /// register synchronizedarrays for sync
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
 
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// compute the normal gap
   virtual void computeNormalGap(Array<Real> & gap) const = 0;
 
   /// compute relative normal field (only value that has to be multiplied with the normal)
   /// relative to master nodes
   virtual void computeRelativeNormalField(const Array<Real> & field,
 					  Array<Real> & rel_normal_field) const = 0;
   
   /// compute relative tangential field (complet array)
   /// relative to master nodes
   virtual void computeRelativeTangentialField(const Array<Real> & field,
 					      Array<Real> & rel_tang_field) const = 0;
   
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
   
 protected:
   /// updateLumpedBoundary
   virtual void internalUpdateLumpedBoundary(const Array<UInt> & nodes,
 					    const ElementTypeMapArray<UInt> & elements,
 					    SynchronizedArray<Real> & boundary);
 
   // to find the slave_elements or master_elements
   virtual void findBoundaryElements(const Array<UInt> & interface_nodes, 
 				    ElementTypeMapArray<UInt> & elements);
 
   /// synchronize arrays
   virtual void syncArrays(SyncChoice sync_choice);
 
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   inline virtual UInt getNbDataForElements(const Array<Element> & elements,
                                            SynchronizationTag tag) const;
   
   inline virtual void packElementData(CommunicationBuffer & buffer,
                                       const Array<Element> & elements,
                                       SynchronizationTag tag) const;
   
   inline virtual void unpackElementData(CommunicationBuffer & buffer,
                                         const Array<Element> & elements,
                                         SynchronizationTag tag);
   
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_GET_MACRO(Model, model, SolidMechanicsModel &)
 
   AKANTU_GET_MACRO(Slaves,                               slaves, const SynchronizedArray<UInt> &)
   AKANTU_GET_MACRO(Normals,                             normals, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(ContactPressure,            contact_pressure, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(LumpedBoundarySlaves, lumped_boundary_slaves, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(Impedance,                         impedance, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(IsInContact,                   is_in_contact, const SynchronizedArray<bool> &)
 
   AKANTU_GET_MACRO(SlaveElements, slave_elements, const ElementTypeMapArray<UInt> &)
 
   AKANTU_GET_MACRO(SynchronizerRegistry, synch_registry, SynchronizerRegistry *)
 
   /// get number of nodes that are in contact (globally, on all procs together)
   /// is_in_contact = true
   virtual UInt getNbNodesInContact() const;
 
   /// get index of node in either slaves or masters array
   /// if node is in neither of them, return -1
   virtual Int getNodeIndex(UInt node) const;
 
   /// get number of contact nodes: nodes in the system locally (on this proc)
   /// is_in_contact = true and false, because just in the system
   virtual UInt getNbContactNodes() const { return this->slaves.getSize(); };
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   typedef std::set<const ElementGroup *> SurfacePtrSet;
 
   SolidMechanicsModel & model;
 
   /// array of slave nodes
   SynchronizedArray<UInt> slaves;
   /// array of normals
   SynchronizedArray<Real> normals;
   /// array indicating if nodes are in contact
   SynchronizedArray<Real> contact_pressure;
   /// array indicating if nodes are in contact
   SynchronizedArray<bool> is_in_contact;
   /// boundary matrix for slave nodes
   SynchronizedArray<Real> lumped_boundary_slaves;
   /// impedance matrix
   SynchronizedArray<Real> impedance;
 
   /// contact surface
   SurfacePtrSet contact_surfaces;
 
   /// element list for dump and lumped_boundary
   ElementTypeMapArray<UInt> slave_elements;
   CSR<Element> node_to_elements;
 
   /// parallelisation
   SynchronizerRegistry * synch_registry;
   FilteredSynchronizer * synchronizer;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 #include "ntn_base_contact_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, const NTNBaseContact & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_BASE_CONTACT_HH__ */
diff --git a/src/ntn_contact/ntn_base_friction.cc b/src/ntn_contact/ntn_base_friction.cc
index b6b1798d9..811890ccd 100644
--- a/src/ntn_contact/ntn_base_friction.cc
+++ b/src/ntn_contact/ntn_base_friction.cc
@@ -1,374 +1,374 @@
 /**
  * @file   ntn_base_friction.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of ntn base friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_friction.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNBaseFriction::NTNBaseFriction(NTNBaseContact * contact,
 				 const FrictionID & id,
 				 const MemoryID & memory_id) :
   Memory(id,memory_id),
   Parsable(_st_friction, id),
   Dumpable(),
   contact(contact),
   is_sticking(0,1,true,id+":is_sticking",true,"is_sticking"),
   frictional_strength(0,1,0.,id+":frictional_strength",0.,"frictional_strength"),
   friction_traction(0,contact->getModel().getSpatialDimension(),
 		    0.,id+":friction_traction",0.,"friction_traction"),
   slip(0,1,0.,id+":slip",0.,"slip"),
   cumulative_slip(0,1,0.,id+":cumulative_slip",0.,"cumulative_slip"),
   slip_velocity(0,contact->getModel().getSpatialDimension(),
 		0.,id+":slip_velocity",0.,"slip_velocity") {
   AKANTU_DEBUG_IN();
 
   this->contact->registerSynchronizedArray(this->is_sticking);
   this->contact->registerSynchronizedArray(this->frictional_strength);
   this->contact->registerSynchronizedArray(this->friction_traction);
   this->contact->registerSynchronizedArray(this->slip);
   this->contact->registerSynchronizedArray(this->cumulative_slip);
   this->contact->registerSynchronizedArray(this->slip_velocity);
 
   contact->getModel().setIncrementFlagOn();
 
   this->registerExternalDumper(contact->getDumper(),
 			       contact->getDefaultDumperName(),
 			       true);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::updateSlip() {
   AKANTU_DEBUG_IN();
 
   SolidMechanicsModel & model = this->contact->getModel();
   UInt dim = model.getSpatialDimension();
 
   // synchronize increment
   this->contact->getSynchronizerRegistry()->synchronize(_gst_cf_incr);
 
   Array<Real> rel_tan_incr(0,dim);
   this->contact->computeRelativeTangentialField(model.getIncrement(),
 						rel_tan_incr);
   Array<Real>::const_iterator< Vector<Real> > it = rel_tan_incr.begin(dim);
 
   UInt nb_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_nodes; ++n) {
     if (this->is_sticking(n)) {
       this->slip(n) = 0.;
     }
     else {
       const Vector<Real> & rti = it[n];
       this->slip(n) += rti.norm();
       this->cumulative_slip(n) += rti.norm();
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::computeFrictionTraction() {
   AKANTU_DEBUG_IN();
 
   this->computeStickTraction();
   this->computeFrictionalStrength();
 
   SolidMechanicsModel & model = this->contact->getModel();
   UInt dim = model.getSpatialDimension();
 
   // get contact arrays
   const SynchronizedArray<bool> & is_in_contact = this->contact->getIsInContact();
 
   Array<Real> & traction = const_cast< Array<Real> & >(this->friction_traction.getArray());
   Array<Real>::iterator< Vector<Real> > it_fric_trac = traction.begin(dim);
 
   this->is_sticking.clear(); // set to not sticking
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // node pair is in contact
     if (is_in_contact(n)) {
       Vector<Real> fric_trac = it_fric_trac[n];
       // check if it is larger than frictional strength
       Real abs_fric = fric_trac.norm();
       if (abs_fric != 0.) {
 	Real alpha = this->frictional_strength(n) / abs_fric;
 
 	// larger -> sliding
 	if (alpha < 1.) {
 	  fric_trac *= alpha;
 	}
 	else
 	  this->is_sticking(n) = true;
       }
       else {
 	// frictional traction is already zero
 	this->is_sticking(n) = true;
       }
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::computeStickTraction() {
   AKANTU_DEBUG_IN();
 
   SolidMechanicsModel & model = this->contact->getModel();
   UInt dim = model.getSpatialDimension();
   Real delta_t = model.getTimeStep();
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
 
   // get contact arrays
   const SynchronizedArray<Real> & impedance = this->contact->getImpedance();
   const SynchronizedArray<bool> & is_in_contact = this->contact->getIsInContact();
 
   // pre-compute the acceleration
   // (not increment acceleration, because residual is still Kf)
   Array<Real> acceleration(model.getFEEngine().getMesh().getNbNodes(), dim, 0.);
   model.solveLumped(acceleration,
 		    model.getMass(),
 		    model.getResidual(),
 		    model.getBlockedDOFs(),
 		    model.getF_M2A());
 
   // compute relative normal fields of velocity and acceleration
   Array<Real> r_velo(0,dim);
   Array<Real> r_acce(0,dim);
   Array<Real> r_old_acce(0,dim);
   this->contact->computeRelativeTangentialField(model.getVelocity(),     r_velo);
   this->contact->computeRelativeTangentialField(acceleration,            r_acce);
   this->contact->computeRelativeTangentialField(model.getAcceleration(), r_old_acce);
 
   AKANTU_DEBUG_ASSERT(r_velo.getSize() == nb_contact_nodes,
 		      "computeRelativeNormalField does not give back arrays "
 		      << "size == nb_contact_nodes. nb_contact_nodes = " << nb_contact_nodes
 		      << " | array size = " << r_velo.getSize());
 
   // compute tangential gap_dot array for all nodes
   Array<Real> gap_dot(nb_contact_nodes, dim);
   Real * gap_dot_p = gap_dot.storage();
   Real * r_velo_p = r_velo.storage();
   Real * r_acce_p = r_acce.storage();
   Real * r_old_acce_p = r_old_acce.storage();
   for (UInt i=0; i<nb_contact_nodes*dim; ++i) {
     *gap_dot_p = *r_velo_p + delta_t * *r_acce_p - 0.5 * delta_t * *r_old_acce_p;
     // increment pointers
     gap_dot_p++;
     r_velo_p++;
     r_acce_p++;
     r_old_acce_p++;
   }
 
   // compute friction traction to stop sliding
   Array<Real> & traction = const_cast< Array<Real> & >(this->friction_traction.getArray());
   Array<Real>::vector_iterator it_fric_trac = traction.begin(dim);
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     Vector<Real> fric_trac = it_fric_trac[n];
     // node pair is NOT in contact
     if (!is_in_contact(n)) {
       fric_trac.clear(); // set to zero
     }
 
     // node pair is in contact
     else {
       // compute friction traction
       for (UInt d=0; d<dim; ++d)
 	fric_trac(d) = impedance(n) * gap_dot(n,d) / 2.;
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::applyFrictionTraction() {
   AKANTU_DEBUG_IN();
 
   SolidMechanicsModel & model = this->contact->getModel();
   Array<Real> & residual = model.getResidual();
   UInt dim = model.getSpatialDimension();
 
   const SynchronizedArray<UInt> & slaves = this->contact->getSlaves();
   const SynchronizedArray<Real> & lumped_boundary_slaves = this->contact->getLumpedBoundarySlaves();
 
   UInt nb_contact_nodes = this->contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     UInt slave = slaves(n);
 
     for (UInt d=0; d<dim; ++d) {
       residual(slave, d) -= lumped_boundary_slaves(n)  * this->friction_traction(n,d);
     }
   }
 
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::registerSynchronizedArray(SynchronizedArrayBase & array) {
   AKANTU_DEBUG_IN();
 
   this->frictional_strength.registerDependingArray(array);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
 
   this->is_sticking.dumpRestartFile(file_name);
   this->frictional_strength.dumpRestartFile(file_name);
   this->friction_traction.dumpRestartFile(file_name);
   this->slip.dumpRestartFile(file_name);
   this->cumulative_slip.dumpRestartFile(file_name);
   this->slip_velocity.dumpRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
 
   this->is_sticking.readRestartFile(file_name);
   this->frictional_strength.readRestartFile(file_name);
   this->friction_traction.readRestartFile(file_name);
   this->cumulative_slip.readRestartFile(file_name);
   this->slip_velocity.readRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::setParam(const std::string & name, UInt node, Real value) {
   AKANTU_DEBUG_IN();
 
   SynchronizedArray<Real> & array = this->get< SynchronizedArray<Real> >(name);
   Int index = this->contact->getNodeIndex(node);
   if (index < 0) {
     AKANTU_DEBUG_WARNING("Node " << node << " is not a contact node. "
 			 << "Therefore, cannot set interface parameter!!");
   }
   else {
     array(index) = value; // put value
   }
 
   AKANTU_DEBUG_OUT();
 };
 
 /* -------------------------------------------------------------------------- */
 UInt NTNBaseFriction::getNbStickingNodes() const {
   AKANTU_DEBUG_IN();
 
   UInt nb_stick = 0;
 
   UInt nb_nodes = this->contact->getNbContactNodes();
   const SynchronizedArray<UInt> & nodes = this->contact->getSlaves();
   const SynchronizedArray<bool> & is_in_contact = this->contact->getIsInContact();
 
   const Mesh & mesh = this->contact->getModel().getMesh();
 
   for (UInt n = 0; n < nb_nodes; ++n) {
     bool is_local_node = mesh.isLocalOrMasterNode(nodes(n));
     bool is_pbc_slave_node = this->contact->getModel().isPBCSlaveNode(nodes(n));
     if (is_local_node
 	&& !is_pbc_slave_node
 	&& is_in_contact(n)
 	&& this->is_sticking(n)) {
       nb_stick++;
     }
   }
 
   StaticCommunicator::getStaticCommunicator().allReduce(&nb_stick, 1, _so_sum);
 
   AKANTU_DEBUG_OUT();
   return nb_stick;
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTNBaseFriction [" << std::endl;
   Parsable::printself(stream, indent);
   stream << space << "]" << std::endl;
 
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNBaseFriction::addDumpFieldToDumper(const std::string & dumper_name,
 				       const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact->getSlaves());
 
   if(field_id == "is_sticking") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<bool>(this->is_sticking.getArray()));
   }
   else if(field_id == "frictional_strength") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<Real>(this->frictional_strength.getArray()));
   }
   else if(field_id == "friction_traction") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<Real>(this->friction_traction.getArray()));
   }
   else if(field_id == "slip") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<Real>(this->slip.getArray()));
   }
   else if(field_id == "cumulative_slip") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<Real>(this->cumulative_slip.getArray()));
   }
   else if(field_id == "slip_velocity") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new dumper::NodalField<Real>(this->slip_velocity.getArray()));
   }
   else {
     this->contact->addDumpFieldToDumper(dumper_name, field_id);
   }
 
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 
 
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntn_base_friction.hh b/src/ntn_contact/ntn_base_friction.hh
index 29fb489e5..05168947c 100644
--- a/src/ntn_contact/ntn_base_friction.hh
+++ b/src/ntn_contact/ntn_base_friction.hh
@@ -1,166 +1,161 @@
 /**
  * @file   ntn_base_friction.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  base class for ntn and ntrf friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 #ifndef __AST_NTN_BASE_FRICTION_HH__
 #define __AST_NTN_BASE_FRICTION_HH__
 
 /* -------------------------------------------------------------------------- */
 // akantu
 #include "parsable.hh"
 
 // simtools
 #include "ntn_base_contact.hh"
 
 /* -------------------------------------------------------------------------- */
 __BEGIN_AKANTU__
+
 template<>
-inline void ParsableParamTyped< akantu_simtools::SynchronizedArray<Real> >::parseParam(const ParserParameter & in_param) {
+inline void ParsableParamTyped< akantu::SynchronizedArray<Real> >::parseParam(const ParserParameter & in_param) {
   ParsableParam::parseParam(in_param);
   Real tmp = in_param;
   param.setAndChangeDefault(tmp);
 }
 
 /* -------------------------------------------------------------------------- */
 template<>
 template<>
-inline void ParsableParamTyped< akantu_simtools::SynchronizedArray<Real> >::setTyped<Real>(const Real & value) { 
+inline void ParsableParamTyped< akantu::SynchronizedArray<Real> >::setTyped<Real>(const Real & value) { 
   param.setAndChangeDefault(value); 
 }
-__END_AKANTU__
-
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
 
 /* -------------------------------------------------------------------------- */
 class NTNBaseFriction : protected Memory, public Parsable, public Dumpable {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNBaseFriction(NTNBaseContact * contact,
 		  const FrictionID & id = "friction",
 		  const MemoryID & memory_id = 0);
   virtual ~NTNBaseFriction() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// compute friction traction
   virtual void computeFrictionTraction();
 
   /// compute stick traction (friction traction needed to stick the nodes)
   virtual void computeStickTraction();
 
   /// apply the friction force
   virtual void applyFrictionTraction();
 
   /// compute slip
   virtual void updateSlip();
 
   /// register Syncronizedarrays for sync
   virtual void registerSynchronizedArray(SynchronizedArrayBase & array);
   
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// set to steady state
   virtual void setToSteadyState() {
     AKANTU_DEBUG_TO_IMPLEMENT();
   };
 
   /// get the number of sticking nodes (in parallel)
   /// a node that is not in contact does not count as sticking
   virtual UInt getNbStickingNodes() const;
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
 protected:
   /// compute frictional strength according to friction law
   virtual void computeFrictionalStrength() = 0;
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_GET_MACRO(Contact, contact, const NTNBaseContact *)
 
   AKANTU_GET_MACRO(IsSticking,                 is_sticking, const SynchronizedArray<bool> &)
   AKANTU_GET_MACRO(FrictionalStrength, frictional_strength, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(FrictionTraction,     friction_traction, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(Slip,                              slip, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(CumulativeSlip,         cumulative_slip, const SynchronizedArray<Real> &)
   AKANTU_GET_MACRO(SlipVelocity,             slip_velocity, const SynchronizedArray<Real> &)
 
   /// set parameter of a given node 
   /// (if you need to set to all: used the setMixed function of the Parsable).
   virtual void setParam(const std::string & name, UInt node, Real value);
 
   // replaced by the setMixed of the Parsable
   // virtual void setParam(const std::string & param, Real value) {
   //   AKANTU_DEBUG_ERROR("Friction does not know the following parameter: " << param);
   // };
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
   NTNBaseContact * contact;
 
   // if node is sticking
   SynchronizedArray<bool> is_sticking;
   // frictional strength
   SynchronizedArray<Real> frictional_strength;
   // friction force
   SynchronizedArray<Real> friction_traction;
   // slip
   SynchronizedArray<Real> slip;
   SynchronizedArray<Real> cumulative_slip;
   // slip velocity (tangential vector)
   SynchronizedArray<Real> slip_velocity;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntn_base_friction_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, const NTNBaseFriction & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_BASE_FRICTION_HH__ */
diff --git a/src/ntn_contact/ntn_contact.cc b/src/ntn_contact/ntn_contact.cc
index 162e0c2be..81f7c55d8 100644
--- a/src/ntn_contact/ntn_contact.cc
+++ b/src/ntn_contact/ntn_contact.cc
@@ -1,535 +1,535 @@
 /**
  * @file   ntn_contact.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of ntn_contact
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_contact.hh"
 #include "dumper_text.hh"
 #include "dumper_nodal_field.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTNContact::NTNContact(SolidMechanicsModel & model,
 		       const ContactID & id,
 		       const MemoryID & memory_id) :
   NTNBaseContact(model,id,memory_id),
   masters(0,1,0,id+":masters",std::numeric_limits<UInt>::quiet_NaN(),"masters"),
   lumped_boundary_masters(0,1,0,id+":lumped_boundary_masters",
 			  std::numeric_limits<Real>::quiet_NaN(),"lumped_boundary_masters"),
   master_elements("master_elements", id, memory_id)
 {
   AKANTU_DEBUG_IN();
 
   const Mesh & mesh = this->model.getMesh();
   UInt spatial_dimension = this->model.getSpatialDimension();
 
   mesh.initElementTypeMapArray(this->master_elements,
 			       1,
 			       spatial_dimension - 1);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::pairInterfaceNodes(const ElementGroup & slave_boundary,
 				    const ElementGroup & master_boundary,
 				    UInt surface_normal_dir,
 				    const Mesh & mesh,
 				    Array<UInt> & pairs) {
   AKANTU_DEBUG_IN();
 
   pairs.resize(0);
   AKANTU_DEBUG_ASSERT(pairs.getNbComponent() == 2,
 		      "Array of node pairs should have nb_component = 2," <<
 		      " but has nb_component = " << pairs.getNbComponent());
 
   UInt dim = mesh.getSpatialDimension();
   AKANTU_DEBUG_ASSERT(surface_normal_dir < dim, "Mesh is of " << dim << " dimensions"
 		      << " and cannot have direction " << surface_normal_dir
 		      << " for surface normal");
 
   // offset for projection computation
   UInt offset[dim-1];
   for (UInt i=0, j=0; i<dim; ++i) {
     if (surface_normal_dir != i) {
       offset[j] = i;
       ++j;
     }
   }
 
   // find projected node coordinates
   const Array<Real> & coordinates = mesh.getNodes();
 
   // find slave nodes
   Array<Real> proj_slave_coord(slave_boundary.getNbNodes(),dim-1,0.);
   Array<UInt> slave_nodes(slave_boundary.getNbNodes());
   UInt n(0);
   for(ElementGroup::const_node_iterator nodes_it(slave_boundary.node_begin()); nodes_it!= slave_boundary.node_end(); ++nodes_it) {
     for (UInt d=0; d<dim-1; ++d) {
       proj_slave_coord(n,d) = coordinates(*nodes_it,offset[d]);
       slave_nodes(n)=*nodes_it;
     }
     ++n;
   }
 
   // find master nodes
   Array<Real> proj_master_coord(master_boundary.getNbNodes(),dim-1,0.);
   Array<UInt> master_nodes(master_boundary.getNbNodes());
   n=0;
   for(ElementGroup::const_node_iterator nodes_it(master_boundary.node_begin()); nodes_it!= master_boundary.node_end(); ++nodes_it) {
     for (UInt d=0; d<dim-1; ++d) {
       proj_master_coord(n,d) = coordinates(*nodes_it,offset[d]);
       master_nodes(n)=*nodes_it;
     }
     ++n;
   }
 
   // find minimum distance between slave nodes to define tolerance
   Real min_dist = std::numeric_limits<Real>::max();
   for (UInt i=0; i<proj_slave_coord.getSize(); ++i) {
     for (UInt j=i+1; j<proj_slave_coord.getSize(); ++j) {
       Real dist = 0.;
       for (UInt d=0; d<dim-1; ++d) {
 	dist += (proj_slave_coord(i,d) - proj_slave_coord(j,d))
 	      * (proj_slave_coord(i,d) - proj_slave_coord(j,d));
       }
       if (dist < min_dist) {
 	min_dist = dist;
       }
     }
   }
   min_dist = std::sqrt(min_dist);
   Real local_tol = 0.1*min_dist;
 
   // find master slave node pairs
   for (UInt i=0; i<proj_slave_coord.getSize(); ++i) {
     for (UInt j=0; j<proj_master_coord.getSize(); ++j) {
       Real dist = 0.;
       for (UInt d=0; d<dim-1; ++d) {
 	dist += (proj_slave_coord(i,d) - proj_master_coord(j,d))
 	      * (proj_slave_coord(i,d) - proj_master_coord(j,d));
       }
       dist = std::sqrt(dist);
       if (dist < local_tol) { // it is a pair
 	UInt pair[2];
 	pair[0] = slave_nodes(i);
 	pair[1] = master_nodes(j);
 	pairs.push_back(pair);
 	continue; // found master do not need to search further for this slave
       }
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::addSurfacePair(const Surface & slave,
 				const Surface & master,
 				UInt surface_normal_dir) {
   AKANTU_DEBUG_IN();
 
   const Mesh & mesh = this->model.getMesh();
 
   const ElementGroup & slave_boundary  = mesh.getElementGroup(slave);
   const ElementGroup & master_boundary = mesh.getElementGroup(master);
 
   this->contact_surfaces.insert(&slave_boundary);
   this->contact_surfaces.insert(&master_boundary);
 
   Array<UInt> pairs(0,2);
   NTNContact::pairInterfaceNodes(slave_boundary,
 				 master_boundary,
 				 surface_normal_dir,
 				 this->model.getMesh(),
 				 pairs);
 
   // eliminate pairs which contain a pbc slave node
   Array<UInt> pairs_no_PBC_slaves(0,2);
   Array<UInt>::const_vector_iterator it  = pairs.begin(2);
   Array<UInt>::const_vector_iterator end = pairs.end(2);
   for (; it!=end; ++it) {
     const Vector<UInt> & pair = *it;
     if (!this->model.isPBCSlaveNode(pair(0)) && !this->model.isPBCSlaveNode(pair(1))) {
       pairs_no_PBC_slaves.push_back(pair);
     }
   }
 
   this->addNodePairs(pairs_no_PBC_slaves);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::addNodePairs(const Array<UInt> & pairs) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_ASSERT(pairs.getNbComponent() == 2,
 		      "Array of node pairs should have nb_component = 2," <<
 		      " but has nb_component = " << pairs.getNbComponent());
   UInt nb_pairs = pairs.getSize();
   for (UInt n=0; n<nb_pairs; ++n) {
     this->addSplitNode(pairs(n,0), pairs(n,1));
   }
 
   // synchronize with depending nodes
   findBoundaryElements(this->slaves.getArray(),  this->slave_elements);
   findBoundaryElements(this->masters.getArray(), this->master_elements);
   updateInternalData();
   syncArrays(_added);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::getNodePairs(Array<UInt> & pairs) const {
   AKANTU_DEBUG_IN();
 
   pairs.resize(0);
   AKANTU_DEBUG_ASSERT(pairs.getNbComponent() == 2,
 		      "Array of node pairs should have nb_component = 2," <<
 		      " but has nb_component = " << pairs.getNbComponent());
   UInt nb_pairs = this->getNbContactNodes();
   for (UInt n=0; n<nb_pairs; ++n) {
     UInt pair[2];
     pair[0] = this->slaves(n);
     pair[1] = this->masters(n);
     pairs.push_back(pair);
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::addSplitNode(UInt slave, UInt master) {
   AKANTU_DEBUG_IN();
 
   NTNBaseContact::addSplitNode(slave);
 
   this->masters.push_back(master);
   this->lumped_boundary_masters.push_back(std::numeric_limits<Real>::quiet_NaN());
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 /*
   This function only works for surface elements with one quad point. For
   surface elements with more quad points, it computes still, but the result
   might not be what you are looking for.
  */
 void NTNContact::updateNormals() {
   AKANTU_DEBUG_IN();
 
   // set normals to zero
   this->normals.clear();
 
   // contact information
   UInt dim = this->model.getSpatialDimension();
   UInt nb_contact_nodes = this->getNbContactNodes();
 
   this->synch_registry->synchronize(_gst_cf_nodal); // synchronize current pos
   const Array<Real> & cur_pos = this->model.getCurrentPosition();
 
   FEEngine & boundary_fem = this->model.getFEEngineBoundary();
   const Mesh & mesh = this->model.getMesh();
 
   for (ghost_type_t::iterator gt = ghost_type_t::begin();
        gt != ghost_type_t::end();
        ++gt) {
     Mesh::type_iterator it   = mesh.firstType(dim-1, *gt);
     Mesh::type_iterator last = mesh.lastType(dim-1, *gt);
 
     for (; it != last; ++it) {
       // get elements connected to each node
       CSR<UInt> node_to_element;
       MeshUtils::buildNode2ElementsElementTypeMap(mesh, node_to_element, *it, *gt);
 
       // compute the normals
       Array<Real> quad_normals(0,dim);
       boundary_fem.computeNormalsOnControlPoints(cur_pos, quad_normals, *it, *gt);
 
       UInt nb_quad_points = boundary_fem.getNbQuadraturePoints(*it, *gt);
 
       // add up normals to all master nodes
       for (UInt n=0; n<nb_contact_nodes; ++n) {
 	UInt master = this->masters(n);
 	CSR<UInt>::iterator elem = node_to_element.begin(master);
 	// loop over all elements connected to this master node
 	for (; elem != node_to_element.end(master); ++elem) {
 	  UInt e = *elem;
 	  // loop over all quad points of this element
 	  for (UInt q=0; q<nb_quad_points; ++q) {
 	    // add quad normal to master normal
 	    for (UInt d=0; d<dim; ++d) {
 	      this->normals(n,d) += quad_normals(e*nb_quad_points + q, d);
 	    }
 	  }
 	}
       }
     }
   }
 
   Real * master_normals = this->normals.storage();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     if (dim==2)
       Math::normalize2(&(master_normals[n*dim]));
     else if (dim==3)
       Math::normalize3(&(master_normals[n*dim]));
   }
 
   // // normalize normals
   // Array<Real>::iterator<Real> nit  = this->normals.begin();
   // Array<Real>::iterator<Real> nend = this->normals.end();
   // for (; nit != nend; ++nit) {
   //   nit->normalize();
   // }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::dumpRestart(const std::string & file_name) const {
   AKANTU_DEBUG_IN();
 
   NTNBaseContact::dumpRestart(file_name);
   this->masters.dumpRestartFile(file_name);
   this->lumped_boundary_masters.dumpRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::readRestart(const std::string & file_name) {
   AKANTU_DEBUG_IN();
 
   NTNBaseContact::readRestart(file_name);
   this->masters.readRestartFile(file_name);
   this->lumped_boundary_masters.readRestartFile(file_name);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::updateImpedance() {
   AKANTU_DEBUG_IN();
 
   UInt nb_contact_nodes = getNbContactNodes();
   Real delta_t = this->model.getTimeStep();
   AKANTU_DEBUG_ASSERT(delta_t != NAN, "Time step is NAN. Have you set it already?");
 
   const Array<Real> & mass = this->model.getMass();
 
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     UInt master = this->masters(n);
     UInt slave = this->slaves(n);
 
     Real imp = (this->lumped_boundary_masters(n) / mass(master))
 	     + (this->lumped_boundary_slaves(n) / mass(slave));
     imp = 2 / delta_t / imp;
     this->impedance(n) = imp;
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::updateLumpedBoundary() {
   AKANTU_DEBUG_IN();
 
   internalUpdateLumpedBoundary(this->slaves.getArray(),
 			       this->slave_elements,
 			       this->lumped_boundary_slaves);
 
   internalUpdateLumpedBoundary(this->masters.getArray(),
 			       this->master_elements,
 			       this->lumped_boundary_masters);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::applyContactPressure() {
   AKANTU_DEBUG_IN();
 
   UInt nb_ntn_pairs = getNbContactNodes();
   UInt dim = this->model.getSpatialDimension();
 
   Array<Real> & residual = this->model.getResidual();
 
   for (UInt n=0; n<nb_ntn_pairs; ++n) {
     UInt master = this->masters(n);
     UInt slave = this->slaves(n);
 
     for (UInt d=0; d<dim; ++d) {
       residual(master,d) += this->lumped_boundary_masters(n) * this->contact_pressure(n,d);
       residual(slave, d) -= this->lumped_boundary_slaves(n)  * this->contact_pressure(n,d);
     }
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::computeRelativeTangentialField(const Array<Real> & field,
 						Array<Real> & rel_tang_field) const {
   AKANTU_DEBUG_IN();
 
   // resize arrays to zero
   rel_tang_field.resize(0);
 
   UInt dim = this->model.getSpatialDimension();
 
   Array<Real>::const_vector_iterator it_field  = field.begin(dim);
   Array<Real>::const_vector_iterator it_normal = this->normals.getArray().begin(dim);
 
   Vector<Real> rfv(dim);
   Vector<Real> np_rfv(dim);
 
   UInt nb_contact_nodes = this->slaves.getSize();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // nodes
     UInt slave  = this->slaves(n);
     UInt master = this->masters(n);
 
     // relative field vector (slave - master)
     rfv = Vector<Real>(it_field[slave]);
     rfv -= Vector<Real>(it_field[master]);
 
     // normal projection of relative field
     const Vector<Real> normal_v = it_normal[n];
     np_rfv = normal_v;
     np_rfv *= rfv.dot(normal_v);
 
     // subract normal projection from relative field to get the tangential projection
     rfv -= np_rfv;
     rel_tang_field.push_back(rfv);
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::computeRelativeNormalField(const Array<Real> & field,
 					    Array<Real> & rel_normal_field) const {
   AKANTU_DEBUG_IN();
 
   // resize arrays to zero
   rel_normal_field.resize(0);
 
   UInt dim = this->model.getSpatialDimension();
   //  Real * field_p = field.storage();
   //  Real * normals_p = this->normals.storage();
 
   Array<Real>::const_iterator< Vector<Real> > it_field  = field.begin(dim);
   Array<Real>::const_iterator< Vector<Real> > it_normal = this->normals.getArray().begin(dim);
 
   Vector<Real> rfv(dim);
 
   UInt nb_contact_nodes = this->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // nodes
     UInt slave  = this->slaves(n);
     UInt master = this->masters(n);
 
     // relative field vector (slave - master)
     rfv = Vector<Real>(it_field[slave]);
     rfv -= Vector<Real>(it_field[master]);
 
     // length of normal projection of relative field
     const Vector<Real> normal_v = it_normal[n];
     rel_normal_field.push_back(rfv.dot(normal_v));
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 Int NTNContact::getNodeIndex(UInt node) const {
   AKANTU_DEBUG_IN();
 
   Int slave_i  = NTNBaseContact::getNodeIndex(node);
   Int master_i = this->masters.find(node);
 
   AKANTU_DEBUG_OUT();
   return std::max(slave_i,master_i);
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTNContact [" << std::endl;
   NTNBaseContact::printself(stream, indent);
   stream << space << " + masters       : " << std::endl;
   this->masters.printself(stream, indent + 2);
   stream << space << " + lumped_boundary_mastres : " << std::endl;
   this->lumped_boundary_masters.printself(stream, indent + 2);
 
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::syncArrays(SyncChoice sync_choice) {
   AKANTU_DEBUG_IN();
 
   NTNBaseContact::syncArrays(sync_choice);
 
   this->masters.syncElements(sync_choice);
   this->lumped_boundary_masters.syncElements(sync_choice);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTNContact::addDumpFieldToDumper(const std::string & dumper_name,
 				      const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
   /*
 #ifdef AKANTU_USE_IOHELPER
   const Array<UInt> & nodal_filter = this->slaves.getArray();
 
 #define ADD_FIELD(field_id, field, type)				\
   internalAddDumpFieldToDumper(dumper_name,				\
 			       field_id,				\
 			       new DumperIOHelper::NodalField< type, true, \
 							       Array<type>, \
 							       Array<UInt> >(field, 0, 0, &nodal_filter))
   */
 
   if(field_id == "lumped_boundary_master") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new dumper::NodalField<Real>(this->lumped_boundary_masters.getArray()));
   }
   else {
     NTNBaseContact::addDumpFieldToDumper(dumper_name, field_id);
   }
 
   /*
 #undef ADD_FIELD
 #endif
   */
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntn_contact.hh b/src/ntn_contact/ntn_contact.hh
index fd829f687..41bb5132a 100644
--- a/src/ntn_contact/ntn_contact.hh
+++ b/src/ntn_contact/ntn_contact.hh
@@ -1,156 +1,153 @@
 /**
  * @file   ntn_contact.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  contact for node to node discretization
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 
 #ifndef __AST_NTN_CONTACT_HH__
 #define __AST_NTN_CONTACT_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_contact.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class NTNContact : public NTNBaseContact {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTNContact(SolidMechanicsModel & model,
 	     const ContactID & id = "contact",
 	     const MemoryID & memory_id = 0);
   virtual ~NTNContact() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// add surface pair and pair nodes according to the surface normal
   void addSurfacePair(const Surface & slave, 
 		      const Surface & master, 
 		      UInt surface_normal_dir);
 
   /// fills the pairs vector with interface node pairs (*,0)=slaves, (*,1)=masters
   static void pairInterfaceNodes(const ElementGroup & slave_boundary, 
 				 const ElementGroup & master_boundary,
 				 UInt surface_normal_dir,
 				 const Mesh & mesh,
 				 Array<UInt> & pairs);
 
   // add node pairs from a list with pairs(*,0)=slaves and pairs(*,1)=masters
   void addNodePairs(const Array<UInt> & pairs);
 
   /// add node pair
   virtual void addSplitNode(UInt slave, UInt master);
 
   /// update (compute the normals on the master nodes)
   virtual void updateNormals();
 
   /// update the lumped boundary B matrix
   virtual void updateLumpedBoundary();
 
   /// update the impedance matrix
   virtual void updateImpedance();
 
   /// impose the normal contact force
   virtual void applyContactPressure();
 
   /// dump restart file
   virtual void dumpRestart(const std::string & file_name) const;
 
   /// read restart file
   virtual void readRestart(const std::string & file_name);
 
   /// compute the normal gap
   virtual void computeNormalGap(Array<Real> & gap) const {
     this->computeRelativeNormalField(this->model.getCurrentPosition(),
 				     gap);
   };
 
   /// compute relative normal field (only value that has to be multiplied with the normal)
   /// relative to master nodes
   virtual void computeRelativeNormalField(const Array<Real> & field,
 					  Array<Real> & rel_normal_field) const;
 
   /// compute relative tangential field (complet array)
   /// relative to master nodes
   virtual void computeRelativeTangentialField(const Array<Real> & field,
 					      Array<Real> & rel_tang_field) const;
   
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
 protected:
   /// synchronize arrays
   virtual void syncArrays(SyncChoice sync_choice);
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
   //  virtual void addDumpFieldVector(const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
   AKANTU_GET_MACRO(Masters,                               masters, const SynchronizedArray<UInt> &)
   AKANTU_GET_MACRO(LumpedBoundaryMasters, lumped_boundary_masters, const SynchronizedArray<Real> &)
 
   /// get interface node pairs (*,0) are slaves, (*,1) are masters
   void getNodePairs(Array<UInt> & pairs) const;
 
   /// get index of node in either slaves or masters array
   /// if node is in neither of them, return -1
   Int getNodeIndex(UInt node) const;
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   /// array of master nodes
   SynchronizedArray<UInt> masters;
   /// lumped boundary of master nodes
   SynchronizedArray<Real> lumped_boundary_masters;
 
   // element list for dump and lumped_boundary
   ElementTypeMapArray<UInt> master_elements;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntn_contact_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, const NTNContact & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTN_CONTACT_HH__ */
diff --git a/src/ntn_contact/ntn_friction.hh b/src/ntn_contact/ntn_friction.hh
index a44ca3bce..fbbeb674d 100644
--- a/src/ntn_contact/ntn_friction.hh
+++ b/src/ntn_contact/ntn_friction.hh
@@ -1,94 +1,91 @@
 /**
  * @file   ntn_friction.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of friction for node to node contact
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 
 #ifndef __AST_NTN_FRICTION_HH__
 #define __AST_NTN_FRICTION_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_friction.hh"
 #include "ntn_friclaw_coulomb.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <template<class> class FrictionLaw = NTNFricLawCoulomb, 
 	  class Regularisation = NTNFricRegNoRegularisation>
 class NTNFriction : public FrictionLaw<Regularisation> {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   NTNFriction(NTNBaseContact * contact,
 	      const FrictionID & id = "friction",
 	      const MemoryID & memory_id = 0);
   virtual ~NTNFriction() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// apply the friction force
   virtual void applyFrictionTraction();
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
 protected:
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   // virtual void addDumpFieldToDumper(const std::string & dumper_name,
   // 				    const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
 
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 /// standard output stream operator
 template <template<class> class FrictionLaw, class Regularisation>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTNFriction<FrictionLaw,
 				                    Regularisation> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #include "ntn_friction_tmpl.hh"
 
 #endif /* __AST_NTN_FRICTION_HH__ */
diff --git a/src/ntn_contact/ntn_friction_tmpl.hh b/src/ntn_contact/ntn_friction_tmpl.hh
index 02865c373..358453993 100644
--- a/src/ntn_contact/ntn_friction_tmpl.hh
+++ b/src/ntn_contact/ntn_friction_tmpl.hh
@@ -1,79 +1,79 @@
 /**
  * @file   ntn_friction_tmpl.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_contact.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <template <class> class FrictionLaw, class Regularisation>
 NTNFriction<FrictionLaw, Regularisation>::NTNFriction(NTNBaseContact * contact,
 						      const FrictionID & id,
 						      const MemoryID & memory_id) : 
   FrictionLaw<Regularisation>(contact, id, memory_id) {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <template <class> class FrictionLaw, class Regularisation>
 void NTNFriction<FrictionLaw, Regularisation>::applyFrictionTraction() {
   AKANTU_DEBUG_IN();
 
   NTNContact * ntn_contact = dynamic_cast<NTNContact * >(this->contact);
   SolidMechanicsModel & model = ntn_contact->getModel();
   Array<Real> & residual = model.getResidual();
   UInt dim = model.getSpatialDimension();
   
   const SynchronizedArray<UInt> & masters = ntn_contact->getMasters();
   const SynchronizedArray<UInt> & slaves  = ntn_contact->getSlaves();
   const SynchronizedArray<Real> & l_boundary_slaves  = ntn_contact->getLumpedBoundarySlaves();
   const SynchronizedArray<Real> & l_boundary_masters = ntn_contact->getLumpedBoundaryMasters();
 
   UInt nb_contact_nodes = ntn_contact->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     UInt master = masters(n);
     UInt slave  = slaves(n);
     
     for (UInt d=0; d<dim; ++d) {
       residual(master,d) += l_boundary_masters(n) * this->friction_traction(n,d);
       residual(slave, d) -= l_boundary_slaves(n)  * this->friction_traction(n,d);
     }
   }
 
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <template <class> class FrictionLaw, class Regularisation>
 void NTNFriction<FrictionLaw, Regularisation>::printself(std::ostream & stream, 
 							 int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTNFriction [" << std::endl;
   FrictionLaw<Regularisation>::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntn_initiation_function.cc b/src/ntn_contact/ntn_initiation_function.cc
index ee03a8b0b..ba7d9302d 100644
--- a/src/ntn_contact/ntn_initiation_function.cc
+++ b/src/ntn_contact/ntn_initiation_function.cc
@@ -1,320 +1,320 @@
 /**
  * @file   ntn_initiation_function.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of initializing ntn and ntrf friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_initiation_function.hh"
 #include "ntn_friction.hh"
 #include "ntrf_friction.hh"
 
 // friction regularisations
 #include "ntn_fricreg_rubin_ampuero.hh"
 #include "ntn_fricreg_simplified_prakash_clifton.hh"
 
 // friction laws
 #include "ntn_friclaw_linear_cohesive.hh"
 #include "ntn_friclaw_linear_slip_weakening.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact, 
 					ParameterReader & data) {
   AKANTU_DEBUG_IN();
   
   const std::string & friction_law = data.get<std::string>("friction_law");
   const std::string & friction_reg = data.get<std::string>("friction_regularisation");
   
   NTNBaseFriction * friction;
   
   bool is_ntn_contact = true;
   if (dynamic_cast<NTRFContact *>(contact) != NULL) {
     is_ntn_contact = false;
   }
 
   if (friction_law == "coulomb") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb,
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb,
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb,
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb,
 				    NTNFricRegRubinAmpuero>(contact);
       
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
       
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
 
     friction->setMixed< SynchronizedArray<Real> >("mu_s", data.get<Real>("mu_s"));
   }
 
   // Friction Law: Linear Slip Weakening
   else if (friction_law == "linear_slip_weakening") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegRubinAmpuero>(contact);
 
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
 
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
 
     friction->setMixed< SynchronizedArray<Real> >("mu_s", data.get<Real>("mu_s"));
     friction->setMixed< SynchronizedArray<Real> >("mu_k", data.get<Real>("mu_k"));
     friction->setMixed< SynchronizedArray<Real> >("d_c",  data.get<Real>("d_c"));
   }
 
   // Friction Law: Linear Cohesive
   else if (friction_law == "linear_cohesive") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive,
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive,
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive,
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive,
 				    NTNFricRegRubinAmpuero>(contact);
       
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
       
       friction->setMixed< SynchronizedArray<Real> >("t_star", data.get<Real>("t_star"));
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
 
     friction->setMixed< SynchronizedArray<Real> >("G_c", data.get<Real>("G_c"));
     friction->setMixed< SynchronizedArray<Real> >("tau_c", data.get<Real>("tau_c"));
     friction->setMixed< SynchronizedArray<Real> >("tau_r", data.get<Real>("tau_r"));
   }
   else {
     AKANTU_DEBUG_ERROR("Do not know the following friction law: " 
 		       << friction_law);
   }
 
   AKANTU_DEBUG_OUT();
   return friction;
 }
 
 /* -------------------------------------------------------------------------- */
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact) {
   AKANTU_DEBUG_IN();
   std::pair<Parser::const_section_iterator, Parser::const_section_iterator>
     sub_sect = getStaticParser().getSubSections(_st_friction);
 
   Parser::const_section_iterator it = sub_sect.first;
   const ParserSection & section = *it;
 
   std::string friction_law = section.getName();
   std::string friction_reg = section.getOption();
   if (friction_reg == "") {
     std::string friction_reg = "no_regularisation";
   }
   
   NTNBaseFriction * friction = initializeNTNFriction(contact,
 						     friction_law,
 						     friction_reg);
 
   friction->parseSection(section);
 
   if (++it != sub_sect.second) {
     AKANTU_DEBUG_WARNING("There were several friction sections in input file. " 
 			 << "Only first one was used and all others ignored.");
   }
   
   AKANTU_DEBUG_OUT();
   return friction;
 }
 
 
 /* -------------------------------------------------------------------------- */
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact,
 					const std::string & friction_law,
 					const std::string & friction_reg) {
   AKANTU_DEBUG_IN();
   
   NTNBaseFriction * friction;
   
   // check whether is is node-to-rigid-flat contact
   bool is_ntn_contact = true;
   if (dynamic_cast<NTRFContact *>(contact) != NULL) {
     is_ntn_contact = false;
   }
 
   if (friction_law == "coulomb") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb,
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb,
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb,
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb,
 				    NTNFricRegRubinAmpuero>(contact);
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawCoulomb, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawCoulomb, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
   }
 
   // Friction Law: Linear Slip Weakening
   else if (friction_law == "linear_slip_weakening") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegRubinAmpuero>(contact);
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearSlipWeakening, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearSlipWeakening, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
   }
 
   // Friction Law: Linear Cohesive
   else if (friction_law == "linear_cohesive") {
     if (friction_reg == "no_regularisation") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive,
 				   NTNFricRegNoRegularisation>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive,
 				    NTNFricRegNoRegularisation>(contact);
     }
     else if (friction_reg == "rubin_ampuero") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive,
 				   NTNFricRegRubinAmpuero>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive,
 				    NTNFricRegRubinAmpuero>(contact);
     }
     else if (friction_reg == "simplified_prakash_clifton") {
       if (is_ntn_contact)
 	friction = new NTNFriction<NTNFricLawLinearCohesive, 
 				   NTNFricRegSimplifiedPrakashClifton>(contact);
       else
 	friction = new NTRFFriction<NTNFricLawLinearCohesive, 
 				    NTNFricRegSimplifiedPrakashClifton>(contact);
     }
     else {
       AKANTU_DEBUG_ERROR("Do not know the following friction regularisation: " 
 			 << friction_reg);
     }
   }
   else {
     AKANTU_DEBUG_ERROR("Do not know the following friction law: " 
 		       << friction_law);
   }
   
   AKANTU_DEBUG_OUT();
   return friction;
 }
 
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntn_initiation_function.hh b/src/ntn_contact/ntn_initiation_function.hh
index 98ad0a810..aa765e38d 100644
--- a/src/ntn_contact/ntn_initiation_function.hh
+++ b/src/ntn_contact/ntn_initiation_function.hh
@@ -1,35 +1,33 @@
 /**
  * @file   ntn_initiation_function.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  initiation ntn and ntrf friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "parameter_reader.hh"
 #include "ntrf_contact.hh"
 #include "ntn_base_friction.hh"
 
-__BEGIN_SIMTOOLS__
-
-using namespace akantu;
+__BEGIN_AKANTU__
 
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact, 
 					ParameterReader & data);
 
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact);
 
 NTNBaseFriction * initializeNTNFriction(NTNBaseContact * contact,
 					const std::string & friction_law,
 					const std::string & friction_reg);
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntrf_contact.cc b/src/ntn_contact/ntrf_contact.cc
index e698b7ca6..d817d8440 100644
--- a/src/ntn_contact/ntrf_contact.cc
+++ b/src/ntn_contact/ntrf_contact.cc
@@ -1,299 +1,299 @@
 /**
  * @file   ntrf_contact.cc
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntrf_contact.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 NTRFContact::NTRFContact(SolidMechanicsModel & model,
 			 const ContactID & id,
 			 const MemoryID & memory_id) :
   NTNBaseContact(model,id,memory_id),
   reference_point(model.getSpatialDimension()),
   normal(model.getSpatialDimension())
 {
   AKANTU_DEBUG_IN();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::setReferencePoint(Real x, Real y, Real z) {
   AKANTU_DEBUG_IN();
 
   Real coord[3];
   coord[0] = x;
   coord[1] = y;
   coord[2] = z;
 
   UInt dim = this->model.getSpatialDimension();
   for (UInt d=0; d<dim; ++d)
     this->reference_point(d) = coord[d];
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::setNormal(Real x, Real y, Real z) {
   AKANTU_DEBUG_IN();
 
   UInt dim = this->model.getSpatialDimension();
 
   Real coord[3];
   coord[0] = x;
   coord[1] = y;
   coord[2] = z;
 
   for (UInt d=0; d<dim; ++d)
     this->normal(d) = coord[d];
   
   this->normal.normalize();
   
   this->updateNormals();
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::addSurface(const Surface & surf) {
   AKANTU_DEBUG_IN();
 
   const Mesh & mesh_ref = this->model.getFEEngine().getMesh();
 
   try {
     const ElementGroup & boundary = mesh_ref.getElementGroup(surf);
     this->contact_surfaces.insert(&boundary);
 
     // find slave nodes
     for(ElementGroup::const_node_iterator nodes_it(boundary.node_begin());
 	nodes_it!= boundary.node_end();
 	++nodes_it) {
       if (!this->model.isPBCSlaveNode(*nodes_it)) {
 	this->addSplitNode(*nodes_it);
       }
     }
   } catch (debug::Exception e) {
     AKANTU_DEBUG_INFO("NTRFContact addSurface did not found subboundary " << surf 
 		      << " and ignored it. Other procs might have it :)");
   }
 
   // synchronize with depending nodes
   findBoundaryElements(this->slaves.getArray(), this->slave_elements);
   updateInternalData();
   syncArrays(_added);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::addNodes(Array<UInt> & nodes) {
   AKANTU_DEBUG_IN();
 
   UInt nb_nodes = nodes.getSize();
   UInt nb_compo = nodes.getNbComponent();
   for (UInt n=0; n<nb_nodes; ++n) {
     for (UInt c=0; c<nb_compo; ++c) {
       this->addSplitNode(nodes(n,c));
     }
   }
 
   // synchronize with depending nodes
   findBoundaryElements(this->slaves.getArray(), this->slave_elements);
   updateInternalData();
   syncArrays(_added);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::updateNormals() {
   AKANTU_DEBUG_IN();
   
   // normal is the same for all slaves
   this->normals.set(this->normal);
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::updateImpedance() {
   AKANTU_DEBUG_IN();
   
   UInt nb_contact_nodes = getNbContactNodes();
   Real delta_t = this->model.getTimeStep();
   AKANTU_DEBUG_ASSERT(delta_t != NAN, "Time step is NAN. Have you set it already?");
 
   const Array<Real> & mass = this->model.getMass();
 
   for (UInt n=0; n<nb_contact_nodes; ++n) {  
     UInt slave = this->slaves(n);
 
     Real imp = this->lumped_boundary_slaves(n) / mass(slave);
     imp = 2 / delta_t / imp;
     this->impedance(n) = imp;
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::computeRelativeTangentialField(const Array<Real> & field,
 						 Array<Real> & rel_tang_field) const {
   AKANTU_DEBUG_IN();
 
   // resize arrays to zero
   rel_tang_field.resize(0);
 
   UInt dim = this->model.getSpatialDimension();
   
   Array<Real>::const_iterator< Vector<Real> > it_field  = field.begin(dim);
   Array<Real>::const_iterator< Vector<Real> > it_normal = this->normals.getArray().begin(dim);
 
   Vector<Real> rfv(dim);
   Vector<Real> np_rfv(dim);
 
   UInt nb_contact_nodes = this->slaves.getSize();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // nodes
     UInt node = this->slaves(n);
 
     // relative field vector
     rfv = it_field[node];;
 
     // normal projection of relative field
     const Vector<Real> & normal_v = it_normal[n];
     np_rfv = normal_v;
     np_rfv *= rfv.dot(normal_v);
 
     // subtract normal projection from relative field to get the tangential projection
     rfv -= np_rfv;
     rel_tang_field.push_back(rfv);
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::computeNormalGap(Array<Real> & gap) const {
   AKANTU_DEBUG_IN();
 
   gap.resize(0);
 
   UInt dim = this->model.getSpatialDimension();
 
   Array<Real>::const_iterator< Vector<Real> > it_cur_pos = this->model.getCurrentPosition().begin(dim);
   Array<Real>::const_iterator< Vector<Real> > it_normal = this->normals.getArray().begin(dim);
 
   Vector<Real> gap_v(dim);
 
   UInt nb_contact_nodes = this->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // nodes
     UInt node = this->slaves(n);
 
     // gap vector
     gap_v = it_cur_pos[node];
     gap_v -= this->reference_point;
 
     // length of normal projection of gap vector
     const Vector<Real> & normal_v  = it_normal[n];
     gap.push_back(gap_v.dot(normal_v));
   }
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::computeRelativeNormalField(const Array<Real> & field,
 					     Array<Real> & rel_normal_field) const {
   AKANTU_DEBUG_IN();
 
   // resize arrays to zero
   rel_normal_field.resize(0);
 
   UInt dim = this->model.getSpatialDimension();
 
   Array<Real>::const_iterator< Vector<Real> > it_field  = field.begin(dim);
   Array<Real>::const_iterator< Vector<Real> > it_normal = this->normals.getArray().begin(dim);
 
   UInt nb_contact_nodes = this->getNbContactNodes();
   for (UInt n=0; n<nb_contact_nodes; ++n) {
     // nodes
     UInt node = this->slaves(n);
 
     const Vector<Real> & field_v  = it_field[node];
     const Vector<Real> & normal_v = it_normal[n];
     
     rel_normal_field.push_back(field_v.dot(normal_v));
   }
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::printself(std::ostream & stream, int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
 
   stream << space << "NTRFContact [" << std::endl;
   NTNBaseContact::printself(stream,indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 void NTRFContact::addDumpFieldToDumper(const std::string & dumper_name,
 				       const std::string & field_id) {
   AKANTU_DEBUG_IN();
 
   /*
 #ifdef AKANTU_USE_IOHELPER
   const Array<UInt> & nodal_filter = this->slaves.getArray();
 
 #define ADD_FIELD(field_id, field, type)				\
   internalAddDumpFieldToDumper(dumper_name,				\
 			       field_id,				\
 			       new DumperIOHelper::NodalField< type, true, \
 							       Array<type>, \
 							       Array<UInt> >(field, 0, 0, &nodal_filter))
   */
 
   /*
   if(field_id == "displacement") {
     ADD_FIELD(field_id, this->model.getDisplacement(), Real);
   }
   else if(field_id == "contact_pressure") {
     internalAddDumpFieldToDumper(dumper_name,
 				 field_id,
 				 new DumperIOHelper::NodalField<Real>(this->contact_pressure.getArray()));
   }
   else {*/
   NTNBaseContact::addDumpFieldToDumper(dumper_name, field_id);
     //}
 
   /*
 #undef ADD_FIELD
 #endif
   */
 
   AKANTU_DEBUG_OUT();
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/ntn_contact/ntrf_contact.hh b/src/ntn_contact/ntrf_contact.hh
index d8f7b18b0..f40b7eb57 100644
--- a/src/ntn_contact/ntrf_contact.hh
+++ b/src/ntn_contact/ntrf_contact.hh
@@ -1,116 +1,113 @@
 /**
  * @file   ntrf_contact.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  contact for node to rigid flat interface
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 
 #ifndef __AST_NTRF_CONTACT_HH__
 #define __AST_NTRF_CONTACT_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_base_contact.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 class NTRFContact : public NTNBaseContact {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
 
   NTRFContact(SolidMechanicsModel & model,
 	      const ContactID & id = "contact",
 	      const MemoryID & memory_id = 0);
   virtual ~NTRFContact() {};
 
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   void setReferencePoint(Real x=0., Real y=0., Real z=0.);
   void setNormal(Real x=1., Real y=0., Real z=0.);
 
   /// add surface and nodes according to the surface normal
   void addSurface(const Surface & surf);
 
   // add nodes from a list
   void addNodes(Array<UInt> & nodes);
 
   /// update (copy the normal to all normals)
   virtual void updateNormals();
 
   /// update the impedance matrix
   virtual void updateImpedance();
 
   /// compute the normal gap
   virtual void computeNormalGap(Array<Real> & gap) const;
 
   /// compute relative normal field (only value that has to be multiplied with the normal)
   /// relative to master nodes
   virtual void computeRelativeNormalField(const Array<Real> & field,
 					  Array<Real> & rel_normal_field) const;
 
   /// compute relative tangential field (complet array)
   /// relative to master nodes
   virtual void computeRelativeTangentialField(const Array<Real> & field,
 					      Array<Real> & rel_tang_field) const;
 
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   virtual void addDumpFieldToDumper(const std::string & dumper_name,
 				    const std::string & field_id);
   //  virtual void addDumpFieldVector(const std::string & field_id);
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 private:
   /// reference point for rigid flat surface
   Vector<Real> reference_point;
   /// outpointing normal of rigid flat surface
   Vector<Real> normal;
 };
 
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 //#include "ntrf_contact_inline_impl.cc"
 
 /// standard output stream operator
 inline std::ostream & operator <<(std::ostream & stream, const NTRFContact & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #endif /* __AST_NTRF_CONTACT_HH__ */
diff --git a/src/ntn_contact/ntrf_friction.hh b/src/ntn_contact/ntrf_friction.hh
index 3118ea087..c54dc169b 100644
--- a/src/ntn_contact/ntrf_friction.hh
+++ b/src/ntn_contact/ntrf_friction.hh
@@ -1,88 +1,85 @@
 /**
  * @file   ntrf_friction.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  friction for node to rigid flat interface
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 
 #ifndef __AST_NTRF_FRICTION_HH__
 #define __AST_NTRF_FRICTION_HH__
 
 /* -------------------------------------------------------------------------- */
 // simtools
 #include "ntn_friclaw_coulomb.hh"
 
-__BEGIN_SIMTOOLS__
-
-/* -------------------------------------------------------------------------- */
-using namespace akantu;
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <template<class> class FrictionLaw = NTNFricLawCoulomb, 
 	  class Regularisation = NTNFricRegNoRegularisation>
 class NTRFFriction : public FrictionLaw<Regularisation> {
   /* ------------------------------------------------------------------------ */
   /* Constructors/Destructors                                                 */
   /* ------------------------------------------------------------------------ */
 public:
   
   NTRFFriction(NTNBaseContact * contact,
 	       const FrictionID & id = "friction",
 	       const MemoryID & memory_id = 0);
   virtual ~NTRFFriction() {};
   
   /* ------------------------------------------------------------------------ */
   /* Methods                                                                  */
   /* ------------------------------------------------------------------------ */
 public:
   /// function to print the contain of the class
   virtual void printself(std::ostream & stream, int indent = 0) const;
 
   /* ------------------------------------------------------------------------ */
   /* Dumpable                                                                 */
   /* ------------------------------------------------------------------------ */
 public:
 
   /* ------------------------------------------------------------------------ */
   /* Accessors                                                                */
   /* ------------------------------------------------------------------------ */
 public:
 
   /* ------------------------------------------------------------------------ */
   /* Class Members                                                            */
   /* ------------------------------------------------------------------------ */
 protected:
 
 };
 
 /* -------------------------------------------------------------------------- */
 /* inline functions                                                           */
 /* -------------------------------------------------------------------------- */
 
 /// standard output stream operato
 template <template<class> class FrictionLaw, class Regularisation>
 inline std::ostream & operator <<(std::ostream & stream, 
 				  const NTRFFriction<FrictionLaw, 
 						     Regularisation> & _this)
 {
   _this.printself(stream);
   return stream;
 }
 
-__END_SIMTOOLS__
+__END_AKANTU__
 
 #include "ntrf_friction_tmpl.hh"
 
 #endif /* __AST_NTRF_FRICTION_HH__ */
 
 
diff --git a/src/ntn_contact/ntrf_friction_tmpl.hh b/src/ntn_contact/ntrf_friction_tmpl.hh
index d81d7612d..36aa6398c 100644
--- a/src/ntn_contact/ntrf_friction_tmpl.hh
+++ b/src/ntn_contact/ntrf_friction_tmpl.hh
@@ -1,86 +1,86 @@
 /**
  * @file   ntrf_friction_tmpl.hh
  *
  * @author David Simon Kammer <david.kammer@epfl.ch>
  *
  *
  * @brief  implementation of node to rigid flat interface friction
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 /* -------------------------------------------------------------------------- */
 //#include "ntrf_friction.hh"
 
-__BEGIN_SIMTOOLS__
+__BEGIN_AKANTU__
 
 /* -------------------------------------------------------------------------- */
 template <template <class> class FrictionLaw, class Regularisation>
 NTRFFriction<FrictionLaw, Regularisation>::NTRFFriction(NTNBaseContact * contact,
 							const FrictionID & id,
 							const MemoryID & memory_id) : 
   FrictionLaw<Regularisation>(contact,id,memory_id) {
   AKANTU_DEBUG_IN();
   
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 template <template <class> class FrictionLaw, class Regularisation>
 void NTRFFriction<FrictionLaw, Regularisation>::printself(std::ostream & stream, 
 							  int indent) const {
   AKANTU_DEBUG_IN();
   std::string space;
   for(Int i = 0; i < indent; i++, space += AKANTU_INDENT);
   
   stream << space << "NTRFFriction [" << std::endl;
   FrictionLaw<Regularisation>::printself(stream, ++indent);
   stream << space << "]" << std::endl;
 
   AKANTU_DEBUG_OUT();
 }
 
 /* -------------------------------------------------------------------------- */
 /*
 void NTRFFriction::addDumpFieldToDumper(const std::string & dumper_name,
 					const std::string & field_id) {
   AKANTU_DEBUG_IN();
   
 #ifdef AKANTU_USE_IOHELPER
   //  const SynchronizedArray<UInt> * nodal_filter = &(this->contact.getSlaves());
   
   if(field_id == "is_sticking") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new DumperIOHelper::NodalField<bool>(this->is_sticking.getArray()));
   }
   else if(field_id == "frictional_strength") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new DumperIOHelper::NodalField<Real>(this->frictional_strength.getArray()));
   }
   else if(field_id == "friction_traction") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new DumperIOHelper::NodalField<Real>(this->friction_traction.getArray()));
   }
   else if(field_id == "slip") {
     this->internalAddDumpFieldToDumper(dumper_name,
 			       field_id,
 			       new DumperIOHelper::NodalField<Real>(this->slip.getArray()));
   }
   else {
     this->contact.addDumpFieldToDumper(dumper_name, field_id);
   }
   
 #endif
 
   AKANTU_DEBUG_OUT();
 }
 */
 
-__END_SIMTOOLS__
+__END_AKANTU__
diff --git a/src/akantu_simtools.hh b/src/tasn_contact.hh
similarity index 98%
rename from src/akantu_simtools.hh
rename to src/tasn_contact.hh
index c08b2f390..01241e9db 100644
--- a/src/akantu_simtools.hh
+++ b/src/tasn_contact.hh
@@ -1,60 +1,59 @@
 /**
  * @file   akantu_simtools.hh
  *
  *
  *
  * @brief  
  *
  * @section LICENSE
  *
  * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
  * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
  *
  */
 
 // ast common
-#include "ast_common.hh"
 #include "synchronized_array.hh"
 #include "parameter_reader.hh"
 #include "manual_restart.hh"
 
 // functions
 #include "boundary_functions.hh"
 #include "node_filter.hh"
 
 // boundary conditions
 #include "force_based_dirichlet.hh"
 #include "spring_bc.hh"
 #include "inclined_flat_dirichlet.hh"
 
 // ntn/ntrf contact
 #include "ntn_base_contact.hh"
 #include "ntn_contact.hh"
 #include "ntrf_contact.hh"
 
 // ntn/ntrf friction
 #include "ntn_base_friction.hh"
 #include "ntn_friction.hh"
 #include "ntrf_friction.hh"
 
 // friction regularisations
 #include "ntn_fricreg_no_regularisation.hh"
 #include "ntn_fricreg_rubin_ampuero.hh"
 #include "ntn_fricreg_simplified_prakash_clifton.hh"
 
 // friction laws
 #include "ntn_friclaw_coulomb.hh"
 #include "ntn_friclaw_linear_slip_weakening.hh"
 #include "ntn_friclaw_linear_cohesive.hh"
 
 // initiation of friction
 #include "ntn_initiation_function.hh"
 
 /*
 #include "ntn_friction_coulomb.hh"
 #include "ntn_friction_linear_slip_weakening.hh"
 #include "ntrf_friction_coulomb.hh"
 #include "ntrf_friction_regularized_coulomb.hh"
 #include "ntrf_friction_linear_slip_weakening.hh"
 #include "ntrf_friction_mathilde.hh"
 */