function
Class WaveDragAxisymmetric.MaxRadiusConstraint

java.lang.Object
  extended by function.BasicScalarFunction
      extended by function.WaveDragAxisymmetric.AreaRule
          extended by function.WaveDragAxisymmetric.MaxRadiusConstraint
All Implemented Interfaces:
Computable, ScalarFunction, VariableBounds
Direct Known Subclasses:
WaveDragAxisymmetric.MaxVolumeConstraint
Enclosing class:
WaveDragAxisymmetric

public static class WaveDragAxisymmetric.MaxRadiusConstraint
extends WaveDragAxisymmetric.AreaRule

Computes the constraint violation for the max-radius case.

Author:
dgorur

Field Summary
protected static int CONSTRAINT_FLAG
           
 
Fields inherited from class function.BasicScalarFunction
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS
 
Constructor Summary
WaveDragAxisymmetric.MaxRadiusConstraint()
           
 
Method Summary
protected  double getConstraintValue()
          Returns the maximum allowed value of the maximum radius.
static void main(java.lang.String[] args)
          Tests the constraint violations of the quadratic and Sears-Haack bodies.
 double quickCompute(double[] x)
          Compute method without dimension checking.
 void quickCompute(cern.colt.matrix.DoubleMatrix2D mat, cern.colt.matrix.DoubleMatrix1D outputs)
          Compute method without dimension checking, operating on DoubleMatrix2D and exploiting optimized operations therein.
 
Methods inherited from class function.WaveDragAxisymmetric.AreaRule
getBounds, getParent, init, setBounds, setParent, vectorize
 
Methods inherited from class function.BasicScalarFunction
checkDimensions, compute, compute, compute, compute, compute, compute, getInputDimension, getOutputDimension, isWithinBounds, makeBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTRAINT_FLAG

protected static int CONSTRAINT_FLAG
Constructor Detail

WaveDragAxisymmetric.MaxRadiusConstraint

public WaveDragAxisymmetric.MaxRadiusConstraint()
Method Detail

main

public static void main(java.lang.String[] args)
Tests the constraint violations of the quadratic and Sears-Haack bodies.

Parameters:
args - Mach number, body length, max radius.

quickCompute

public double quickCompute(double[] x)
Description copied from class: BasicScalarFunction
Compute method without dimension checking. All subclasses must implement this method: it is the core method that defines the function.

Specified by:
quickCompute in interface ScalarFunction
Overrides:
quickCompute in class WaveDragAxisymmetric.AreaRule
Parameters:
x - the given input.
Returns:
the output corresponding to the given input.

quickCompute

public void quickCompute(cern.colt.matrix.DoubleMatrix2D mat,
                         cern.colt.matrix.DoubleMatrix1D outputs)
Description copied from class: BasicScalarFunction
Compute method without dimension checking, operating on DoubleMatrix2D and exploiting optimized operations therein.

Specified by:
quickCompute in interface ScalarFunction
Overrides:
quickCompute in class WaveDragAxisymmetric.AreaRule
Parameters:
mat - given matrix of inputs.
outputs - vector to store the result.

getConstraintValue

protected double getConstraintValue()
Returns the maximum allowed value of the maximum radius.

Returns:
the maximum allowed value of the maximum radius.