Page MenuHomec4science

bem_interface.hh
No OneTemporary

File Metadata

Created
Sat, May 4, 02:22

bem_interface.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_INTERFACE_H
#define BEM_INTERFACE_H
#include "fft_engine.hh"
#include "surface.hh"
/* -------------------------------------------------------------------------- */
namespace tamaas {
class BemInterface {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
BemInterface(Surface<Real>& surface)
: surface(), spectral_surface(surface.size(), surface.getL()) {
this->surface.wrap(surface);
this->computeSpectralSurface();
};
virtual ~BemInterface(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
protected:
//! compute the displacements from the tractions
virtual void computeDisplacementsFromTractions(){
SURFACE_FATAL("TO BE IMPLEMENTED")};
//! compute the tractions from the displacements
virtual void computeTractionsFromDisplacements(){
SURFACE_FATAL("TO BE IMPLEMENTED")};
public:
//! compute the spectral surface
virtual void computeSpectralSurface() {
engine.forward(surface, spectral_surface);
};
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public:
//! return the actual tractions
virtual const Surface<Real>& getTractions() const = 0;
//! return the actual displacements
virtual const Surface<Real>& getDisplacements() const = 0;
//! return the manipulated surface
const Surface<Real>& getSurface() const { return this->surface; };
//! return the manipulated surface in fourier space
const SurfaceComplex<Real>& getSpectralSurface() const {
return this->spectral_surface;
};
//! return the manipulated surface
void setSurface(Surface<Real>& surface) { this->surface = surface; };
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
//! the surface profile we work with
Surface<Real> surface;
//! the surface profile in fourier space
SurfaceComplex<Real> spectral_surface;
//! fft engine
FFTEngine engine;
};
} // namespace tamaas
#endif /* BEM_INTERFACE_H */

Event Timeline