function
Class WaveDragAxisymmetric.AreaRule

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

public static class WaveDragAxisymmetric.AreaRule
extends BasicScalarFunction
implements VariableBounds

Function for computing the wave-drag coefficient C_D_w of an axisymmetric body. The input to the problem comprises the radii of the body at a predetermined set of x-locations, and the output is the wave drag of that configuration.

Author:
dgorur

Field Summary
 
Fields inherited from class function.BasicScalarFunction
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS
 
Constructor Summary
WaveDragAxisymmetric.AreaRule()
           
 
Method Summary
 Hypercube getBounds()
          Returns a Hypercube specifying the domain of this Computable.
 WaveDragAxisymmetric getParent()
          Returns the parent WaveDragAxisymmetric container.
 void init()
          Initialization method.
static void main(java.lang.String[] args)
          Tests the nominal (quadratic) and Sears-Haack bodies on the area-rule analysis.
 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.
 void setBounds(Hypercube bounds)
          Sets the bounds for this ScalarFunction.
 void setParent(WaveDragAxisymmetric parent)
          Sets the parent.
protected  void vectorize(cern.colt.matrix.DoubleMatrix2D mat, int rowCount, double[] rVec)
          Vectorizes a matrix for sending to Fortran.
 
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
 

Constructor Detail

WaveDragAxisymmetric.AreaRule

public WaveDragAxisymmetric.AreaRule()
Method Detail

main

public static void main(java.lang.String[] args)
Tests the nominal (quadratic) and Sears-Haack bodies on the area-rule analysis.

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

getBounds

public Hypercube getBounds()
Description copied from interface: Computable
Returns a Hypercube specifying the domain of this Computable.

Specified by:
getBounds in interface Computable
Overrides:
getBounds in class BasicScalarFunction
Returns:
the domain of this ScalarFunction.

getParent

public WaveDragAxisymmetric getParent()
Returns the parent WaveDragAxisymmetric container.

Returns:
the parent.

init

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

Specified by:
init in interface ScalarFunction
Overrides:
init in class BasicScalarFunction

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
Specified by:
quickCompute in class BasicScalarFunction
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 BasicScalarFunction
Parameters:
mat - given matrix of inputs.
outputs - vector to store the result.

setBounds

public void setBounds(Hypercube bounds)
Description copied from interface: VariableBounds
Sets the bounds for this ScalarFunction.

Specified by:
setBounds in interface VariableBounds
Parameters:
bounds - the given bounds.

setParent

public void setParent(WaveDragAxisymmetric parent)
Sets the parent.

Parameters:
parent - the given parent.

vectorize

protected void vectorize(cern.colt.matrix.DoubleMatrix2D mat,
                         int rowCount,
                         double[] rVec)
Vectorizes a matrix for sending to Fortran.

Parameters:
mat - The given matrix.
rowCount - the number of rows.
rVec - an array to hold the vectorized result.