/** * @file neighborhood_max_criterion_inline_implementation.cc * @author Aurelia Isabel Cuba Ramos * @date Wed Oct 14 21:31:07 2015 * * @brief Implementation of inline functions for class NeighborhoodMaxCriterion * * @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 . * */ /* -------------------------------------------------------------------------- */ #ifndef __AKANTU_NEIGHBORHOOD_MAX_CRITERION_INLINE_IMPL_CC__ #define __AKANTU_NEIGHBORHOOD_MAX_CRITERION_INLINE_IMPL_CC__ __BEGIN_AKANTU__ /* -------------------------------------------------------------------------- */ inline UInt NeighborhoodMaxCriterion::getNbDataForElements(const Array & elements, SynchronizationTag tag) const { UInt nb_quadrature_points = this->model.getNbIntegrationPoints(elements); UInt size = 0; if(tag == _gst_nh_criterion) { size += sizeof(Real) * nb_quadrature_points; } return size; } /* -------------------------------------------------------------------------- */ inline void NeighborhoodMaxCriterion::packElementData(CommunicationBuffer & buffer, const Array & elements, SynchronizationTag tag) const { if(tag == _gst_nh_criterion) { this->packElementalDataHelper(criterion, buffer, elements,true, this->model.getFEEngine()); } } /* -------------------------------------------------------------------------- */ inline void NeighborhoodMaxCriterion::unpackElementData(CommunicationBuffer & buffer, const Array & elements, SynchronizationTag tag) { if(tag == _gst_nh_criterion) { this->unpackElementalDataHelper(criterion, buffer, elements, true, this->model.getFEEngine()); } } /* -------------------------------------------------------------------------- */ __END_AKANTU__ #endif /* __AKANTU_NEIGHBORHOOD_MAX_CRITERION_INLINE_IMPL_CC__ */