ElmerFoamFSI  2.0
ElmerFoamFSI is fluid-solid interaction simulation application built up from OpenFOAM CFD and Elmer CSM coupled through the IMPACT multiphysics software integration infrastructure.
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
virtual void Test__fsiCouplerAgentsInitialize ( )
inlinevirtual

Initalize function for the fsiCoupler and agents.

Definition at line 611 of file ElmerFoamFSITest.H.

References TestingObject< ResultsType >::__helper(), TestingObject< ResultsType >::componentInterfaceNames, TestingObject< ResultsType >::fsiCoupler, fsicoupling::SetRunMode(), fsicoupling::SetVerbLevel(), TestingObject< ResultsType >::TestfluidsAgent, TestingObject< ResultsType >::TeststructuresAgent, and TestingObject< ResultsType >::verblevel.

Referenced by TestingObject< ResultsType >::Test__ElmerStructures(), TestingObject< ResultsType >::Test__FsiCoupler(), and TestingObject< ResultsType >::Test__OpenFoamFluids().

611  {
612  int work =__helper();
613  int IntDir;
614  verblevel = 3;
617 
618  std::string fluidDir;
619  std::string simStaticDir;
620  fluidDir = IRAD::Sys::CWD() + "/SimpleStatic/fluid";
621  simStaticDir = IRAD::Sys::CWD() + "/SimpleStatic";
622  if(work == 1)
623  std::cout << "GetInputData failed 2!" << std::endl;
624  else if (work == 2)
625  std::cout << "Could not find directory for running tests" << std::endl;
626 
627  if(!(IRAD::Sys::FILEEXISTS(fluidDir)||(IRAD::Sys::FILEEXISTS(simStaticDir)))){
628  std::cout << "SimpleStatic / fluid Folders do not exists!" << std::endl;
629  return;
630  }
631  else{
632  IntDir = IRAD::Sys::ChDir(simStaticDir);
633  if(IntDir == -1){
634  std::cout << "GetInputData Error: Could not change directory to "
635  << fluidDir << ". Exiting (fail). " << std::endl;
636  }
637  std::system("chmod 755 Allclean Allrun AllrunPar makeLinks makeSerialLinks removeSerialLinks");
638  std::system("./Allclean");
639  std::system("./Allrun");
640  IntDir = IRAD::Sys::ChDir(fluidDir);
641  if(IntDir == -1){
642  std::cout << "GetInputData Error: Could not change directory to "
643  << fluidDir << ". Exiting (fail). " << std::endl;
644  }
645  }
646 
647  std::string fluidSolverName("OpenFoamFSI");
648  std::string solidSolverName("ElmerCSC");
649  std::string transferServiceName("SurfX");
650  std::string runMode("1");
651 
652  std::cout << "COM loading all modules" << std::endl;
653  COM_load_module(fluidSolverName.c_str(),"FluidsComponentInterface");
654  COM_load_module(solidSolverName.c_str(),"StructuresComponentInterface");
655  COM_load_module("SurfUtil","SurfUtil");
656  COM_load_module("Simpal","Simpal");
657 
658  componentInterfaceNames.push_back("FluidsComponentInterface");
659  componentInterfaceNames.push_back("StructuresComponentInterface");
660  componentInterfaceNames.push_back("TransferInterface");
661  componentInterfaceNames.push_back("SurfUtil");
662  componentInterfaceNames.push_back("Simpal");
663 
664  fsiCoupler.SetRunMode(runMode);
666  std::cout << "fsiCouplerAgentsInitialize Successful!" << std::endl;
667  }
int verblevel
track verbosity level for tests
fsicoupling fsiCoupler
Instantiation of class for use with the fsiCoupler &amp; Agent tests.
void SetRunMode(const std::string &inMode)
Definition: FsiCoupling.H:376
std::vector< std::string > componentInterfaceNames
solidagent * TeststructuresAgent
For use with the ElmerStructure and OpenFoamFluids tests.
openfoamagent fluidagent
Definition: FsiCoupling.H:20
void SetVerbLevel(int verb)
Definition: FsiCoupling.H:56
elmeragent solidagent
Definition: FsiCoupling.H:21

Here is the call graph for this function:

Here is the caller graph for this function: