QUGaR 0.0.4
Loading...
Searching...
No Matches
tpms_lib.hpp File Reference

Declaration of TPMS functions to be consumed by Algoim. More...

Include dependency graph for tpms_lib.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  qugar::impl::tpms::TPMSBase< dim >
 

Namespaces

namespace  qugar
 QUGaR's main namespace.
 
namespace  qugar::impl
 
namespace  qugar::impl::tpms
 

Macros

#define declare_tpms(TPMS_NAME)
 

Functions

 qugar::impl::tpms::declare_tpms (Schoen)
 Schoen's gyroid function. Defined as f(x,y,z,m,n,q) = sin(2 pi m x) * cos(2 pi n y) + sin(2 pi n y) * cos(2 pi q z) + sin(2 pi q z) * cos(2 pi m x) this is a triply periodic function with period (m, n, q).
 
 qugar::impl::tpms::declare_tpms (SchoenIWP)
 Schoen IWP's gyroid function. Defined as f(x,y,z,m,n,q) = 2 * (cos(2 pi m x) * cos(2 pi n y) + cos(2 pi n y) * cos(2 pi q z)
 
 qugar::impl::tpms::declare_tpms (SchoenFRD)
 Schoen FRD's gyroid function. Defined as f(x,y,z,m,n,q) = 4 * cos(2 pi m x) * cos(2 pi n y) * cos(2 pi q z) - cos(4 pi m x) * cos(4 pi n y)
 
 qugar::impl::tpms::declare_tpms (FischerKochS)
 Fischer-Koch S' gyroid function. Defined as f(x,y,z,m,n,q) = cos(4 pi m x) * sin(2 pi n y) * cos(2 pi q z)
 
 qugar::impl::tpms::declare_tpms (SchwarzDiamond)
 Schwarz diamond's gyroid function. Defined as f(x,y,z,m,n,q) = cos(2 pi m x) * cos(2 pi n y) * cos(2 pi q z)
 
 qugar::impl::tpms::declare_tpms (SchwarzPrimitive)
 Schwarz primitive's gyroid function. Defined as f(x,y,z,m,n,q) = cos(2 pi mpoint(0)) + cos(2 pi n y) + cos(2 pi q z) this is a triply periodic function with period (m, n, q).
 

Detailed Description

Declaration of TPMS functions to be consumed by Algoim.

Author
Pablo Antolin (pablo.nosp@m..ant.nosp@m.olin@.nosp@m.epfl.nosp@m..ch)
Date
2025-01-21

Macro Definition Documentation

◆ declare_tpms

#define declare_tpms ( TPMS_NAME)
Value:
template<int dim> class TPMS_NAME : public TPMSBase<dim> \
{ \
template<typename T> using Gradient = qugar::impl::ImplicitFunc<dim>::template Gradient<T>; \
template<typename T> using Hessian = qugar::impl::ImplicitFunc<dim>::template Hessian<T>; \
\
public: \
explicit TPMS_NAME(const Vector<real, dim> &mnq); \
\
TPMS_NAME(); \
\
[[nodiscard]] virtual real operator()(const Point<dim> &point) const final; \
\
[[nodiscard]] virtual ::algoim::Interval<dim> operator()( \
const Point<dim, ::algoim::Interval<dim>> &point) const final; \
\
[[nodiscard]] virtual Gradient<real> grad(const Point<dim> &point) const final; \
\
[[nodiscard]] virtual Gradient<::algoim::Interval<dim>> grad( \
const Point<dim, ::algoim::Interval<dim>> &point) const final; \
\
[[nodiscard]] virtual Hessian<real> hessian(const Point<dim> &point) const final; \
\
private: \
template<typename T> [[nodiscard]] T eval_(const Point<dim, T> &point) const; \
\
template<typename T> [[nodiscard]] Gradient<T> grad_(const Point<dim, T> &point) const; \
\
template<typename T> [[nodiscard]] Hessian<T> hessian_(const Point<dim, T> &point) const; \
};
Domain functions.
Definition domain_function.hpp:41