CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

inner product of a scalarSquareMatrix and scalarDiagonalMatrix.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2014, 04:37
Default inner product of a scalarSquareMatrix and scalarDiagonalMatrix.
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
Hi guys,

I dont know how should I call this inner product in OpenFOAM syntax. you know that if I wanna operates inner product on a tensor(T) and a vector(v). I can use:
Code:
T & v
but this time I wanna operates inner product on a n×n matrix with a n×1 matrix.

First I define this n×n matrix as a scalarSquareMatrix and define this n×1 matrix as scalarDiagonalMatrix.

But I dont know which sign can be used as inner product on this two matrices?



BTW, I use for loop to calculate but failed:
Code:
for (int c = 0; c < nWeights_*2; c++)
    {
	for ( int r = 0; r < nWeights_*2; r++)  
	{
	      mT[c] = invA[c][r] * moments_[r];
	}
    }
Only mT[3] is rite. The others of it is null.
sharonyue is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 16:08.