GetAreaBC
Returns a true or false value that indicates whether the retrieve operation is successful. When the operation is successful, the function returns the area of the whole element selection to which the thermal streams, thermal voids, or thermal convecting zones boundary condition is applied.
Calling convention:
bool GetAreaBC (double* val)
Note:
To access this method, you must use the GetTMGFunction method and include the AdditionalFunctions.h file located in the [installation_path]\tmg\include\maya\expeval_utils folder in the beginning of your source file.
Argument | Data type | Description |
---|---|---|
val | double* | The surface area of the element selection to which the current boundary condition is applied. |
Example:
#ifdef _WIN32
extern "C" __declspec(dllexport) void TMGUserInitialize(void* pGetTMGFunc)
#else
extern "C" void TMGUserInitialize(void* pGetTMGFunc)
#endif
{
// Generic function to get access to solver function
pGetTMGFunction = (GetTMGFunctionPointer)pGetTMGFunc;
pGetAreaBC = (GetAreaBCPointer)pGetTMGFunction(getAreaBCString);
if (pGetAreaBC != nullptr)
{
double val;
if ((*pGetAreaBC)(&val))
std::cout << "Area of the element selection is defined and equals " << val << std::endl
else
std::cout << "Area of the element selection is not defined" << std::endl;
}
}