Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-05 09:22:36

0001 // Created on: 1993-01-11
0002 // Created by: CKY / Contract Toubro-Larsen ( Anand NATRAJAN )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESAppli_ElementResults_HeaderFile
0018 #define _IGESAppli_ElementResults_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <Standard_Real.hxx>
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 #include <IGESAppli_FiniteElement.hxx>
0027 #include <IGESData_IGESEntity.hxx>
0028 class IGESDimen_GeneralNote;
0029 class IGESBasic_HArray1OfHArray1OfInteger;
0030 class IGESBasic_HArray1OfHArray1OfReal;
0031 class IGESAppli_FiniteElement;
0032 
0033 //! defines ElementResults, Type <148>
0034 //! in package IGESAppli
0035 //! Used to find the results of FEM analysis
0036 class IGESAppli_ElementResults : public IGESData_IGESEntity
0037 {
0038 
0039 public:
0040   Standard_EXPORT IGESAppli_ElementResults();
0041 
0042   //! This method is used to set the fields of the class
0043   //! ElementResults
0044   //! - aNote             : GeneralNote Entity describing analysis
0045   //! - aSubCase          : Analysis Subcase number
0046   //! - aTime             : Analysis time value
0047   //! - nbResults         : Number of result values per FEM
0048   //! - aResRepFlag       : Results Reporting Flag
0049   //! - allElementIdents  : FEM element number for elements
0050   //! - allFiniteElems    : FEM element
0051   //! - allTopTypes       : Element Topology Types
0052   //! - nbLayers          : Number of layers per result data location
0053   //! - allDataLayerFlags : Data Layer Flags
0054   //! - allnbResDataLocs  : Number of result data report locations
0055   //! - allResDataLocs    : Result Data Report Locations
0056   //! - allResults        : List of Result data values of FEM analysis
0057   Standard_EXPORT void Init(
0058     const occ::handle<IGESDimen_GeneralNote>&                                     aNote,
0059     const int                                                                     aSubCase,
0060     const double                                                                  aTime,
0061     const int                                                                     nbResults,
0062     const int                                                                     aResRepFlag,
0063     const occ::handle<NCollection_HArray1<int>>&                                  allElementIdents,
0064     const occ::handle<NCollection_HArray1<occ::handle<IGESAppli_FiniteElement>>>& allFiniteElems,
0065     const occ::handle<NCollection_HArray1<int>>&                                  allTopTypes,
0066     const occ::handle<NCollection_HArray1<int>>&                                  nbLayers,
0067     const occ::handle<NCollection_HArray1<int>>&                                  allDataLayerFlags,
0068     const occ::handle<NCollection_HArray1<int>>&                                  allnbResDataLocs,
0069     const occ::handle<IGESBasic_HArray1OfHArray1OfInteger>&                       allResDataLocs,
0070     const occ::handle<IGESBasic_HArray1OfHArray1OfReal>&                          allResults);
0071 
0072   //! Changes the FormNumber (which indicates Type of Result)
0073   //! Error if not in range [0-34]
0074   Standard_EXPORT void SetFormNumber(const int form);
0075 
0076   //! returns General Note Entity describing analysis case
0077   Standard_EXPORT occ::handle<IGESDimen_GeneralNote> Note() const;
0078 
0079   //! returns analysis Subcase number
0080   Standard_EXPORT int SubCaseNumber() const;
0081 
0082   //! returns analysis time value
0083   Standard_EXPORT double Time() const;
0084 
0085   //! returns number of result values per FEM
0086   Standard_EXPORT int NbResultValues() const;
0087 
0088   //! returns Results Reporting Flag
0089   Standard_EXPORT int ResultReportFlag() const;
0090 
0091   //! returns number of FEM elements
0092   Standard_EXPORT int NbElements() const;
0093 
0094   //! returns FEM element number for elements
0095   Standard_EXPORT int ElementIdentifier(const int Index) const;
0096 
0097   //! returns FEM element
0098   Standard_EXPORT occ::handle<IGESAppli_FiniteElement> Element(const int Index) const;
0099 
0100   //! returns element Topology Types
0101   Standard_EXPORT int ElementTopologyType(const int Index) const;
0102 
0103   //! returns number of layers per result data location
0104   Standard_EXPORT int NbLayers(const int Index) const;
0105 
0106   //! returns Data Layer Flags
0107   Standard_EXPORT int DataLayerFlag(const int Index) const;
0108 
0109   //! returns number of result data report locations
0110   Standard_EXPORT int NbResultDataLocs(const int Index) const;
0111 
0112   //! returns Result Data Report Locations
0113   //! UNFINISHED
0114   Standard_EXPORT int ResultDataLoc(const int NElem, const int NLoc) const;
0115 
0116   //! returns total number of results
0117   Standard_EXPORT int NbResults(const int Index) const;
0118 
0119   //! returns Result data value for an Element, given its
0120   //! order between 1 and <NbResults(NElem)> (direct access)
0121   //! For a more comprehensive access, see below
0122   Standard_EXPORT double ResultData(const int NElem, const int num) const;
0123 
0124   //! Computes, for a given Element <NElem>, the rank of a
0125   //! individual Result Data, given <NVal>,<NLay>,<NLoc>
0126   Standard_EXPORT int ResultRank(const int NElem,
0127                                  const int NVal,
0128                                  const int NLay,
0129                                  const int NLoc) const;
0130 
0131   //! returns Result data values of FEM analysis, according this
0132   //! definition :
0133   //! - <NElem> : n0 of the Element to be considered
0134   //! - <NVal> : n0 of the Value between 1 and NbResultValues
0135   //! - <NLay> : n0 of the Layer for this Element
0136   //! - <NLoc> : n0 of the Data Location for this Element
0137   //! This gives for each Element, the corresponding rank
0138   //! computed by ResultRank, in which the leftmost subscript
0139   //! changes most rapidly
0140   Standard_EXPORT double ResultData(const int NElem,
0141                                     const int NVal,
0142                                     const int NLay,
0143                                     const int NLoc) const;
0144 
0145   //! Returns in once the entire list of data for an Element,
0146   //! addressed as by ResultRank (See above)
0147   Standard_EXPORT occ::handle<NCollection_HArray1<double>> ResultList(const int NElem) const;
0148 
0149   DEFINE_STANDARD_RTTIEXT(IGESAppli_ElementResults, IGESData_IGESEntity)
0150 
0151 private:
0152   occ::handle<IGESDimen_GeneralNote>                                     theNote;
0153   int                                                                    theSubcaseNumber;
0154   double                                                                 theTime;
0155   int                                                                    theNbResultValues;
0156   int                                                                    theResultReportFlag;
0157   occ::handle<NCollection_HArray1<int>>                                  theElementIdentifiers;
0158   occ::handle<NCollection_HArray1<occ::handle<IGESAppli_FiniteElement>>> theElements;
0159   occ::handle<NCollection_HArray1<int>>                                  theElementTopologyTypes;
0160   occ::handle<NCollection_HArray1<int>>                                  theNbLayers;
0161   occ::handle<NCollection_HArray1<int>>                                  theDataLayerFlags;
0162   occ::handle<NCollection_HArray1<int>>                                  theNbResultDataLocs;
0163   occ::handle<IGESBasic_HArray1OfHArray1OfInteger>                       theResultDataLocs;
0164   occ::handle<IGESBasic_HArray1OfHArray1OfReal>                          theResultData;
0165 };
0166 
0167 #endif // _IGESAppli_ElementResults_HeaderFile