pyCAPS
pyCAPS: A Python Extension Module for CAPS
analysis6.py

Example use cases for interacting the pyCAPS._capsAnalysis.getAnalysisInfo() function.

1 from __future__ import print_function
2 
3 # Import pyCAPS module (Linux and OSx = pyCAPS.so file; Windows = pyCAPS.pyd file)
4 import pyCAPS
5 
6 # Instantiate our CAPS problem "myProblem"
7 print("Initiating capsProblem")
8 myProblem = pyCAPS.capsProblem()
9 
10 # Load a *.csm file "./csmData/cfdMultiBody.csm" into our newly created problem. The
11 # project name "basicTest" may be optionally set here; if no argument is provided
12 # the CAPS file provided is used as the project name.
13 print("Loading file into our capsProblem")
14 myGeometry = myProblem.loadCAPS("./csmData/cfdMultiBody.csm", "basicTest")
15 
16 # Load Tetgen aim
17 tetgen = myProblem.loadAIM(aim = "tetgenAIM",
18  altName = "tetgen",
19  analysisDir = "TetGenAnalysisTest",
20  capsIntent = "CFD")
21 
22 # Analysis information
23 state = tetgen.getAnalysisInfo()
24 print ("Cleanliness state", state) # Cleanliness status
25 
26 # Get analysis information dictionary
27 infoDict = tetgen.getAnalysisInfo(printinfo = False, infoDict = True)
28 
29 # Print dictionary
30 print(infoDict)
31 
32 # Close our problems
33 print("Closing our problem")
34 myProblem.closeCAPS()
35