111 std::cout <<
"SoverModuleDriver:run: coord_handle = " <<
coord_handle << std::endl;
113 COM_get_size(
"Window1.nc",11,&
CoordSize);
116 COM_get_array(
"Window1.nc",11,&
Coord);
117 std::cout <<
"SoverModuleDriver:run: Coord: " << std::endl;
119 for(
int j=0; j < 3; j++){
120 std::cout <<
Coord[i*3+j] <<
" ";
122 std::cout << std::endl;
124 Mesh().nc.init(CoordSize,
Coord);
134 COM_get_array(
"Window1.:b2:",11,&
Conn);
137 COM_get_size(
"Window1.:b2:",11,&
ConnSize);
139 std::cout <<
"SoverModuleDriver:run: Conn: " << std::endl;
141 for(
int j=0; j < 2; j++){
142 std::cout <<
Conn[i*2+j] <<
" ";
143 elems.push_back(Conn[i*2+j]);
145 std::cout << std::endl;
147 Mesh().con.AddElements(ConnSize,2,
elems);
151 std::cout <<
"SoverModuleDriver:run: WriteMeshToStream: " << std::endl;
152 WriteMeshToStream(std::cout);
153 std::cout << std::endl;
156 COM_get_array(
"Window1.Displacements",11,&
Disp);
159 COM_get_size(
"Window1.Displacements",11,&
DispSize);
161 std::cout <<
"SoverModuleDriver:run: Checking displacements" << std::endl;
163 for(
int j=0; j < 3; j++){
164 std::cout <<
Disp[i*3+j] <<
" ";
167 std::cout << std::endl;
172 std::cout <<
"Line = " << __LINE__ << std::endl;
180 COM_get_array(
"Window1.Loads",11,&
Loads);
182 std::cout <<
"SoverModuleDriver:run: Loads not NULL" << std::endl;
184 COM_get_size(
"Window1.Loads",11,&
LoadsSize);
187 std::cout <<
"SoverModuleDriver:run: Checking loads" << std::endl;
189 for(
int j=0; j < 3; j++){
190 Loads[i*3 + j] = double(i*3 + j);
191 std::cout <<
Loads[i*3+j] <<
" ";
194 std::cout << std::endl;
198 std::cout <<
"SoverModuleDriver:run: Line = " << __LINE__ << std::endl;
203 Solution().Meta().AddField(
"displacement",
'n',3,8,
"m");
204 std::cout <<
"SoverModuleDriver:run: WriteSolnMetaToStream:" << std::endl;
205 WriteSolnMetaToStream(std::cout);
206 std::cout << std::endl;
209 Solution().Meta().AddField(
"loads",
'n',3,8,
"");
210 std::cout <<
"SoverModuleDriver:run: WriteSolnMetaToStream:" << std::endl;
211 WriteSolnMetaToStream(std::cout);
212 std::cout << std::endl;
214 std::cout <<
"SoverModuleDriver:run: Line = " << __LINE__ << std::endl;
218 std::cout <<
"SoverModuleDriver:run: Line = " << __LINE__ << std::endl;
220 Solution().SetFieldBuffer(
"displacement",
DispPass);
222 Solution().SetFieldBuffer(
"loads",
LoadsPass);
224 std::cout <<
"SoverModuleDriver:run: Line = " << __LINE__ << std::endl;
229 std::string filename;
230 filename =
"fsi0.vtk";
231 Ouf.open(filename.c_str());
233 std::cerr <<
"SoverModuleDriver:run: SolverModuleDriver::DumpSolution:Error: Could not open output file, "
234 << filename <<
"." << std::endl;
237 std::cout <<
"SoverModuleDriver:run: WriteVTKToStream time 0" << std::endl;
238 SolverUtils::WriteVTKToStream(
"Window1",*
this,Ouf);
244 int run_handle = COM_get_function_handle(
"Window1.Run");
245 bool run_func = (run_handle > 0);
249 for(
int i=0; i <
tNext.size(); i++){
252 std::cout <<
"SoverModuleDriver:run: Changing load values" << std::endl;
254 for(
int j=0; j < 3; j++){
256 std::cout <<
Loads[k*3 + j] <<
" ";
259 std::cout << std::endl;
263 std::cout <<
"SoverModuleDriver:run: Calling run function from driver" << std::endl;
264 COM_call_function(run_handle,&
runs,&
tNext[i]);
268 std::cout <<
"SoverModuleDriver:run: Checking displacements" << std::endl;
270 for(
int j=0; j < 3; j++){
271 std::cout <<
Disp[k*3+j] <<
" ";
274 std::cout << std::endl;
284 std::string filename;
285 filename =
"fsi" +
ss.str() +
".vtk";
286 Ouf.open(filename.c_str());
288 std::cerr <<
"SolverModuleDriver::DumpSolution:Error: Could not open output file, "
289 << filename <<
"." << std::endl;
292 SolverUtils::WriteVTKToStream(
"Window1",*
this,Ouf);
std::vector< double > DispPass
std::vector< unsigned int > elems
std::vector< double > tNext
std::vector< double > LoadsPass