approxY()

approximation of a MESHFREE-entity by the MESHFREE least squares operators

Approximation of given discrete function values by the MESHFREE least squares approximation, i.e. MESHFREE uses the classical least-squares approximation stencil at the current (MESHFREE point) location or optionally at any user-provided location \( \mathbf{x}\), in order to provide the following approximation: \begin{align} \tilde{u}( \mathbf{x} ) = \sum \limits_j c^0_j( \mathbf{x} ) \cdot u_j\end{align} The function approxY(), optionally, provides derivatives in the sense \begin{align} \tilde{\partial}^{*} u( \mathbf{x} ) = \sum \limits_j c^{*}_j( \mathbf{x} ) \cdot u_j,\end{align} where '*' represents \( x\), \( y\), or \( z\) derivatives. See DOCUMATH_DifferentialOperators.pdf for a complete description of the least-squares idea, especially refer to chapter 1.
[ ... approxY( %ind_u% , iChamber , OPTIONAL: iOrder, OPTIONAL: alphaKernel, OPTIONAL: whatToApproximate, OPTIONAL: xApprox, yApprox, zApprox, OPTIONAL: factor_allowed_overshoot, OPTIONAL: reallyDo ) ... ]
  1. %ind_u%: index of the function to be approximated
  2. iChamber: approximation in what chamber; default: the chamber index of the current MESHFREE point Y%ind_cham%
  3. iOrder : order of approximation (1,2,3); by putting a MINUS-sign in front of the order, the algorithm tries to adjust the approximation order to lower values, if the requested order would lead to unstable operator stencils. default: -2
  4. alphaKernel : specify \( \alpha\) in the kernel/weight function \( W(\mathbf{x}_j,\mathbf{x}) = \exp\left( -\alpha \frac{\|\mathbf{x}_j-\mathbf{x}\|^2}{h(\mathbf{x}_j)^2} \right)\); default: given by DIFFOP_kernel_Gradient
  5. whatToApproximate : 0 (function), 1 (x-derivative), 2 (y-derivative), 3 (z-derivative) 4 (local stencil minimum); 5 (local stencil-maximum); 6 (local stencil-span = maximum-minimum) default: 0
  6. xApprox (, yApprox, zApprox) : define the location where to do the approximation; default: location of current MESHFREE point (Y%ind_x(1)%, Y%ind_x(2)%, Y%ind_x(3)%)
  7. yApprox : see above, optional, y-value of the location to be avaluated
  8. zApprox : see above, optional, z-value of the location to be avaluated
  9. factor_allowed_overshoot : activate and define the factor \( \alpha\) for the allowed overshoot of the approximation: 0 (no limit for overshoot), \( 0 < \alpha \leq 1\) (internally programmed values), \( \alpha > 1\) (user defined factor); default: 1.3
  10. reallyDo : evaluate approxY-task ONLY if reallyDo==1 . In case the approxY-evaluation, the user can restrict the evaluation to a subset of instances by providing a (possibly) simple functional here, maybe something like Y%ind_BC%=$wall$ which would restrict the evaluation to boundary points at the $wall$
Note:
  • DIFFOP_Version triggers the approximation method.
  • The smoothing length / interaction radius \( h(\mathbf{x}_j)\) is used from the corresponding SmoothingLength definition of chamber iChamber.
  • Given an approximation task in iChamber at the location \( \bf{x}\), then MESHFREE will search for the closest neighbor point at location \( \bf{x}_i\) in iChamber. The neighbors for the approximation task around \( \bf{x}\) are determined by the neighbor list of \( \bf{x}_i\). Thus, the choice of the parameter NEIGHBOR_FilterMethod will have a big influence on the results of the approximation. Please remember that NEIGHBOR_FilterMethod > 1 prevents the neighbor search from "looking through" thin walls.
  • using approxY() partially with default values: for example, one would like to define some allowed overshoot, but finds it tedious to set all preceeding parameters, one can do the following
    approxY( %ind_p%, &iCham&, 3, %EQN_default%, %EQN_default%, %EQN_default%, %EQN_default%, %EQN_default%, 1.1) # either this approxY( %ind_p%, &iCham&, 3, %EQN_d%, %EQN_d%, %EQN_d%, %EQN_d%, %EQN_d%, 1.1) # or this (being a bit more compact)
Experts only: Two-digit mode for iOrder Instead of specifying a single digit for iOrder, there is the option to specify a two digit parameter that controls which points are considered for the approximation.
Approximation Order 1Approximation Order 2Approximation Order 3
interior and free surface particles (Y%ind_kob%=%BND_none% or Y%ind_kob%=%BND_free%)111213
use only regular boundary particles (without free surface)212223
use only interior particles (Y%ind_kob%=%BND_none%)313233
use only boundary particles (including free surfaces)414243
Experts only: use iOrder to define rescue-weight of suppressed points ( only in two-digit-mode of iOrder ) In the two-digit-mode, one can use the post-comma-digits of iOrder to define the weight if suppressed points in the neighborhood. For example, if using iOrder = 23 , one uses only regular boundary points for approximation. The interior points contribute to the MLS-matrix with a very small weight. If no regular boundary points remain in the nieghborhood, then the MLS-matrix becomes quasi-singular, if the weights of the points tend to 0. This can be rescued, if a small weight > 0 is provided to those suppressed points. iOrder = 23.001 will apply a rescue-weight of 0.001. The default weight for suppressed points is 0 ( it was 0.0001 until beta2024.02.0 , please be aware ). The standard-weight for active / non-suppressed points is 1, of course.