I have a 1D diffusion problem with a source term that is exponential in two of the variables. It's modeling a chemical reaction with an Arrhenius-type rate relation - see attached image.
When I try to simulate this - see attached working example - I get the following error:
Traceback (most recent call last):
File "/Users/jasonbrown/Documents/02Work/GDOT Mass Concrete/CodesDedalus/GF_minimum_example.py", line 153, in <module>
solver.step(dt)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/solvers.py", line 507, in step
self.timestepper.step(self, dt)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/timesteppers.py", line 570, in step
evaluator.evaluate_scheduled(**evaluator_kw)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/evaluator.py", line 107, in evaluate_scheduled
self.evaluate_handlers(scheduled_handlers, wall_time=wall_time, sim_time=sim_time, iteration=iteration, **kw)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/evaluator.py", line 142, in evaluate_handlers
tasks = self.attempt_tasks(tasks, id=id)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/evaluator.py", line 187, in attempt_tasks
output = task['operator'].attempt(**kw)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/future.py", line 175, in attempt
return self.evaluate(id=id, force=False)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/future.py", line 132, in evaluate
a_eval = a.evaluate(id=id, force=force)
File "/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/future.py", line 161, in evaluate
self.operate(out)
File
"/Users/jasonbrown/opt/anaconda3/envs/dedalus/lib/python3.8/site-packages/dedalus/core/operators.py", line 227, in operate
np.copyto(out.data, self.func(*self.args, **self.kw))
File "<__array_function__ internals>", line 5, in copyto
TypeError: Cannot cast array data from dtype('O') to dtype('float64') according to the rule 'same_kind'
I've seen a similar error in other messages here but I haven't been able to decipher enough to fix the problem. (Side note: I'm using a GeneralFunction to implement taking the exponential)