diff --git a/src/fe_engine/fe_engine_template_tmpl_field.hh b/src/fe_engine/fe_engine_template_tmpl_field.hh index 225c145ec..5b8641797 100644 --- a/src/fe_engine/fe_engine_template_tmpl_field.hh +++ b/src/fe_engine/fe_engine_template_tmpl_field.hh @@ -1,428 +1,426 @@ /** * @file fe_engine_template_tmpl_field.hh * * @author Nicolas Richart * * @date creation Tue Jul 25 2017 * * @brief implementation of the assemble field s functions * * @section LICENSE * * Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "fe_engine_template.hh" /* -------------------------------------------------------------------------- */ #ifndef __AKANTU_FE_ENGINE_TEMPLATE_TMPL_FIELD_HH__ #define __AKANTU_FE_ENGINE_TEMPLATE_TMPL_FIELD_HH__ namespace akantu { /* -------------------------------------------------------------------------- */ /* Matrix lumping functions */ /* -------------------------------------------------------------------------- */ namespace fe_engine { namespace details { namespace { template void fillField(const Functor & field_funct, Array & field, UInt nb_element, UInt nb_integration_points, const ElementType & type, const GhostType & ghost_type) { UInt nb_degree_of_freedom = field.getNbComponent(); field.resize(nb_integration_points * nb_element); auto field_it = field.begin_reinterpret( nb_degree_of_freedom, nb_integration_points, nb_element); Element el(type, 0, ghost_type); for (; el.element < nb_element; ++el.element, ++field_it) { field_funct(*field_it, el); } } } // namespace } // namespace details } // namespace fe_engine /** * Helper class to be able to write a partial specialization on the element kind */ namespace fe_engine { namespace details { template struct AssembleLumpedTemplateHelper {}; #define ASSEMBLE_LUMPED(type) \ fem.template assembleFieldLumped(field_funct, lumped, dof_id, \ dof_manager, ghost_type) #define AKANTU_SPECIALIZE_ASSEMBLE_HELPER(kind) \ template <> struct AssembleLumpedTemplateHelper { \ template