Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-09 09:15:20

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 //! Assemble and solve system from (one dimensional) Finite Elements
0035 class FEmTool_Assembly
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   Standard_EXPORT FEmTool_Assembly(const TColStd_Array2OfInteger&        Dependence,
0041                                    const Handle(FEmTool_HAssemblyTable)& Table);
0042 
0043   //! Nullify all Matrix 's Coefficient
0044   Standard_EXPORT void NullifyMatrix();
0045 
0046   //! Add an elementary Matrix in the assembly Matrix
0047   //! if  Dependence(Dimension1,Dimension2)  is  False
0048   Standard_EXPORT void AddMatrix(const Standard_Integer Element,
0049                                  const Standard_Integer Dimension1,
0050                                  const Standard_Integer Dimension2,
0051                                  const math_Matrix&     Mat);
0052 
0053   //! Nullify  all  Coordinate of  assembly  Vector (second member)
0054   Standard_EXPORT void NullifyVector();
0055 
0056   //! Add an elementary Vector in the assembly Vector (second member)
0057   Standard_EXPORT void AddVector(const Standard_Integer Element,
0058                                  const Standard_Integer Dimension,
0059                                  const math_Vector&     Vec);
0060 
0061   //! Delete all Constraints.
0062   Standard_EXPORT void ResetConstraint();
0063 
0064   //! Nullify all Constraints.
0065   Standard_EXPORT void NullifyConstraint();
0066 
0067   Standard_EXPORT void AddConstraint(const Standard_Integer IndexofConstraint,
0068                                      const Standard_Integer Element,
0069                                      const Standard_Integer Dimension,
0070                                      const math_Vector&     LinearForm,
0071                                      const Standard_Real    Value);
0072 
0073   //! Solve the assembly system
0074   //! Returns Standard_False if the computation failed.
0075   Standard_EXPORT Standard_Boolean Solve();
0076 
0077   Standard_EXPORT void Solution(math_Vector& Solution) const;
0078 
0079   Standard_EXPORT Standard_Integer NbGlobVar() const;
0080 
0081   Standard_EXPORT void GetAssemblyTable(Handle(FEmTool_HAssemblyTable)& AssTable) const;
0082 
0083 protected:
0084 private:
0085   TColStd_Array2OfInteger        myDepTable;
0086   Handle(FEmTool_HAssemblyTable) myRefTable;
0087   Standard_Boolean               IsSolved;
0088   Handle(FEmTool_ProfileMatrix)  H;
0089   math_Vector                    B;
0090   Handle(FEmTool_ProfileMatrix)  GHGt;
0091   FEmTool_SeqOfLinConstr         G;
0092   TColStd_SequenceOfReal         C;
0093 };
0094 
0095 #endif // _FEmTool_Assembly_HeaderFile