Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:30

0001 // Created on: 1997-10-29
0002 // Created by: Roman BORISOV
0003 // Copyright (c) 1997-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 _FEmTool_Assembly_HeaderFile
0018 #define _FEmTool_Assembly_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColStd_Array2OfInteger.hxx>
0025 #include <FEmTool_HAssemblyTable.hxx>
0026 #include <math_Vector.hxx>
0027 #include <FEmTool_SeqOfLinConstr.hxx>
0028 #include <TColStd_SequenceOfReal.hxx>
0029 #include <Standard_Integer.hxx>
0030 #include <Standard_Real.hxx>
0031 class FEmTool_ProfileMatrix;
0032 class math_Matrix;
0033 
0034 
0035 //! Assemble and solve system from (one dimensional) Finite Elements
0036 class FEmTool_Assembly 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   Standard_EXPORT FEmTool_Assembly(const TColStd_Array2OfInteger& Dependence, const Handle(FEmTool_HAssemblyTable)& Table);
0044   
0045   //! Nullify all Matrix 's Coefficient
0046   Standard_EXPORT void NullifyMatrix();
0047   
0048   //! Add an elementary Matrix in the assembly Matrix
0049   //! if  Dependence(Dimension1,Dimension2)  is  False
0050   Standard_EXPORT void AddMatrix (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, const math_Matrix& Mat);
0051   
0052   //! Nullify  all  Coordinate of  assembly  Vector (second member)
0053   Standard_EXPORT void NullifyVector();
0054   
0055   //! Add an elementary Vector in the assembly Vector (second member)
0056   Standard_EXPORT void AddVector (const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& Vec);
0057   
0058   //! Delete all Constraints.
0059   Standard_EXPORT void ResetConstraint();
0060   
0061   //! Nullify all Constraints.
0062   Standard_EXPORT void NullifyConstraint();
0063   
0064   Standard_EXPORT void AddConstraint (const Standard_Integer IndexofConstraint, const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& LinearForm, const Standard_Real Value);
0065   
0066   //! Solve the assembly system
0067   //! Returns Standard_False if the computation failed.
0068   Standard_EXPORT Standard_Boolean Solve();
0069   
0070   Standard_EXPORT void Solution (math_Vector& Solution) const;
0071   
0072   Standard_EXPORT Standard_Integer NbGlobVar() const;
0073   
0074   Standard_EXPORT void GetAssemblyTable (Handle(FEmTool_HAssemblyTable)& AssTable) const;
0075 
0076 
0077 
0078 
0079 protected:
0080 
0081 
0082 
0083 
0084 
0085 private:
0086 
0087 
0088 
0089   TColStd_Array2OfInteger myDepTable;
0090   Handle(FEmTool_HAssemblyTable) myRefTable;
0091   Standard_Boolean IsSolved;
0092   Handle(FEmTool_ProfileMatrix) H;
0093   math_Vector B;
0094   Handle(FEmTool_ProfileMatrix) GHGt;
0095   FEmTool_SeqOfLinConstr G;
0096   TColStd_SequenceOfReal C;
0097 
0098 
0099 };
0100 
0101 
0102 
0103 
0104 
0105 
0106 
0107 #endif // _FEmTool_Assembly_HeaderFile