You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a, "operator* not defined": Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_CrsSortingUtils.cpp:289:62: error: no match for ‘operator*’ (operand types are ‘double’ and ‘__gnu_cxx::__alloc_traits<std::allocator<std::complex<float> >, std::complex<float> >::value_type’ {aka ‘std::complex<float>’})
part of:
// Unit Test the functionality in Tpetra_Import_Util
TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL( Import_Util, SortCrsEntries, Scalar, LO, GO)
{
It's a bit surprising because the error seems to imply that std:<complex> does not support simple scalar multiplication. Addition appears to be supported (if I replace 2*x with x+x it seems to work. also, *= is supported, so replacing:
for (size_type i=0; i<new_num_entries; i++) vals2[i] = 2.*vals[i];
with the. block,
for (size_type i=0; i<new_num_entries; i++) {
vals2[i] = vals[i];
vals2[i]*=2.0;
};
also fixes the problem.
Description
What went wrong? What should have happened? Do you have an idea what might
fix things? How has this bug affected you? What are you trying to accomplish?
What specifically must we demonstrate to call this work complete?
Steps to Reproduce
SHA1: [insert here]
Configure script: [attach here]
Configure log: [attach here]
Build log: [attach here]
Input deck: [attach here]
Do this.
Do that.
Shake fist angrily at computer.
Run log: [attach here]
The text was updated successfully, but these errors were encountered:
Actually, this issue was fixed with #6336 in Nov 2019.
I will assume the report was for an older version of Trilinos.
Please reopen this issue if it is still a problem.
Bug Report
@trilinos/Tpetra>
Getting a, "operator* not defined":
Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_CrsSortingUtils.cpp:289:62: error: no match for ‘operator*’ (operand types are ‘double’ and ‘__gnu_cxx::__alloc_traits<std::allocator<std::complex<float> >, std::complex<float> >::value_type’ {aka ‘std::complex<float>’})
part of:
It's a bit surprising because the error seems to imply that
std:<complex>
does not support simple scalar multiplication. Addition appears to be supported (if I replace2*x
withx+x
it seems to work. also,*=
is supported, so replacing:also fixes the problem.
Description
What went wrong? What should have happened? Do you have an idea what might
fix things? How has this bug affected you? What are you trying to accomplish?
What specifically must we demonstrate to call this work complete?
Steps to Reproduce
The text was updated successfully, but these errors were encountered: