diff --git a/python/setup.py b/python/setup.py index e3a6140..5c4cc17 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,19 +1,25 @@ import setuptools import sysconfig setuptools.setup( name="tamaas", version="1.0.0", packages=setuptools.find_packages(), package_data={'tamaas': ['_tamaas.{}'.format( sysconfig.get_config_vars()['EXT_SUFFIX']) ]}, author=['Lucas Frérot', 'Guillaume Anciaux', 'Valentine Rey', 'Son Pham-Ba'], + author_email="lucas.frerot@epfl.ch", description='A fast rough contact library', url="https://c4science.ch/project/view/2036/", + install_requires=['numpy'], + extra_require={ + "VTK": ['uvw'], + "FEM": ['akantu'], + }, ) diff --git a/src/model/mindlin.cpp b/src/model/mindlin.cpp index 920f992..9ee9a98 100644 --- a/src/model/mindlin.cpp +++ b/src/model/mindlin.cpp @@ -1,103 +1,101 @@ /** * @file * * @author Lucas Frérot * * @section LICENSE * * Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de * Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des * Solides) * * Tamaas 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. * * Tamaas 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 Tamaas. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "mindlin.hh" #include "boussinesq_helper.hh" #include "elasto_plastic_model.hh" #include "influence.hh" #include "kelvin_helper.hh" /* -------------------------------------------------------------------------- */ namespace tamaas { /* -------------------------------------------------------------------------- */ template Mindlin::Mindlin(Model* model) : parent(model) { surface_tractions.setNbComponents(trait::components); surface_tractions.resize(this->source_buffer.front().sizes()); } /* -------------------------------------------------------------------------- */ template void Mindlin::applyIf(GridBase& source, GridBase& out, filter_t pred) const { Real nu = this->model->getPoissonRatio(), mu = this->model->getShearModulus(); influence::Kelvin kelvin(mu, nu); influence::Kelvin kelvin_strain(mu, nu); influence::Boussinesq boussinesq(mu, nu); influence::ElasticHelper elasticity(mu, nu); detail::KelvinHelper khelper; detail::SurfaceTractionHelper thelper; detail::BoussinesqHelper bhelper; const Real L = this->model->getSystemSize().front(); auto apply = [&](decltype(this->source_buffer)& source_buffers, decltype(this->disp_buffer)& out_buffers) { surface_tractions = 0; // computing surface tractions (q power cancelled with // boussinesq) thelper.template computeSurfaceTractions( source_buffers, surface_tractions, this->wavevectors, L, kelvin_strain, elasticity); surface_tractions *= -1; // apply kelvin khelper.applyIntegral(source_buffers, out_buffers, this->wavevectors, L, kelvin); khelper.applyFreeTerm(source_buffers, out_buffers, kelvin); // no need for fundamental correction // apply boussinesq (q power cancelled with mindlin 2-grad) bhelper.template apply(surface_tractions, out_buffers, this->wavevectors, L, boussinesq); - bhelper.makeFundamentalModeGreatAgain(surface_tractions, out_buffers, - elasticity); // Correcting for fundamental mode Vector n{{{0, 0, -1}}}; for (UInt i : Loop::range(source_buffers.size())) { typename detail::KelvinTrait::source_t w( source_buffers[i](0)); typename detail::KelvinTrait::out_t u( out_buffers[i](0)); auto t = w * n; bhelper.makeFundamentalModeGreatAgain(t, u, elasticity); } }; this->fourierApplyIf(apply, source, out, pred); } /* -------------------------------------------------------------------------- */ /* Template instanciation */ /* -------------------------------------------------------------------------- */ template class Mindlin; template class Mindlin; } // namespace tamaas