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 myArgv[0] =
const_cast<char *
>(
"dummy");
31 myArgv[1] =
const_cast<char *
>(
"-parallel");
32 int verbIn = verblevel;
36 std::vector<int> paneIDs;
37 COM_get_panes(interfaceName.c_str(),paneIDs);
41 double *nodalCoordinates;
44 std::string coordinateName(interfaceName+
".nc");
45 std::string newDataItemName;
46 if (!paneIDs.empty()) {
47 COM_get_array(coordinateName.c_str(),
paneID,&nodalCoordinates,&stride,&cap);
48 int arraySize = (stride*cap);
50 for(
int i = 0;i < arraySize;i++)
52 newDataItemName = interfaceName+
".coords";
53 COM_new_dataitem(newDataItemName.c_str(),
'n',COM_DOUBLE,3,
"m");
58 newDataItemName = interfaceName+
".setsProb";
59 COM_new_dataitem(newDataItemName.c_str(),
'w',COM_INT,1,
"");
60 newDataItemName = interfaceName+
".probProcId";
61 COM_new_dataitem(newDataItemName.c_str(),
'w',COM_INT,1,
"");
62 newDataItemName = interfaceName+
".probNdeId";
63 COM_new_dataitem(newDataItemName.c_str(),
'w',COM_INT,1,
"");
65 COM_window_init_done(interfaceName);
67 if (!paneIDs.empty()) {
68 if(SolverUtils::PopulateSolverAgentFromWindow(interfaceName,*
this))
71 WriteOut(
"OpenFOAM Initialization done!\n");
std::vector< int > componentFunctionHandles
std::vector< double > nodeCoordinates
std::vector< std::string > componentInterfaceNames
virtual void WriteErr(const std::string &output)
virtual void WriteOut(const std::string &output)