/* This file is part of the OpenLB library
*
* Copyright (C) 2019 Adrian Kummerlaender
* 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 DESCRIPTOR_FUNCTION_H
#define DESCRIPTOR_FUNCTION_H
#include
#include
#include "descriptorTag.h"
#include "utilities/fraction.h"
namespace olb {
template class Vector;
namespace descriptors {
/// \defgroup descriptor_interface Descriptor functions
/// \ingroup descriptor
//@{
/// \defgroup descriptor_interface_details Descriptor data
/// \ingroup descriptor_interface
//@{
namespace data {
using utilities::Fraction;
template
constexpr int vicinity = {};
template
constexpr int c[Q][D] = {};
template
constexpr int opposite[Q] = {};
template
constexpr Fraction t[Q] = {};
template
constexpr Fraction cs2 = {};
template
constexpr Fraction lambda_e = {};
template
constexpr Fraction lambda_h = {};
}
template
constexpr int vicinity()
{
return data::vicinity;
}
template
constexpr int c(unsigned iPop, unsigned iDim)
{
return data::c[iPop][iDim];
}
template
constexpr Vector c(unsigned iPop)
{
return Vector(data::c[iPop]);
}
template
constexpr int opposite(unsigned iPop)
{
return data::opposite[iPop];
}
template
constexpr T t(unsigned iPop, tag::DEFAULT)
{
return data::t[iPop].template as();
}
template
constexpr T invCs2()
{
return data::cs2.template inverseAs();
}
template
constexpr T lambda_e()
{
return data::lambda_e.template inverseAs();
}
template
constexpr T lambda_h()
{
return data::lambda_h.template inverseAs();
}
//@}
template
constexpr int d()
{
return DESCRIPTOR::d;
}
template
constexpr int q()
{
return DESCRIPTOR::q;
}
template
constexpr int vicinity()
{
return vicinity();
}
template
constexpr int c(unsigned iPop, unsigned iDim)
{
return c(iPop, iDim);
}
template
constexpr Vector c(unsigned iPop)
{
return c(iPop);
}
template
constexpr int opposite(unsigned iPop)
{
return opposite(iPop);
}
template
constexpr T t(unsigned iPop)
{
return t(iPop, typename DESCRIPTOR::category_tag());
}
template
constexpr T invCs2()
{
return invCs2();
}
template
constexpr T lambda_e()
{
return lambda_e();
}
template
constexpr T lambda_h()
{
return lambda_h();
}
//@}
}
}
#endif