/* This file is part of the OpenLB library
*
* Copyright (C) 2014-2016 Cyril Masquelier, Albert Mink, Mathias J. Krause, Benjamin Förster
* E-mail contact: info@openlb.net
* The most recent release of OpenLB can be downloaded at
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef SMOOTH_INDICATOR_BASE_F_3D_H
#define SMOOTH_INDICATOR_BASE_F_3D_H
#include
#include "core/vector.h"
#include "functors/analytical/analyticalBaseF.h"
#include "functors/genericF.h"
namespace olb {
template
class SmoothIndicatorF3D;
/** SmoothIndicatorF3D is an application from \f$ \Omega \subset R^3 \to [0,1] \f$.
* \param _myMin holds minimal(component wise) vector of the domain \f$ \Omega \f$.
* \param _myMax holds maximal(component wise) vector of the domain \f$ \Omega \f$.
* \param _center
* \param _diam_
*/
template
class SmoothIndicatorF3D : public AnalyticalF3D {
protected:
SmoothIndicatorF3D();
//~SmoothIndicatorF3D() override {};
Vector _myMin;
Vector _myMax;
Vector _pos;
Vector _rotMat; //saved values of rotation matrix
S _circumRadius;
Vector _theta;
S _epsilon;
std::string _name = "smoothIndicator3D";
public:
void init(Vector theta, Vector vel, T mass, Vector mofi);
const Vector& getMin() const;
const Vector& getMax() const;
const Vector& getPos() const;
const Vector& getRotationMatrix() const;
const Vector& getTheta() const;
const S& getCircumRadius() const;
const S& getEpsilon() const;
std::string name();
void setRotationMatrix(Vector rotMat);
void setTheta(Vector theta);
void setEpsilon(S epsilon);
SmoothIndicatorF3D& operator+(SmoothIndicatorF3D& rhs);
};
template
class SmoothIndicatorIdentity3D : public SmoothIndicatorF3D {
protected:
SmoothIndicatorF3D& _f;
public:
SmoothIndicatorIdentity3D(SmoothIndicatorF3D& f);
bool operator() (T output[], const S input[]) override;
};
/** SmoothIndicatorF3D is an application from \f$ \Omega \subset R^3 \to [0,1] \f$.
* Base class for specific SmoothIndicator implementation providing common data..
*/
template
class SmoothIndicatorF3D : public AnalyticalF3D {
protected:
SmoothIndicatorF3D();
Vector _myMin;
Vector _myMax;
Vector _pos;
Vector _vel;
Vector _acc;
Vector _acc2;
Vector _force;
Vector _rotMat; //saved values of rotation matrix
S _circumRadius;
Vector _theta;
Vector _omega;
Vector _alpha;
Vector _alpha2;
S _mass;
Vector _mofi; //moment of inertia
S _epsilon;
std::string _name="HLBMobject3D";
public:
void init(Vector theta, Vector vel, T mass, Vector mofi);
const Vector& getMin() const;
const Vector& getMax() const;
const Vector& getPos() const;
const Vector& getVel() const;
const Vector& getAcc() const;
const Vector& getAcc2() const;
const Vector& getForce() const;
const Vector& getRotationMatrix() const;
const Vector& getTheta() const;
const Vector& getOmega() const;
const Vector& getAlpha() const;
const Vector& getAlpha2() const;
const Vector& getMofi() const;
const S& getCircumRadius() const;
const S& getMass() const;
const S& getEpsilon() const;
std::string name();
void setPos(Vector pos);
void setVel(Vector vel);
void setAcc(Vector acc);
void setAcc2(Vector acc2);
void setForce(Vector force);
void setRotationMatrix(Vector rotMat);
void setTheta(Vector theta);
void setOmega(Vector omega);
void setAlpha(Vector alpha);
void setAlpha2(Vector alpha2);
void setMofi(Vector mofi);
void setMass(S mass);
void setEpsilon(S epsilon);
};
}
#endif