Opened 11 years ago
Closed 11 years ago
#2705 closed defect (fixed)
gravityAcceleration function has no inline annotation
Reported by: | Owned by: | Per Östlund | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
Having the gravityAcceleration function in MSL defined as:
function gravityAcceleration = gravityAccelerationTypes(gravityType = gravityType, g = g * Modelica.Math.Vectors.normalize(n), mue = mue);
with gravityAccelerationTypes defined as:
function gravityAccelerationTypes "Gravity field acceleration depending on field type and position" import Modelica.Mechanics.MultiBody.Types.GravityTypes; extends Modelica.Icons.Function; input SI.Position r[3] "Position vector from world frame to actual point, resolved in world frame"; input GravityTypes gravityType "Type of gravity field"; input SI.Acceleration g[3] "Constant gravity acceleration, resolved in world frame, if gravityType=1"; input Real mue(unit = "m3/s2") "Field constant of point gravity field, if gravityType=2"; output SI.Acceleration gravity[3] "Gravity acceleration at point r, resolved in world frame"; algorithm gravity := if gravityType == GravityTypes.UniformGravity then g else if gravityType == GravityTypes.PointGravity then -mue / (r * r) * r / Modelica.Math.Vectors.length(r) else zeros(3); annotation(Inline = true); end gravityAccelerationTypes;
the instantiated model will have gravityAcceleration functions without the inline annotation.
This can be fixed by merging the annotations of extendedClass and the derived class in Static.addComponentFunctionsToCurrentEnvironment.
Change History (3)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
I wrote that the instantiated functions have no inline annotations, what I meant was that they have inlineType = NO_INLINE().