|
[Sponsors] |
Entrywise matrix multiplication (Hadamard or Schur multiplication) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 25, 2014, 06:10 |
Entrywise matrix multiplication (Hadamard or Schur multiplication)
|
#1 |
New Member
Thilo Franke
Join Date: Mar 2014
Location: Bunswick
Posts: 4
Rep Power: 12 |
Hi,
i have a really simple question, but i didn't find the answer in the forum search or the programmer manual. I'd like to multiply two volScalarFields entrywise. This is also called Hadamard or Schur product. Example: A ○ B = C with c11 = a11 * b11 (similar to the matrix addition) How is this done in OpenFoam? Thanks in advance Thilo |
|
April 26, 2014, 14:50 |
|
#2 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18 |
Hi,
You might want to try volScalarField C = A * B; //C[celli]=A[celli]*B[celli] where A[celli]: value of A at celli-th cell center Hope this helps, Fumiya
__________________
[Personal]
|
|
April 28, 2014, 05:16 |
|
#3 |
New Member
Thilo Franke
Join Date: Mar 2014
Location: Bunswick
Posts: 4
Rep Power: 12 |
Hi Fumiya,
thanks for your answer. I thought, * would be the Outer Product in OpenFoam when handeling tensors. So it is defined in another way with matrixVolFields? I have found over the weekend the function cmptMultiply. Is the result the same? Is there a recommendation for which function to use? Greetings Thilo |
|
July 18, 2019, 07:15 |
|
#4 |
Member
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 9 |
Hi,
Did you find the implementation of Hadamard product? Regards, mrishi |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 22:03 |
OpenFOAM version 1.6 details | lakeat | OpenFOAM Running, Solving & CFD | 42 | August 26, 2009 21:47 |