24#ifndef INDIC_COMB_3D_HH
25#define INDIC_COMB_3D_HH
32template <
typename S,
template<
typename U>
class F>
37template <
typename S,
template<
typename U>
class F>
41 bool* outputF = output;
42 _f->operator()(outputF, input);
44 bool outputG[this->getTargetDim()];
45 _g->operator()(outputG, input);
47 for (
int i = 0; i < this->getTargetDim(); i++) {
48 output[i] = F<S>()(outputF[i], outputG[i]);
57 for (
int i=0; i<3; i++) {
66 return sdf::unify(this->_f->signedDistance(input), this->_g->signedDistance(input));
75 for (
int i=0; i<3; i++) {
76 this->
_myMin[i] = this->
_f->getMin()[i];
77 this->
_myMax[i] = this->
_f->getMax()[i];
84 return sdf::subtraction(this->_f->signedDistance(input), this->_g->signedDistance(input));
92 for (
int i=0; i<3; i++) {
101 return sdf::intersection(this->_f->signedDistance(input), this->_g->signedDistance(input));
106template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
108std::shared_ptr<IndicatorF3D<S>>
operator+(std::shared_ptr<F1<S>> lhs, std::shared_ptr<F2<S>> rhs)
110 return std::make_shared<IndicPlus3D<S>>(lhs, rhs);
113template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
115std::shared_ptr<IndicatorF3D<S>>
operator-(std::shared_ptr<F1<S>> lhs, std::shared_ptr<F2<S>> rhs)
117 return std::make_shared<IndicMinus3D<S>>(rhs, lhs);
120template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
122std::shared_ptr<IndicatorF3D<S>>
operator*(std::shared_ptr<F1<S>> lhs, std::shared_ptr<F2<S>> rhs)
124 return std::make_shared<IndicMultiplication3D<S>>(lhs, rhs);
128template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
130std::shared_ptr<IndicatorF3D<S>>
operator+(F1<S> & lhs, std::shared_ptr<F2<S>> rhs)
135template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
137std::shared_ptr<IndicatorF3D<S>>
operator-(F1<S> & lhs, std::shared_ptr<F2<S>> rhs)
142template<
typename S,
template <
typename U>
class F1,
template <
typename V>
class F2,
144std::shared_ptr<IndicatorF3D<S>>
operator*(F1<S> & lhs, std::shared_ptr<F2<S>> rhs)
IndicComb3D //////////////////////////////// arithmetic helper class for Indicator 3d functors.
std::shared_ptr< IndicatorF3D< S > > _f
IndicComb3D(std::shared_ptr< IndicatorF3D< S > > f, std::shared_ptr< IndicatorF3D< S > > g)
bool operator()(bool output[], const S input[3])
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
IndicMinus3D(std::shared_ptr< IndicatorF3D< S > > f, std::shared_ptr< IndicatorF3D< S > > g)
IndicMultiplication3D(std::shared_ptr< IndicatorF3D< S > > f, std::shared_ptr< IndicatorF3D< S > > g)
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
IndicPlus3D(std::shared_ptr< IndicatorF3D< S > > f, std::shared_ptr< IndicatorF3D< S > > g)
IndicatorF3D is an application from .
T intersection(T a, T b) any_platform
Volume which is shared by a and b creates a new object.
T unify(T a, T b) any_platform
Volume of a and volume of b are combined as a new object.
T subtraction(T a, T b) any_platform
Volume of a is subtracted from b.
cpu::simd::Pack< T > min(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
cpu::simd::Pack< T > max(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Top level namespace for all of OpenLB.
constexpr meta::enable_if_arithmetic_t< U, Vector< T, D > > operator-(U a, const ScalarVector< T, D, IMPL > &b) any_platform
constexpr meta::enable_if_arithmetic_t< U, Vector< T, D > > operator+(U a, const ScalarVector< T, D, IMPL > &b) any_platform
constexpr meta::enable_if_arithmetic_t< U, Vector< decltype(T{} *U{}), D > > operator*(U a, const ScalarVector< T, D, IMPL > &b) any_platform