FUNCTION build_direction_node
(* SCHEMA structural_response_representation_schema; *)
FUNCTION build_direction_node
(node_1 : node_representation;
node_2 : node_representation): LIST [2:3] OF REAL;
LOCAL
nodal_direction_ratios : LIST [2:3] OF REAL;
u : direction;
i : INTEGER;
ndim : INTEGER;
rep_items : SET [1:?] of representation_item;
node_1_point : cartesian_point;
node_2_point : cartesian_point;
END_LOCAL;
rep_items := node_1.items;
REPEAT i := 1 TO SIZEOF(rep_items);
IF ('GEOMETRY_SCHEMA.CARTESIAN_POINT' IN TYPEOF(rep_items[i])) THEN
node_1_point := rep_items[i];
ESCAPE;
END_IF;
END_REPEAT;
rep_items := node_2.items;
REPEAT i := 1 TO SIZEOF(rep_items);
IF ('GEOMETRY_SCHEMA.CARTESIAN_POINT' IN TYPEOF(rep_items[i])) THEN
node_2_point := rep_items[i];
ESCAPE;
END_IF;
END_REPEAT;
ndim := HIINDEX(node_2_point.coordinates);
REPEAT i := 1 TO ndim;
u.direction_ratios[i] := node_2_point.coordinates[i] -
node_1_point.coordinates[i];
END_REPEAT;
u := normalise (u);
REPEAT i := 1 TO ndim;
nodal_direction_ratios[i] := u.direction_ratios[i];
END_REPEAT;
RETURN (nodal_direction_ratios);
END_FUNCTION;
Referenced By
Defintion build_direction_node is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:13:59-04:00