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

Example use case for the pyCAPS.capsProblem.loadCAPS() function in which are multiple problems with geometry are created.

1 # Use: Create a multiple problems with geometry
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 capsProblems")
8 myProblem = pyCAPS.capsProblem()
9 
10 # Create another problem
11 myProblemNew = pyCAPS.capsProblem()
12 
13 # Load a *.csm file "./csmData/cfdMultiBody.csm" into our newly created problem. The
14 # project name "basicTest" may be optionally set here; if no argument is provided
15 # the CAPS file provided is used as the project name.
16 print("Loading file into our capsProblems")
17 
18 
19 myProblem.loadCAPS("./csmData/cfdMultiBody.csm", "basicTest")
20 
21 
22 myProblemNew.loadCAPS("./csmData/cfdMultiBody.csm", "basicTest")
23 
24 # Close our problems
25 print("Closing our problems")
26 myProblem.closeCAPS()
27 myProblemNew.closeCAPS()
28