Opened 12 years ago

Last modified 11 years ago

#1941 closed defect

outerProduct not implemented — at Version 1

Reported by: Christian Schubert Owned by: Martin Sjölund
Priority: normal Milestone: 1.9.1
Component: Backend Version: trunk
Keywords: outerProduct Cc: Christian Schubert

Description (last modified by Martin Sjölund)

I wrote a simple model using the outerProduct function

model outerProductTest
 Real n[3] = {1,2,3};
 Real a[3,3];
equation
 a = outerProduct(n,n);
end outerProductTest;

Unfortunately, it does not flatten giving the following errormessages:

[ModelicaBuiltin.mo:780:3-790:22:writable] Error: The lhs (result) of the external function declaration has array type (Integer[size(v1, 1), size(v2, 1)]), but this is not allowed in the specification. You need to pass it as an input to the function (preferably also with a size()-expression to avoid out-of-bounds errors in the external call).
[ModelicaBuiltin.mo:339:1-343:11:writable] Error: Internal error OpenModelica.Internal.outerProductInt not found in scope: <global scope>
[ModelicaBuiltin.mo:780:3-790:22:writable] Error: The lhs (result) of the external function declaration has array type (Integer[size(v1, 1), size(v2, 1)]), but this is not allowed in the specification. You need to pass it as an input to the function (preferably also with a size()-expression to avoid out-of-bounds errors in the external call).
[ModelicaBuiltin.mo:339:1-343:11:writable] Error: Internal error OpenModelica.Internal.outerProductInt not found in scope: <global scope>
[ModelicaBuiltin.mo:780:3-790:22:writable] Error: The lhs (result) of the external function declaration has array type (Integer[size(v1, 1), size(v2, 1)]), but this is not allowed in the specification. You need to pass it as an input to the function (preferably also with a size()-expression to avoid out-of-bounds errors in the external call).
[ModelicaBuiltin.mo:339:1-343:11:writable] Error: Internal error OpenModelica.Internal.outerProductInt not found in scope: <global scope>
[outerProductTest.mo:5:2-5:23:writable] Error: Class outerProduct not found in scope outerProductTest (looking for a function or record).
Error: Error occurred while flattening model outerProductTest

Change History (2)

by Christian Schubert, 12 years ago

Attachment: outerProductTest.mo added

comment:1 by Martin Sjölund, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.