Page MenuHomec4science

bem_kato.hh
No OneTemporary

File Metadata

Created
Sun, May 26, 14:25

bem_kato.hh

/**
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2016 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 <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef BEM_KATO_H
#define BEM_KATO_H
/* -------------------------------------------------------------------------- */
#include "bem_fft_base.hh"
/* -------------------------------------------------------------------------- */
class BemKato : public BemFFTBase {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
BemKato(Surface<Real> & p) :
BemFFTBase(p),
surface_tractions_backup(p.size(),p.getL()){
e_star = 1.;
max_pressure = 1e300;
};
virtual ~BemKato(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
//! compute the equilibrium situation
Real computeEquilibrium(Real epsilon,Real pressure);
public:
//! perform a line scan in a given direction
Real linescan(Real scale,Real pressure);
//! perform a line search
Real linesearch(Real & hmax, Real fold,
Real pressure, int search_flag);
//! make a step in the gradient direction(copy in pressure2)
void updatePressure(Real scale);
//! backup tractions before doing the linescan
void backupTractions();
//! find the constant pressure shift making balance with load
void shiftPressure(Real required_pressure);
//! truncate the pressure to positive values
Real positivePressure(Real step);
//! compute the reaction (sum positive pressures)
void truncatePressure();
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public:
//! get the number of iterations
UInt getNbIterations() const{return this->nb_iterations;};
//! get the convergence steps of iterations
const std::vector<Real> & getConvergenceIterations() const{return this->convergence_iterations;};
//! set the maximal pressure admissible
void setMaxPressure(Real max_pressure){this->max_pressure = max_pressure;};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
//! surface of tractions used during steepest descent
Surface<Real> surface_tractions_backup;
//! maximal pressure admissible (for perfectly plastic purpose)
Real max_pressure;
};
#endif /* BEM_KATO_H */

Event Timeline