Please wait...
×

Error

Posted Wed, 24 Aug 2011 05:19:21 GMT by Muler
I am reposting this from the Feflow wish list question posted by mistake over there.

I would appreciate it if someone gives me a direction how to declare the IfmBool in the following function.

double IfmGetResultsTransportMassValueAtXYZ(
  IfmDocument pDoc,
  double x,
  double y,
  double z,
  IfmBool *ine);

I have declared the values of x, y and z as normal cpp variables. I have declared the last one as: IfmBool *ine; however, the function tells me that it has to be initialized.

IfmGetResultsTransportMassValueAtXYZ(x, y, z, ine) says it needs initializing the ine variable. How to declare the IfmBool variable?




Posted Wed, 14 Sep 2011 16:18:28 GMT by Denim Umeshkumar Anajwala
Hey Muler.

This API function uses a 'pointer' to a IfmBool variable; pointers can be confusing indeed.

Here is how you use the IfmBool variable together with the API function:

double simMass(0.0);
IfmBool inDomain(false);

simMass = IfmGetResultsTransportMassValueAtXYZ(pDoc, x, y, z, &inDomain);

NB: simMass will only contain a valid value if inDomain is true, otherwise your x/y/z location is outside the model boundaries (i.e. either your x/y location is outside the mode domain, or your z is above/below your top/bottom slice, respectively).

Hope that helps.

Chris

You must be signed in to post in this forum.