Page MenuHomec4science

function.hh
No OneTemporary

File Metadata

Created
Sat, May 25, 13:23

function.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 __INTER_FUNC__
#define __INTER_FUNC__
/* -------------------------------------------------------------------------- */
#include <vector>
/* -------------------------------------------------------------------------- */
#include <string.h>
#include <string>
#include <fftw.h>
#include <iostream>
#include <fstream>
/* -------------------------------------------------------------------------- */
#include <string>
#include <math.h>
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
enum INTER_FUNCTION_TYPE { ZERO, LINEAR, SQ_ROOT, PARABOLA, CUBIC_HERMITE, CUBIC_BEZIER, QUADRATIC_BEZIER, TEST_INTER };
class INTER_FUNC {
public:
INTER_FUNC();
INTER_FUNC(INTER_FUNCTION_TYPE type_, std::vector<Real> points_);
INTER_FUNC(INTER_FUNCTION_TYPE type_, std::vector<Real> points_, Real a);
~INTER_FUNC();
INTER_FUNCTION_TYPE type;
bool sm_error;
std::vector<Real> points, coef;
// return function value for 0<=x<1
Real get_value(Real x);
Real get_derivative(Real x);
};
__END_TAMAAS__
#endif

Event Timeline