function
Class WaveDragAxisymmetric.MaxVolumeConstraint

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

public static class WaveDragAxisymmetric.MaxVolumeConstraint
extends WaveDragAxisymmetric.MaxRadiusConstraint

Computes the volume constraint violation of a given body.

Author:
dgorur

Field Summary
protected static int MESH_COUNT
           
protected  double[] rFull
           
protected  double[] xFull
           
 
Fields inherited from class function.WaveDragAxisymmetric.MaxRadiusConstraint
CONSTRAINT_FLAG
 
Fields inherited from class function.BasicScalarFunction
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS
 
Constructor Summary
WaveDragAxisymmetric.MaxVolumeConstraint()
           
 
Method Summary
protected  void akima(double[] x, double[] y, int n, double[] xDesired, double[] yDesired, int nDesired)
           
protected  double computeVolume(double[] xArr, double[] rArr)
           
protected  double getConstraintValue()
          Returns the maximum allowed value of the maximum radius.
 void init()
          Initialization method.
static void main(java.lang.String[] args)
          Tests the Sears-Haack (radius-constraint!!!) and quadratic 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, 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

MESH_COUNT

protected static int MESH_COUNT

xFull

protected double[] xFull

rFull

protected double[] rFull
Constructor Detail

WaveDragAxisymmetric.MaxVolumeConstraint

public WaveDragAxisymmetric.MaxVolumeConstraint()
Method Detail

akima

protected void akima(double[] x,
                     double[] y,
                     int n,
                     double[] xDesired,
                     double[] yDesired,
                     int nDesired)

getConstraintValue

protected double getConstraintValue()
Description copied from class: WaveDragAxisymmetric.MaxRadiusConstraint
Returns the maximum allowed value of the maximum radius.

Overrides:
getConstraintValue in class WaveDragAxisymmetric.MaxRadiusConstraint
Returns:
the maximum allowed value of the maximum radius.

computeVolume

protected double computeVolume(double[] xArr,
                               double[] rArr)

init

public void init()
Description copied from class: BasicScalarFunction
Initialization method.

Specified by:
init in interface ScalarFunction
Overrides:
init in class WaveDragAxisymmetric.AreaRule

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.MaxRadiusConstraint
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.MaxRadiusConstraint
Parameters:
mat - given matrix of inputs.
outputs - vector to store the result.

main

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

Parameters:
args - Mahc number, body length, volume.