Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90744657
bem_fft_base.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 4, 09:15
Size
5 KB
Mime Type
text/x-c++
Expires
Wed, Nov 6, 09:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22127957
Attached To
rTAMAAS tamaas
bem_fft_base.hh
View Options
/**
*
* @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_FFT_BASE_H
#define BEM_FFT_BASE_H
/* -------------------------------------------------------------------------- */
#include "bem_interface.hh"
#include <cmath>
#include "surface_statistics.hh"
#include "fftransform.hh"
#include "meta_functional.hh"
#include "functional.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
class
BemFFTBase
:
public
BemInterface
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
BemFFTBase
(
Surface
<
Real
>
&
p
);
virtual
~
BemFFTBase
();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
//! compute the displacement from traction input
virtual
void
computeDisplacementsFromTractions
();
//! compute the tractions from displacement input
virtual
void
computeTractionsFromDisplacements
();
//! apply influence funtions
virtual
void
applyInfluenceFunctions
(
Surface
<
Real
>
&
input
,
Surface
<
Real
>
&
output
);
//! apply inverse influence funtions
virtual
void
applyInverseInfluenceFunctions
(
Surface
<
Real
>
&
input
,
Surface
<
Real
>
&
output
);
//! compute the influcence coefficients of pressure over displacement
virtual
void
computeSpectralInfluenceOverDisplacement
();
//! compute the displacements
virtual
void
computeTrueDisplacements
();
//! compute the gap
virtual
void
computeGaps
();
//! get the number of iterations
virtual
UInt
getNbIterations
()
const
=
0
;
//! get the convergence steps of iterations
virtual
const
std
::
vector
<
Real
>
&
getConvergenceIterations
()
const
=
0
;
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
//! return the influcence coefficients
virtual
const
Surface
<
Real
>
&
getSpectralInfluenceOverDisplacement
();
//! return the actual tractions
virtual
const
Surface
<
Real
>
&
getTractions
()
const
;
//! return the actual displacements
virtual
const
Surface
<
Real
>
&
getDisplacements
()
const
;
//! get the computed true displacement
const
Surface
<
Real
>
&
getTrueDisplacements
(){
return
true_displacements
;};
//! get the computed gap
const
Surface
<
Real
>
&
getGap
(){
return
gap
;};
//! set the elastic effective modulus
void
setEffectiveModulus
(
Real
e_star
);
//! set the maximal number of iterations
void
setMaxIterations
(
UInt
max_iter
){
this
->
max_iterations
=
max_iter
;};
//! set dump freq
void
setDumpFreq
(
Real
dump_freq
){
this
->
dump_freq
=
dump_freq
;};
//! set functional
void
addFunctional
(
::
tamaas
::
Functional
*
new_funct
);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected
:
//! Functional for optimization
MetaFunctional
*
functional
;
//! surface tractions
Surface
<
Real
>
surface_tractions
;
//! surface displacement
Surface
<
Real
>
surface_displacements
;
//! surface input in spectral
SurfaceComplex
<
Real
>
surface_spectral_input
;
//! surface output in spectral
SurfaceComplex
<
Real
>
surface_spectral_output
;
//! surface influence coefficient over displacement
Surface
<
Real
>
surface_spectral_influence_disp
;
//! shifted displacement in order to get the true displacement
Surface
<
Real
>
true_displacements
;
//! old displacements (for stopping criterion)
Surface
<
Real
>
old_displacements
;
//! computing of the gap
Surface
<
Real
>
gap
;
//! Effective young modulus
Real
e_star
;
//! maximum of iterations
UInt
max_iterations
;
//! number of iterations
UInt
nb_iterations
;
//! number of iterations
std
::
vector
<
Real
>
convergence_iterations
;
//! frequency at which to dump iteration info
UInt
dump_freq
;
/* ------------------------------------------------------------------------ */
/* temporary trick about some obscure scaling factor */
/* ------------------------------------------------------------------------ */
/*
0 2 = 2*1
1 4 = 2*2
2 10 = 2*5
3 20 = 2*10
4 34 = 2*12
*/
//#define tmp_coeff (2.*n/M_PI)
//#define tmp_coeff (n/M_PI)
const
Real
tmp_coeff
;
};
__END_TAMAAS__
#endif
/* BEM_FFT_BASE_H */
Event Timeline
Log In to Comment