v0.13.0
Public Member Functions | Private Attributes | List of all members
ApproxFieldFunctionGeneric Struct Reference

Public Member Functions

 ApproxFieldFunctionGeneric (ThicknessFun thickness)
 
double operator() (const double x, const double y, const double z)
 

Private Attributes

ThicknessFun zThickness
 

Detailed Description

Definition at line 59 of file cornea_z_approx.cpp.

Constructor & Destructor Documentation

◆ ApproxFieldFunctionGeneric()

ApproxFieldFunctionGeneric::ApproxFieldFunctionGeneric ( ThicknessFun  thickness)

Definition at line 61 of file cornea_z_approx.cpp.

61 : zThickness(thickness) {}

Member Function Documentation

◆ operator()()

double ApproxFieldFunctionGeneric::operator() ( const double  x,
const double  y,
const double  z 
)

Definition at line 63 of file cornea_z_approx.cpp.

63  {
64 
65  const double r = sqrt(x * x + y * y);
66  const double theta = atan2(x, y);
67  const double A =
68  (pow(cos(theta - alpha), 2)) / Rs + (pow(sin(theta - alpha), 2)) / Rf;
69  const double B = (Qs + 1) * (pow(cos(theta - alpha), 2)) / (pow(Rs, 2)) +
70  (Qf + 1) * (pow(sin(theta - alpha), 2)) / (pow(Rf, 2));
71  const double calc_z =
72  z0 - (pow(r, 2) * A) / (1 + sqrt(1 - (pow(r, 2) * B)));
73 
74  return calc_z + zThickness(r, theta);
75  }
constexpr double Qs
constexpr double Rs
constexpr double Rf
constexpr double z0
constexpr double Qf
constexpr double alpha
const double r
rate factor
double A

Member Data Documentation

◆ zThickness

ThicknessFun ApproxFieldFunctionGeneric::zThickness
private

Definition at line 78 of file cornea_z_approx.cpp.


The documentation for this struct was generated from the following file: