numpy array to data object
Hi ,
I want to specify an initial temperature field. I will generate a numpy array with a shape matching the Solution Space.
I am stuck getting each of theses data points from the numpy array to the corresponding positions in the Solution Space.
heres a snippet of code.
# create simple domain
domWidth = 1.*U.m
domHeight = 1*U.m
numDivsX = 9
mydat1 = Data(value=
numDivsY = 9
dom = Rectangle(numDivsX, numDivsY, l0=domWidth, l1=domHeight)
# The number of data points in this Domain will correspond to
nx= numDivsX+1
ny=numDivsY+1
# create a Data object from a numpy array
mydat1 = Data(value=
I get an error that python argument types dont match the C++ signature.
Im trying to get the array elements to the corresponding positions in the domain.
Cheers
Tom
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Tom
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Tom