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__OpenFoamFluids ( ResultsType &  result)
inlinevirtual

Run an initialization check to make sure the OpenFoamFluids are running as they should.

Definition at line 770 of file ElmerFoamFSITest.H.

References TestingObject< ResultsType >::componentInterfaceNames, openfoamagent::Initialize(), openfoamagent::returnNodeCoords(), TestingObject< ResultsType >::Test__fsiCouplerAgentsInitialize(), TestingObject< ResultsType >::TestfluidsAgent, and TestingObject< ResultsType >::verblevel.

Referenced by TestingObject< ResultsType >::Process(), and TestingObject< ResultsType >::RunTest().

770  {
771  bool works = true;
772 
773  std::cout << "Initializing Fluids..." << std::endl;
776  std::cout << "Initialization Completed!" << std::endl;
777 
778  //Make sure the initializing doesn't return an error
779  if (initresult != 0){
780  std::cout << "fluidsAgent->Initialize returns error. " <<
781  "Refer to OpenFoamAgent.H for more information. " << std::endl;
782  works = false;
783  }
784 
785  //Test to make sure the node coordinates are populated
786  //More of an exercise to make sure the data is loaded correctly
787  //face coordinates are not in use currently
788  std::vector<double> nodecoordinates(TestfluidsAgent->returnNodeCoords());
789  std::cout << "Fluid Node size is: " << nodecoordinates.size() << std::endl;
790  if (nodecoordinates.size() < 0){
791  std::cout << "There is a problem with obtaining the nodecoordinate data" <<
792  "Refer to OpenFoamAgent.H for more information. " << std::endl;
793  works = false;
794  }
795 
796  double arr[306] = {0.1, 0.1, 0, 0.1, 0.1, 0.02, 0, 0.1, 0.02, 0, 0.1, 0, 0.1, 0.1, 0.04, 0, 0.1, 0.04, 0.1, 0.1, 0.06, 0, 0.1, 0.06, 0.1, 0.1, 0.08, 0, 0.1, 0.08, 0.1, 0.1, 0.1, 0, 0.1, 0.1, 0.1, 0.1, 0.12, 0, 0.1, 0.12, 0.1, 0.1, 0.14, 0, 0.1, 0.14, 0.1, 0.1, 0.16, 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, 0.1, 0.9, 0, 0.1, 0.9, 0.1, 0.1, 0.92, 0, 0.1, 0.92, 0.1, 0.1, 0.94, 0, 0.1, 0.94, 0.1, 0.1, 0.96, 0, 0.1, 0.96, 0.1, 0.1, 0.98, 0, 0.1, 0.98, 0.1, 0.1, 1, 0, 0.1, 1};
797 
798  for (int i = 0; i < 306; i++){
799  if (arr[i] != nodecoordinates.at(i)){
800  std::cout << "Node Coordinate Inconsistencies." << std::endl;
801  works = false;
802  break;
803  }
804  }
805  result.UpdateResult("OpenFoamFluids:Works",works);
806  delete TestfluidsAgent;
807  }
virtual std::vector< double > returnNodeCoords()
Definition: OpenFoamAgent.H:70
int verblevel
track verbosity level for tests
virtual void Test__fsiCouplerAgentsInitialize()
Initalize function for the fsiCoupler and agents.
std::vector< std::string > componentInterfaceNames
virtual int Initialize(const std::string interfaceName, int verblevel=1)
Definition: OpenFoamAgent.H:9

Here is the call graph for this function:

Here is the caller graph for this function: