| 
    Chombo + EB
    3.2
    
   | 
 
#include <SmoothAbsoluteValue.H>
Public Member Functions | |
| SmoothAbsoluteValue (const BaseIF *a_f, const BaseIF *a_g, const Real &a_delta) | |
| virtual | ~SmoothAbsoluteValue () | 
| virtual Real | smoothAbsFMinusG (const IntVect &a_deriv, const RealVect &a_point) const | 
| void | getWCase (int &a_case, Real &a_wval, const RealVect &a_point) const | 
Static Public Member Functions | |
| static void | setKnownFunction (int a_whichfunc) | 
Protected Member Functions | |
| virtual Real | valueAem (const RealVect &a_point) const | 
| virtual Real | firstDerivAem (const IntVect &a_deriv, const RealVect &a_point) const | 
| virtual Real | secondDerivAem (const IntVect &a_deriv, const RealVect &a_point) const | 
| virtual Real | thirdDerivAem (const IntVect &a_deriv, const RealVect &a_point) const | 
| virtual Real | fourthDerivAem (const IntVect &a_deriv, const RealVect &a_point) const | 
| bool | isBogus (const Real &a_number) const | 
| just checks nan  More... | |
| void | checkAgainstKnown (const Real &a_myAnswer, const IntVect &a_deriv, const RealVect &a_point) const | 
| if s_knownFunc is set, check against known answer  More... | |
Protected Attributes | |
| const BaseIF * | m_f | 
| const BaseIF * | m_g | 
| Real | m_d | 
| Real | m_pi | 
Static Protected Attributes | |
| static int | s_knownFunc | 
| for debugging against known functions  More... | |
Private Member Functions | |
| SmoothAbsoluteValue (const SmoothAbsoluteValue &a_inputIF) | |
| SmoothAbsoluteValue () | |
| void | operator= (const SmoothAbsoluteValue &a_inputIF) | 
Functions to take a smooth absolute value of the difference between two functions A_e(a,b) = |a-b|
max(f, g) = (a + b + |a - b|)/2 We need to make abs(a-b) smooth.
We take the convolution of the absolute value with cos^4(pi w/(2 delta))
      
  | 
  inlinevirtual | 
References checkAgainstKnown(), firstDerivAem(), fourthDerivAem(), getWCase(), isBogus(), secondDerivAem(), smoothAbsFMinusG(), thirdDerivAem(), and valueAem().
      
  | 
  inlineprivate | 
References MayDay::Abort().
      
  | 
  inlineprivate | 
References MayDay::Abort().
      
  | 
  inlinestatic | 
Set a known f and g (from short list I have programmed) to check answer against 1 = double ramp with ramp_normal_0 = 2. 1. 0. ramp_normal_1 = -2. 1. 0. ramp_point_0 = 0. 1. 0. ramp_point_1 = 1. 1. 0.
2 = double sphere with sphere_center_0 = 0 0 0 sphere_center_1 = 1 0 0 sphere_radius_0 = 0.75 sphere_radius_1 = 0.75
References s_knownFunc.
      
  | 
  virtual | 
Referenced by ~SmoothAbsoluteValue().
returns -1 if w < -delta, 1 if w > delta, 0 otherwise reduces to regular |f-g| unless case == 0
Referenced by ~SmoothAbsoluteValue().
Here is the logic of this stuff. We have three cases that reduce to two cases. w = f(x) - g(x) case 1: (w > delta): -— whole integral is above zero answer = abs(w) case -1: (w < - delta): -— whole integral is below zero answer = abs(w) case 0: (-delta <= w <= delta) — have to split integral into above and below answer = functionAem();
Referenced by DoubleRampExact::~DoubleRampExact(), DoubleSphereExact::~DoubleSphereExact(), OffsetSphereExact::~OffsetSphereExact(), and ~SmoothAbsoluteValue().
      
  | 
  protected | 
just checks nan
Referenced by ~SmoothAbsoluteValue().
      
  | 
  protected | 
if s_knownFunc is set, check against known answer
Referenced by ~SmoothAbsoluteValue().
      
  | 
  inlineprivate | 
References MayDay::Abort().
      
  | 
  protected | 
Referenced by SmoothAbsoluteValue().
      
  | 
  protected | 
Referenced by SmoothAbsoluteValue().
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  staticprotected | 
for debugging against known functions
Referenced by setKnownFunction().
 1.8.13