Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74427430
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
Sat, Jul 27, 19:06
Size
5 KB
Mime Type
text/x-c++
Expires
Mon, Jul 29, 19:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19394634
Attached To
rTAMAAS tamaas
bem_fft_base.hh
View Options
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-2020 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef BEM_FFT_BASE_H
#define BEM_FFT_BASE_H
/* -------------------------------------------------------------------------- */
#include "bem_functional.hh"
#include "bem_interface.hh"
#include "bem_meta_functional.hh"
#include "surface_statistics.hh"
/* -------------------------------------------------------------------------- */
namespace
tamaas
{
class
BemFFTBase
:
public
BemInterface
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
BemFFTBase
(
Surface
<
Real
>&
p
);
/* ------------------------------------------------------------------------ */
/* 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 elastic effective modulus
Real
getEffectiveModulus
();
//! set the maximal number of iterations
void
setMaxIterations
(
UInt
max_iter
)
{
this
->
max_iterations
=
max_iter
;
};
//! get the maximal number of iterations
UInt
getMaxIterations
()
{
return
this
->
max_iterations
;
};
//! set dump freq
void
setDumpFreq
(
UInt
dump_freq
)
{
this
->
dump_freq
=
dump_freq
;
};
//! get dump freq
UInt
getDumpFreq
()
{
return
this
->
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
;
};
}
// namespace tamaas
#endif
/* BEM_FFT_BASE_H */
Event Timeline
Log In to Comment