Page MenuHomec4science

surface_generator_filter_fft.hh
No OneTemporary

File Metadata

Created
Sat, Jun 29, 20:53

surface_generator_filter_fft.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 SURFACE_GENERATOR_FILTER_FFT_H
#define SURFACE_GENERATOR_FILTER_FFT_H
/* -------------------------------------------------------------------------- */
#include "surface_generator_filter.hh"
#include "isopowerlaw.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
typedef Grid<Real, 2> Grid2dReal;
/// Legacy class to maintain interface
class SurfaceGeneratorFilterFFT {
public:
//! can construct a generator with default values
SurfaceGeneratorFilterFFT();
//! destructor
virtual ~SurfaceGeneratorFilterFFT();
public:
//! get high frequency cut
UInt & getQ2(){return pl_filter.getQ2();}
//! get low frequency cut
UInt & getQ0(){return pl_filter.getQ0();}
//! get roll frequency cut
UInt & getQ1(){return pl_filter.getQ1();}
//! get hurst
Real & getHurst(){return pl_filter.getHurst();}
/// compute analytical RMS
Real analyticalRMS() const {return pl_filter.rmsHeights(); }
/// Swig does not wrap the numpy otherwise
Grid2dReal & buildSurface();
/// Get gridsize
UInt & getGridSize() { return grid_size; }
/// Get random seed
long & getRandomSeed() { return generator.getRandomSeed(); }
/// Get RMS
Real & getRMS() { return rms; }
/// Contrain RMS
Real constrainRMS();
/// Init
void Init() {}
protected:
SurfaceGeneratorFilter<2> generator;
Isopowerlaw<2> pl_filter;
UInt grid_size;
Real rms;
};
__END_TAMAAS__
#endif

Event Timeline