|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 19 ![]() |
I noticed that expression a) works while b) and c) does not. I use V 1.3
volTensorField T = ...; a) Foam::inv(T); b) Foam::cof(T); error: 'cof' was not declared in this scope. c) Foam::cofactors(T); error: no matching function for call to 'cofactors(Foam::volTensorField&)' Thanks. |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
Currently (version 1.5) the "cofactors" function is defined for:
SymmTensorI.H://- Return the cofactor tensor of a symmetric tensor SymmTensorI.H:inline SymmTensor<cmpt> cofactors(const SymmTensor<cmpt>& st) TensorI.H://- Return the cofactor tensor of a tensor TensorI.H:inline Tensor<cmpt> cofactors(const Tensor<cmpt>& t) if you think it would be useful to have this function available at the field level I will propagate it through. H |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 19 ![]() |
I managed to get cofactors with an indirect way by:
volTensorField M ...; Mcof=(inv(M)*det(M)).T(); but it is not efficient. I would be grateful if you could propagate such cof function to the field level (similar to inv) in both definitions. If you could post the modification relative to V1.5 I will try to manage from there. Many thanks for your help. Best regards, Maka. |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
Will do....
H |
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
...done.
I have also renamed "cofactors" "cof" for consistency with the rest of the 3-char tensor function names. The updates are now in our 1.5.x git repository. H |
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 19 ![]() |
Thanks Henry.
|
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tensor mathematics forAll macro combination tensors with vectors | olesen | OpenFOAM Running, Solving & CFD | 4 | February 25, 2009 06:03 |
| tensors cofactors | maka | OpenFOAM Running, Solving & CFD | 3 | November 30, 2008 08:32 |
| No matching function multiplying tensors for BC | Erik | OpenFOAM | 3 | March 20, 2008 14:05 |
| Surface interpolation scheme with tensors as weighting factors | jutta | OpenFOAM Running, Solving & CFD | 1 | August 27, 2007 12:00 |
| Surface interpolation of tensors | andebjor | OpenFOAM Pre-Processing | 2 | August 23, 2007 04:08 |