Schema: analysis_schema

Source : ISO 10303-53



SCHEMA analysis_schema;

REFERENCE FROM mesh_topology_schema;    -- ISO 10303-52

REFERENCE FROM product_property_definition_schema;    -- ISO 10303-41

REFERENCE FROM support_resource_schema;    -- ISO 10303-41


ENTITY behavioural_decomposition_of_numerical_model;
  parts : SET[2:?] OF numerical_model;
  whole : numerical_model;
END_ENTITY;

ENTITY model_action_domain
  SUBTYPE OF (numerical_model);
  final : model_state_domain;
  initial : model_state_domain;
END_ENTITY;

ENTITY model_product_domain
  SUBTYPE OF (numerical_model);
  temporal_parts : SET[0:?] OF model_action_domain;
END_ENTITY;

ENTITY model_product_domain_with_mesh
  SUBTYPE OF (model_product_domain);
  model_mesh : mesh;
END_ENTITY;

ENTITY model_property_distribution;
  creating_software : text;
  domain : numerical_model;
  range : general_property;
END_ENTITY;

ENTITY model_state_domain
  SUBTYPE OF (numerical_model);
END_ENTITY;

ENTITY numerical_model;
  analysis_type : text;
  creating_software : text;
  description : text;
  id : identifier;
  intended_analysis_code : SET[0:?] OF text;
END_ENTITY;

ENTITY simulation_run;
  description : text;
  id : identifier;
  name : label;
  results : SET[0:?] OF model_property_distribution;
  simulated : numerical_model;
END_ENTITY;

ENTITY spatial_decomposition_of_numerical_model;
  parts : LIST[2:?] OF numerical_model;
  whole : numerical_model;
END_ENTITY;

ENTITY temporal_decomposition_of_model_action;
  parts : LIST[2:?] OF model_action_domain;
  whole : model_action_domain;
END_ENTITY;

SUBTYPE_CONSTRAINT sc1_numerical_model FOR numerical_model;
  ABSTRACT SUPERTYPE;
END_SUBTYPE_CONSTRAINT;

FUNCTION temporal_spatial_domain_for_model
 (domain : numerical_model) : BOOLEAN;
        LOCAL
          spatial_set : SET OF spatial_decomposition_of_numerical_model;
          behavioural_set : SET OF behavioural_decomposition_of_numerical_model;
          domains : SET OF numerical_model := [];
          viewing : BAG OF view_relationship;
          spatial_bag : BAG OF spatial_decomposition_of_numerical_model;
          behavioural_bag : BAG OF behavioural_decomposition_of_numerical_model;
        END_LOCAL;

        viewing := USEDIN(domain, 'ANALYSIS_PRODUCT_RELATIONSHIPS_SCHEMA.VIEW_RELATIONSHIP.VIEW');
        IF SIZEOF(viewing) > 0 THEN
          RETURN (TRUE);
        END_IF;
        spatial_bag := USEDIN(domain, 'ANALYSIS_SCHEMA.SPATIAL_DECOMPOSITION_OF_NUMERICAL_VIEW.PARTS');
        IF SIZEOF(spatial_bag) > 0 THEN
          spatial_set := spatial_bag;
          REPEAT i := 1 TO HIINDEX(spatial_set);
            domains := domains + spatial_set[i].whole;
          END_REPEAT;
        END_IF;
        behavioural_bag := USEDIN(domain, 'ANALYSIS_SCHEMA.BEHAVIOURAL_DECOMPOSITION_OF_NUMERICAL_VIEW.PARTS');
        IF SIZEOF(behavioural_bag) > 0 THEN
          behavioural_set := bag_to_set(behavioural_bag);
          REPEAT i := 1 TO HIINDEX(behavioural_set);
            domains := domains + behavioural_set[i].whole;
          END_REPEAT;
        END_IF;
        IF SIZEOF(domains) > 0 THEN
          REPEAT i := 1 TO HIINDEX(domains);
            IF temporal_spatial_domain_for_model(domains[i]) THEN
              RETURN (TRUE);
            END_IF;
          END_REPEAT;
        END_IF;
        RETURN (FALSE);
      
END_FUNCTION;

END_SCHEMA;  -- analysis_schema