Page MenuHomec4science

westergaard.hh
No OneTemporary

File Metadata

Created
Tue, Nov 19, 14:20

westergaard.hh

/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2017 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 __WESTERGAARD_HH__
#define __WESTERGAARD_HH__
/* -------------------------------------------------------------------------- */
#include "be_engine.hh"
#include "fft_plan_manager.hh"
#include "grid_hermitian.hh"
#include "integral_operator.hh"
#include "model_type.hh"
#include "tamaas.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
/**
* @brief Operator based on Westergaard solution and the Dicrete Fourier
* Transform.
* This class is templated with model type to allow efficient storage of the
* influence coefficients.
* The integral operator is only applied to surface pressure/displacements,
* even for volume models.
*/
template <model_type mtype, IntegralOperator::kind otype>
class Westergaard : public IntegralOperator {
using trait = model_type_traits<mtype>;
static constexpr UInt dim = trait::dimension;
static constexpr UInt bdim = trait::boundary_dimension;
static constexpr UInt comp = trait::components;
public:
/// Constuctor: initalizes influence coefficients and allocates buffer
Westergaard(Model* model);
/// Get influence coefficients
const GridHermitian<Real, bdim>& getInfluence() const { return influence; }
/// Apply influence coefficients to input
void apply(GridBase<Real>& input, GridBase<Real>& ouput) const override;
/// Update the influence coefficients
void updateFromModel() override { initInfluence(); }
/// Kind
IntegralOperator::kind getKind() const override { return otype; }
/// Type
model_type getType() const override { return mtype; }
private:
/// Initialize influence coefficients
void initInfluence();
template <typename Functor>
void initFromFunctor(Functor func);
/// Apply a functor in Fourier space
template <typename Functor>
void fourierApply(Functor func, GridBase<Real>& in,
GridBase<Real>& out) const;
/// Compute L_2 norm of influence functions
Real getOperatorNorm() override;
public:
GridHermitian<Real, bdim> influence;
mutable GridHermitian<Real, bdim> buffer;
};
__END_TAMAAS__
#endif // __WESTERGAARD_HH__

Event Timeline