C_CreateCollatedResultsAdmin

C_CreateCollatedResultsAdmin is used to extract collated results for a chain of restart analyses. This feature corresponds to the include restart parent models option on the OrcaFlex results form.

In order to extract collated results, you must make a sequence of function calls, always starting with a call to C_CreateCollatedResultsAdmin. For example, to extract time histories and range graphs you would call the following functions:

  1. C_CreateCollatedResultsAdmin specifying the simulation period and which restart models to include.
  2. C_GetNumOfSamplesCollated to find out how many samples are needed for the time history arrays.
  3. C_GetSampleTimesCollated to obtain the sample times.
  4. Multiple calls to C_GetTimeHistoryCollated, or a single call to C_GetMultipleTimeHistoriesCollated, to extract the time history values.
  5. Multiple calls to C_GetRangeGraphCollated to extract the range graphs for lines or turbine blades.
  6. C_DestroyCollatedResultsAdmin to free memory allocated by C_CreateCollatedResultsAdmin.

As indicated above, you can make a single call to C_CreateCollatedResultsAdmin followed by multiple calls to collated results extraction functions using the same collated results handle obtained from C_CreateCollatedResultsAdmin.

Once you have finished extracting collated results, you must call C_DestroyCollatedResultsAdmin to free memory allocated by C_CreateCollatedResultsAdmin.

void C_CreateCollatedResultsAdmin(

TOrcFxAPIHandle ModelHandle,

int RestartModelCount,

int *lpRestartModels,

const TPeriod *lpPeriod,

TOrcFxAPIHandle *lpCollatedResultsHandle,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model. This must be the latest model in the restart chain for which you want to extract results.

RestartModelCount (IN)

The length of the array passed in lpRestartModels. If a value of 0 is passed for RestartModelCount then the lpRestartModels parameter is ignored, and all models in the restart chain are used.

lpRestartModels (IN)

An array, whose length is given by the RestartModelCount parameter, of 1-based integer indices specifying which models are to be included. You can use C_GetRestartParentFileNames to obtain the file names of the models in the restart chain, and also the length of the restart chain.

If a value of 0 is passed for RestartModelCount then the lpRestartModels parameter is ignored, and NULL can be passed.

lpPeriod (IN)

Points to a TPeriod variable which specifies the period of the simulation over which results are to be extracted. The PeriodNum member of lpPeriod must be either pnWholeSimulation or pnSpecifiedPeriod.

For pnSpecifiedPeriod a FromTime value of OrcinaDefaultReal() can be used to mean the first sample of the first model in the restart chain. Similarly, a ToTime value of OrcinaDefaultReal() can be used to mean the lasst sample of the last model in the restart chain.

If pnWholeSimulation is specified, then all samples from each specified model in the restart chain will be used. This is equivalent to specifying pnSpecifiedPeriod with FromTime and ToTime both set to OrcinaDefaultReal().

lpCollatedResultsHandle (OUT)

Points to a variable in which the collated results handle will be returned.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

See also

C_DestroyCollatedResultsAdmin, C_GetTimeHistoryCollated, C_GetMultipleTimeHistoriesCollated, C_GetNumOfSamplesCollated, C_GetRangeGraphCollated, C_GetSampleTimesCollated.