Test for solidAgent->Run() function.
1407 double time_final = 0.05;
1408 double timestep = 2.0e-3;
1415 std::string fluidDir;
1416 std::string simStaticDir;
1417 fluidDir = IRAD::Sys::CWD() +
"/SimpleStatic/fluid";
1418 simStaticDir = IRAD::Sys::CWD() +
"/SimpleStatic";
1419 if(!(IRAD::Sys::FILEEXISTS(fluidDir)||(IRAD::Sys::FILEEXISTS(simStaticDir)))){
1420 std::cout <<
"SimpleStatic / fluid Folders do not exists!" << std::endl;
1422 result.UpdateResult(
"fsiCoupler:Works",works);
1426 IntDir = IRAD::Sys::ChDir(simStaticDir);
1428 std::cout <<
"GetInputData Error: Could not change directory to "
1429 << fluidDir <<
". Exiting (fail). " << std::endl;
1431 result.UpdateResult(
"fsiCoupler:Works",works);
1433 std::system(
"chmod 755 Allclean Allrun AllrunPar makeLinks makeSerialLinks removeSerialLinks");
1434 std::system(
"./Allclean");
1435 std::system(
"./Allrun");
1436 IntDir = IRAD::Sys::ChDir(fluidDir);
1438 std::cout <<
"GetInputData Error: Could not change directory to "
1439 << fluidDir <<
". Exiting (fail). " << std::endl;
1441 result.UpdateResult(
"fsiCoupler:Works",works);
1446 std::string fluidSolverName(
"OpenFoamFSI");
1447 std::string solidSolverName(
"ElmerCSC");
1448 std::string transferServiceName(
"SurfX");
1449 std::string runMode(
"1");
1451 COM_load_module(fluidSolverName.c_str(),
"FluidsComponentInterface");
1452 COM_load_module(solidSolverName.c_str(),
"StructuresComponentInterface");
1453 COM_load_module(
"SurfUtil",
"SurfUtil");
1454 COM_load_module(
"Simpal",
"Simpal");
1457 componentInterfaceNames.push_back(
"FluidsComponentInterface");
1458 componentInterfaceNames.push_back(
"StructuresComponentInterface");
1459 componentInterfaceNames.push_back(
"TransferInterface");
1460 componentInterfaceNames.push_back(
"SurfUtil");
1461 componentInterfaceNames.push_back(
"Simpal");
1469 int maxSubSteps = 1000;
1470 int dumpinterval = 1;
1480 std::cout <<
"simultime is =" << simultime << std::endl;
1492 std::cout <<
"stride and cap = " << stride <<
"," << cap << std::endl;
1494 int isize = cap * stride ;
1495 for(
int i = 0; i < isize/3 ; i++){
1499 tractions[3*i+1] = 50000;
1500 std::cout <<
"tractions[" << i <<
"] = " << tractions[3*i] <<
", " << tractions[3*i+1] <<
", " << tractions[3*i+2] << std::endl;
1513 double *solidDisp = NULL;
1521 result.UpdateResult(
"SolidAgentRun:Works",works);
std::string getSolidIntName()
solidagent * getStructureAgent()
double getSimulationTime()
virtual int Run(double endTime)
bool DisplacementCheck(double *disp, int size)
int TransferDisplacementsToFluid(solidagent *solidAgent, fluidagent *fluidAgent)
int verblevel
track verbosity level for tests
fsicoupling fsiCoupler
Instantiation of class for use with the fsiCoupler & Agent tests.
void SetRunMode(const std::string &inMode)
fluidagent * getFluidAgent()
virtual int InitializeTimeStep(double time)
std::vector< std::string > componentInterfaceNames
int TransferLoadsToStructures(fluidagent *fluidAgent, solidagent *solidAgent)
virtual int Run(double time)
void SetVerbLevel(int verb)
double getSimulationFinalTime()
std::string getFluidIntName()
virtual int Initialize(std::vector< std::string > &componentInterfaceNames, double finalTime, double timeStep)