Page MenuHomec4science

bem_gigi.hh
No OneTemporary

File Metadata

Created
Mon, May 27, 12:13

bem_gigi.hh

/**
*
* @author Valentine Rey <valentine.rey@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_GIGI_H
#define BEM_GIGI_H
/* -------------------------------------------------------------------------- */
#include "bem_fft_base.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
class BemGigi : public BemFFTBase {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
BemGigi(Surface<Real>& p)
: BemFFTBase(p), search_direction(p.size(), p.getL()),
projected_direction(p.size(), p.getL()),
mean_disp_search_direction(p.size(), p.getL()) {
e_star = 1.;
max_iterations = 10000;
};
virtual ~BemGigi(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
Real computeEquilibrium(Real epsilon, Real mean_displacement);
void updateSearchDirection(Real factor);
void updateDisplacements(Real tau);
Real computeOptimalStep();
void emptyOverlap();
void enforceMeanDisplacement(Real mean_displacement);
void computePressures(Real mean_displacement);
Real computeStoppingCriterion();
void optimizeToMeanDisplacement(Real imposed_mean);
Real positiveGapAverage(Real shift);
Real computeTau();
/* ------------------------------------------------------------------------ */
/* 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;
};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
//! exploration direction for the Gigi algo
Surface<Real> search_direction;
//! projected exploration direction for the Gigi algo (fourier version)
Surface<Real> projected_direction;
//! exploration direction for optimization of mean displacement
Surface<Real> mean_disp_search_direction;
};
__END_TAMAAS__
#endif /* BEM_GIGI_H */

Event Timeline