View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003851 | OpenFOAM | Bug | public | 2022-06-24 08:51 | 2022-06-24 11:38 |
Reporter | deo | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Other | OS Version | (please specify) |
Fixed in Version | dev | ||||
Summary | 0003851: Implementation of operator=(diagTensor) missing in Tensor class? | ||||
Description | tensor test; test = diagTensor(1,2,3); fails to compile: /software/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude/Tensor.H:208:21: warning: inline function ‘void Foam::Tensor<Cmpt>::operator=(const Foam::DiagTensor<Cmpt>&) [with Cmpt = double]’ used but never defined inline void operator=(const DiagTensor<Cmpt>&); ^~~~~~~~ and: undefined reference to `Foam::Tensor<double>::operator=(Foam::DiagTensor<double> const&)' collect2: error: ld returned 1 exit status make: *** [/software/OpenFOAM/OpenFOAM-9/wmake/makefiles/general:154: build/Test-hexaScalar] Error 1 Implementation is indeed missing from TensorI.H. | ||||
Tags | No tags attached. | ||||
|
I don't think that you can use the constructor of diagTensor like that. Try with New/new. |
|
Why not? And why would it work with symmTensor then? tensor test; diagTensor test2(1,2,3); symmTensor test3(1,2,3,4,5,6); test = test2; // Fails to compile test = test3; // Compiles test = diagTensor(1,2,3); // Fails to compile test = symmTensor(1,2,3,4,5,6); // Compiles Again, I think the implementation of operator=(diagTensor) is missing from the Tensor class. |
|
Then please ignore my comment, my C++ is a bit rusty. |
|
Resolved by commit 2628dfe679ffee0f2613073b0dfba428875f3b59 |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-06-24 08:51 | deo | New Issue | |
2022-06-24 10:24 | cgoessni | Note Added: 0012647 | |
2022-06-24 10:40 | deo | Note Added: 0012648 | |
2022-06-24 11:03 | cgoessni | Note Added: 0012649 | |
2022-06-24 11:38 | henry | Assigned To | => henry |
2022-06-24 11:38 | henry | Status | new => resolved |
2022-06-24 11:38 | henry | Resolution | open => fixed |
2022-06-24 11:38 | henry | Fixed in Version | => dev |
2022-06-24 11:38 | henry | Note Added: 0012651 |