42cf5bc1 |
1 | // Created on: 1997-10-29 |
2 | // Created by: Roman BORISOV |
3 | // Copyright (c) 1997-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 _FEmTool_Assembly_HeaderFile |
18 | #define _FEmTool_Assembly_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <TColStd_Array2OfInteger.hxx> |
25 | #include <FEmTool_HAssemblyTable.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <math_Vector.hxx> |
28 | #include <FEmTool_SeqOfLinConstr.hxx> |
29 | #include <TColStd_SequenceOfReal.hxx> |
30 | #include <Standard_Integer.hxx> |
31 | #include <Standard_Real.hxx> |
32 | class FEmTool_ProfileMatrix; |
33 | class StdFail_NotDone; |
34 | class Standard_DimensionError; |
35 | class Standard_DomainError; |
36 | class math_Matrix; |
37 | |
38 | |
39 | //! Assemble and solve system from (one dimensional) Finite Elements |
40 | class FEmTool_Assembly |
41 | { |
42 | public: |
43 | |
44 | DEFINE_STANDARD_ALLOC |
45 | |
46 | |
47 | Standard_EXPORT FEmTool_Assembly(const TColStd_Array2OfInteger& Dependence, const Handle(FEmTool_HAssemblyTable)& Table); |
48 | |
49 | //! Nullify all Matrix 's Coefficient |
50 | Standard_EXPORT void NullifyMatrix(); |
51 | |
52 | //! Add an elementary Matrix in the assembly Matrix |
53 | //! if Dependence(Dimension1,Dimension2) is False |
54 | Standard_EXPORT void AddMatrix (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, const math_Matrix& Mat); |
55 | |
56 | //! Nullify all Coordinate of assembly Vector (second member) |
57 | Standard_EXPORT void NullifyVector(); |
58 | |
59 | //! Add an elementary Vector in the assembly Vector (second member) |
60 | Standard_EXPORT void AddVector (const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& Vec); |
61 | |
62 | //! Delete all Constraints. |
63 | Standard_EXPORT void ResetConstraint(); |
64 | |
65 | //! Nullify all Constraints. |
66 | Standard_EXPORT void NullifyConstraint(); |
67 | |
68 | Standard_EXPORT void AddConstraint (const Standard_Integer IndexofConstraint, const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& LinearForm, const Standard_Real Value); |
69 | |
70 | //! Solve the assembly system |
71 | //! Returns Standard_False if the computation failed. |
72 | Standard_EXPORT Standard_Boolean Solve(); |
73 | |
74 | Standard_EXPORT void Solution (math_Vector& Solution) const; |
75 | |
76 | Standard_EXPORT Standard_Integer NbGlobVar() const; |
77 | |
78 | Standard_EXPORT void GetAssemblyTable (Handle(FEmTool_HAssemblyTable)& AssTable) const; |
79 | |
80 | |
81 | |
82 | |
83 | protected: |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | private: |
90 | |
91 | |
92 | |
93 | TColStd_Array2OfInteger myDepTable; |
94 | Handle(FEmTool_HAssemblyTable) myRefTable; |
95 | Standard_Boolean IsSolved; |
96 | Handle(FEmTool_ProfileMatrix) H; |
97 | math_Vector B; |
98 | Handle(FEmTool_ProfileMatrix) GHGt; |
99 | FEmTool_SeqOfLinConstr G; |
100 | TColStd_SequenceOfReal C; |
101 | |
102 | |
103 | }; |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | #endif // _FEmTool_Assembly_HeaderFile |