diff --git a/src/model/elasto_plastic/isotropic_hardening.cpp b/src/model/elasto_plastic/isotropic_hardening.cpp deleted file mode 100644 index 6ab7d2c..0000000 --- a/src/model/elasto_plastic/isotropic_hardening.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * SPDX-License-Indentifier: AGPL-3.0-or-later - * - * Copyright (©) 2016-2023 EPFL (École Polytechnique Fédérale de Lausanne), - * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) - * Copyright (©) 2020-2023 Lucas Frérot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -/* -------------------------------------------------------------------------- */ -#include "isotropic_hardening.hh" -#include "influence.hh" -/* -------------------------------------------------------------------------- */ -namespace tamaas { -/* -------------------------------------------------------------------------- */ - -template -IsotropicHardening::IsotropicHardening(Model* model, Real sigma_0, Real h) - : model(model), sigma_0(sigma_0), h(h) { - plastic_strain = model->request( - "plastic_strain", model->getDiscretization(), trait::voigt); - cumulated_plastic_strain = model->request( - "cumulated_plastic_strain", model->getDiscretization(), 1); -} - -/* -------------------------------------------------------------------------- */ -/// \cond DO_NOT_DOCUMENT -template <> -void IsotropicHardening::applyTangentIncrement( - Grid& output, const Grid& input, - const Grid& strain, - const Grid& strain_increment) const { - const influence::ElasticHelper elasticity( - this->model->getShearModulus(), this->model->getPoissonRatio()); - - using pmatrix = SymMatrixProxy; - using cpmatrix = SymMatrixProxy; - - Real sigma_0 = this->sigma_0, h = this->h; // for captures - - Loop::loop( - [elasticity, sigma_0, - h] CUDA_LAMBDA(pmatrix out, cpmatrix in, cpmatrix epsilon, - cpmatrix delta_epsilon, cpmatrix ep, const Real& p) { - auto sigma_tr = elasticity(epsilon - ep + delta_epsilon); - - decltype(sigma_tr) dev; - dev.deviatoric(sigma_tr, 3); - - auto von_mises = std::sqrt(1.5) * dev.l2norm(); - - if (von_mises - IsotropicHardening::hardening( - p, h, sigma_0) > - 0) { - Real dp = - (von_mises - IsotropicHardening::hardening( - p, h, sigma_0)) / - (3 * elasticity.mu + h); - // Applying tangent from Bonnet & Frangi, p.175 - - const Real beta = 3 * elasticity.mu * dp / von_mises; - const Real gamma = 3 * elasticity.mu / (3 * elasticity.mu + h); - - const Real dot = dev.dot(in); - dev *= 3 * elasticity.mu * (gamma - beta) * dot / - (von_mises * von_mises); - - out.deviatoric(in); - out *= 2 * elasticity.mu * beta; - out += dev; - } else - out = 0; - }, - range(output), range(input), range(strain), - range(strain_increment), range(*this->plastic_strain), - *this->cumulated_plastic_strain); -} -/// \endcond - -/* -------------------------------------------------------------------------- */ -/* Template instanciation */ -/* -------------------------------------------------------------------------- */ -template class IsotropicHardening; - -} // namespace tamaas