Problem in the calculation of function
I have a problem where I have to calculate the value of a scalar function func, in the form
where A is a scalar constant, tensor is a volume tensorial field, and func is scalar field.
In the createFields.h file I included the following line
1.0 + A*trac_tensor
I have considered that the trace of tensor generates a scalar field. Although it compiles fine and the code runs, when I check the values given by func_lin, I noted that it is always returning one. The value of A is defined and the components of the tensor change, but, func_lin never changes.
Am i doing something wrong? How I should do the calculation of func?
the code looks fine
one question though- are you updating the values during the simulation?
the createFields.h is called once at the beginning of the simulation before the main loop. It initiates the values, sets them for automatic reading/writing but does not set any automatic refreshment of the values.
maybe if you put something like:
otherwise it will be always only the ones which were initiated :)
|All times are GMT -4. The time now is 07:18.|