0027104: DownCast() cannot return null for mismatched handle
[occt.git] / src / IGESAppli / IGESAppli_ElementResults.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-11
2// Created by: CKY / Contract Toubro-Larsen ( Anand NATRAJAN )
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESAppli_ElementResults_HeaderFile
18#define _IGESAppli_ElementResults_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <Standard_Real.hxx>
25#include <TColStd_HArray1OfInteger.hxx>
26#include <IGESAppli_HArray1OfFiniteElement.hxx>
27#include <IGESData_IGESEntity.hxx>
28#include <TColStd_HArray1OfReal.hxx>
29class IGESDimen_GeneralNote;
30class IGESBasic_HArray1OfHArray1OfInteger;
31class IGESBasic_HArray1OfHArray1OfReal;
32class Standard_DimensionMismatch;
33class Standard_OutOfRange;
34class IGESAppli_FiniteElement;
35
36
37class IGESAppli_ElementResults;
38DEFINE_STANDARD_HANDLE(IGESAppli_ElementResults, IGESData_IGESEntity)
39
40//! defines ElementResults, Type <148>
41//! in package IGESAppli
42//! Used to find the results of FEM analysis
43class IGESAppli_ElementResults : public IGESData_IGESEntity
44{
45
46public:
47
48
49 Standard_EXPORT IGESAppli_ElementResults();
50
51 //! This method is used to set the fields of the class
52 //! ElementResults
53 //! - aNote : GeneralNote Entity describing analysis
54 //! - aSubCase : Analysis Subcase number
55 //! - aTime : Analysis time value
56 //! - nbResults : Number of result values per FEM
57 //! - aResRepFlag : Results Reporting Flag
58 //! - allElementIdents : FEM element number for elements
59 //! - allFiniteElems : FEM element
60 //! - allTopTypes : Element Topology Types
61 //! - nbLayers : Number of layers per result data location
62 //! - allDataLayerFlags : Data Layer Flags
63 //! - allnbResDataLocs : Number of result data report locations
64 //! - allResDataLocs : Result Data Report Locations
65 //! - allResults : List of Result data values of FEM analysis
66 Standard_EXPORT void Init (const Handle(IGESDimen_GeneralNote)& aNote, const Standard_Integer aSubCase, const Standard_Real aTime, const Standard_Integer nbResults, const Standard_Integer aResRepFlag, const Handle(TColStd_HArray1OfInteger)& allElementIdents, const Handle(IGESAppli_HArray1OfFiniteElement)& allFiniteElems, const Handle(TColStd_HArray1OfInteger)& allTopTypes, const Handle(TColStd_HArray1OfInteger)& nbLayers, const Handle(TColStd_HArray1OfInteger)& allDataLayerFlags, const Handle(TColStd_HArray1OfInteger)& allnbResDataLocs, const Handle(IGESBasic_HArray1OfHArray1OfInteger)& allResDataLocs, const Handle(IGESBasic_HArray1OfHArray1OfReal)& allResults);
67
68 //! Changes the FormNumber (which indicates Type of Result)
69 //! Error if not in range [0-34]
70 Standard_EXPORT void SetFormNumber (const Standard_Integer form);
71
72 //! returns General Note Entity describing analysis case
73 Standard_EXPORT Handle(IGESDimen_GeneralNote) Note() const;
74
75 //! returns analysis Subcase number
76 Standard_EXPORT Standard_Integer SubCaseNumber() const;
77
78 //! returns analysis time value
79 Standard_EXPORT Standard_Real Time() const;
80
81 //! returns number of result values per FEM
82 Standard_EXPORT Standard_Integer NbResultValues() const;
83
84 //! returns Results Reporting Flag
85 Standard_EXPORT Standard_Integer ResultReportFlag() const;
86
87 //! returns number of FEM elements
88 Standard_EXPORT Standard_Integer NbElements() const;
89
90 //! returns FEM element number for elements
91 Standard_EXPORT Standard_Integer ElementIdentifier (const Standard_Integer Index) const;
92
93 //! returns FEM element
94 Standard_EXPORT Handle(IGESAppli_FiniteElement) Element (const Standard_Integer Index) const;
95
96 //! returns element Topology Types
97 Standard_EXPORT Standard_Integer ElementTopologyType (const Standard_Integer Index) const;
98
99 //! returns number of layers per result data location
100 Standard_EXPORT Standard_Integer NbLayers (const Standard_Integer Index) const;
101
102 //! returns Data Layer Flags
103 Standard_EXPORT Standard_Integer DataLayerFlag (const Standard_Integer Index) const;
104
105 //! returns number of result data report locations
106 Standard_EXPORT Standard_Integer NbResultDataLocs (const Standard_Integer Index) const;
107
108 //! returns Result Data Report Locations
109 //! UNFINISHED
110 Standard_EXPORT Standard_Integer ResultDataLoc (const Standard_Integer NElem, const Standard_Integer NLoc) const;
111
112 //! returns total number of results
113 Standard_EXPORT Standard_Integer NbResults (const Standard_Integer Index) const;
114
115 //! returns Result data value for an Element, given its
116 //! order between 1 and <NbResults(NElem)> (direct access)
117 //! For a more comprehensive access, see below
118 Standard_EXPORT Standard_Real ResultData (const Standard_Integer NElem, const Standard_Integer num) const;
119
120 //! Computes, for a given Element <NElem>, the rank of a
121 //! individual Result Data, given <NVal>,<NLay>,<NLoc>
122 Standard_EXPORT Standard_Integer ResultRank (const Standard_Integer NElem, const Standard_Integer NVal, const Standard_Integer NLay, const Standard_Integer NLoc) const;
123
124 //! returns Result data values of FEM analysis, according this
125 //! definition :
126 //! - <NElem> : n0 of the Element to be considered
127 //! - <NVal> : n0 of the Value between 1 and NbResultValues
128 //! - <NLay> : n0 of the Layer for this Element
129 //! - <NLoc> : n0 of the Data Location for this Element
130 //! This gives for each Element, the corresponding rank
131 //! computed by ResultRank, in which the leftmost subscript
132 //! changes most rapidly
133 Standard_EXPORT Standard_Real ResultData (const Standard_Integer NElem, const Standard_Integer NVal, const Standard_Integer NLay, const Standard_Integer NLoc) const;
134
135 //! Returns in once the entire list of data for an Element,
136 //! addressed as by ResultRank (See above)
137 Standard_EXPORT Handle(TColStd_HArray1OfReal) ResultList (const Standard_Integer NElem) const;
138
139
140
141
92efcf78 142 DEFINE_STANDARD_RTTIEXT(IGESAppli_ElementResults,IGESData_IGESEntity)
42cf5bc1 143
144protected:
145
146
147
148
149private:
150
151
152 Handle(IGESDimen_GeneralNote) theNote;
153 Standard_Integer theSubcaseNumber;
154 Standard_Real theTime;
155 Standard_Integer theNbResultValues;
156 Standard_Integer theResultReportFlag;
157 Handle(TColStd_HArray1OfInteger) theElementIdentifiers;
158 Handle(IGESAppli_HArray1OfFiniteElement) theElements;
159 Handle(TColStd_HArray1OfInteger) theElementTopologyTypes;
160 Handle(TColStd_HArray1OfInteger) theNbLayers;
161 Handle(TColStd_HArray1OfInteger) theDataLayerFlags;
162 Handle(TColStd_HArray1OfInteger) theNbResultDataLocs;
163 Handle(IGESBasic_HArray1OfHArray1OfInteger) theResultDataLocs;
164 Handle(IGESBasic_HArray1OfHArray1OfReal) theResultData;
165
166
167};
168
169
170
171
172
173
174
175#endif // _IGESAppli_ElementResults_HeaderFile