Page MenuHomec4science

bem_gigi.hh
No OneTemporary

File Metadata

Created
Wed, Oct 9, 05:14

bem_gigi.hh

#ifndef BEM_GIGI_H
#define BEM_GIGI_H
/* -------------------------------------------------------------------------- */
#include "bem_fft_base.hh"
/* -------------------------------------------------------------------------- */
class BemGigi : public BemFFTBase {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
BemGigi(Surface<Real> & p) :
BemFFTBase(p),
surface_t(p.size(),p.getL()),
surface_r(p.size(),p.getL()),
surface_spectral_r(p.size(),p.getL()),
surface_w(p.size(),p.getL()),
surface_q(p.size(),p.getL()),
surface_spectral_q(p.size(),p.getL()),
pold(p.size(),p.getL()){
e_star = 1.;
max_iterations = 10000;
};
virtual ~BemGigi(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
Real computeEquilibrium(Real epsilon,Real pressure,
int nthreads = 1);
// compute the non zero gap penalty functional
Real computeR();
Real computeG();
// compute the conjugate step size
Real computeAlpha();
Real computeTau();
// compute the overlapp space
Real computeIol();
void emptyoverlap(Real tau);
// update the search direction
void updateW(Real R, Real Rold);
void updateT(Real G, Real Gold);
// update the tractions
void updatePressurea(Real alpha);
void updatePressureb(Real tau);
void truncatePressure();
// enforce the applied and contact pressures balance
void enforcePressureBalance(Real applied_pressure);
Real computeMeanGapsInContact();
void computeGaps();
/* ------------------------------------------------------------------------ */
/* 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;};
Surface<Real> & getSurfaceT(){return surface_t;};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
//! exploration direction for the Gigi algo
Surface<Real> surface_t;
//! projected exploration direction for the Gigi algo
Surface<Real> surface_r;
//! projected exploration direction for the Gigi algo (fourier version)
SurfaceComplex<Real> surface_spectral_r;
//! exploration direction for the Gigi algo
Surface<Real> surface_w;
//! projected exploration direction for the Gigi algo
Surface<Real> surface_q;
//! projected exploration direction for the Gigi algo (fourier version)
SurfaceComplex<Real> surface_spectral_q;
//! previous pressure
Surface<Real> pold;
};
#endif /* BEM_GIGI_H */

Event Timeline