13 if(fluidsInitHandle < 0){
14 WriteErr(
"Failed to get fluids initialization handle.\n");
18 int fluidsStepHandle = COM_get_function_handle(std::string(interfaceName+
".StepFluid").c_str());
19 if(fluidsStepHandle < 0){
20 WriteErr(
"Failed to get fluids step handle.\n");
26 WriteOut(
"Calling OpenFOAM Initialization.\n");
30 argv[0] =
const_cast<char *
>(
"test");
32 int verbIn = verblevel;
35 std::vector<int> paneIDs;
36 COM_get_panes(interfaceName.c_str(),paneIDs);
40 double *nodalCoordinates;
43 std::string coordinateName(interfaceName+
".nc");
44 COM_get_array(coordinateName.c_str(),
paneID,&nodalCoordinates,&stride,&cap);
45 int arraySize = (stride*cap);
47 for(
int i = 0;i < arraySize;i++)
51 std::string newDataItem(interfaceName+
".coords");
52 COM_new_dataitem(newDataItem.c_str(),
'n',COM_DOUBLE,3,
"m");
55 COM_window_init_done(interfaceName);
57 if(SolverUtils::PopulateSolverAgentFromWindow(interfaceName,*
this))
60 WriteOut(
"OpenFOAM Initialization done!\n");
std::vector< double > nodeCoordinates
std::vector< int > componentFunctionHandles
std::vector< std::string > componentInterfaceNames
virtual void WriteErr(const std::string &output)
virtual void WriteOut(const std::string &output)