Issue with gmshfem::function::ScalarFunction<> since commit 70579965?
Hi everyone,
In my DD code for cavities (based on gmshddm
and gmshfem
), I'm creating a source function with loops like this [1]:
for(int n = 0; n < N; n++)
for(int m = 0; m < M; m++)
fSrc = fSrc + fY(...) * fZ(...);
where fSrc
is a complex gmshfem::function::ScalarFunction<>
.
Since commit 70579965, this leads to a seg. fault (see backtrace [2], it seems to come from UnaryNode
and BinaryNode
).
Commit efb3ddbc does not exhibit this issue.
Did I misuse gmshfem::function::ScalarFunction<>
the whole time or is there a little bug somewhere?
If I did misuse the class, what would be the correct way to construct a function as a sum of modal terms (here fY
and fZ
are sines)?
By the way, I'm also getting the following message with some TCs:
Warning : Jacobians, determinants and points should be preallocated if numTasks > 1
The code seg. fault right afterwards, even in commit efb3ddbc (only when OMP_NUM_THREADS > 1
).
I'm still trying to figure out what's wrong here (it used to work some time ago): I'm just sharing this in case it might be helpful regarding the current issue.
Cheers, Nicolas.
[1] https://git.rwth-aachen.de/marsic/closeddm/-/blob/master/src/problem/Source.cpp#L86
[2] backtrace.txt