1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,66 +0,0 @@
-- Created on: 1997-10-29
-- Created by: Roman BORISOV
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package FEmTool
---Purpose: Tool to Finite Element methods
---Level: Advanced
uses
TCollection,
TColStd,
math,
PLib,
GeomAbs
is
class Assembly;
deferred class ElementaryCriterion;
class LinearTension;
class LinearFlexion;
class LinearJerk;
deferred class SparseMatrix;
class ProfileMatrix;
class Curve;
class ElementsOfRefMatrix;
-- instantiate classes
---Purpose: To define the table [Freedom's degree] [Dimension,Element]
-- which gives Index of Freedom's degree in the
-- assembly problem.
imported AssemblyTable;
imported transient class HAssemblyTable;
---Purpose: To define list of segments with non-zero coefficients
-- of constraint
imported ListOfVectors;
imported ListIteratorOfListOfVectors;
---Purpose: To define sequence of constraints
imported SeqOfLinConstr;
end FEmTool;

View File

@@ -1,95 +0,0 @@
-- Created on: 1997-10-29
-- Created by: Roman BORISOV
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Assembly from FEmTool
---Purpose: Assemble and solve system from (one dimensional) Finite Elements
uses
Array2OfInteger from TColStd,
HAssemblyTable from FEmTool,
Matrix from math,
Vector from math,
ProfileMatrix from FEmTool,
SeqOfLinConstr from FEmTool,
SequenceOfReal from TColStd
raises
NotDone from StdFail,
DimensionError,
DomainError
is
Create(Dependence : Array2OfInteger from TColStd;
Table : HAssemblyTable from FEmTool)
returns Assembly from FEmTool;
NullifyMatrix(me : in out);
---Purpose: Nullify all Matrix 's Coefficient
AddMatrix(me : in out;
Element : Integer;
Dimension1 : Integer;
Dimension2 : Integer;
Mat : Matrix from math)
---Purpose: Add an elementary Matrix in the assembly Matrix
raises DomainError; -- if Dependence(Dimension1,Dimension2) is False
NullifyVector(me : in out);
---Purpose: Nullify all Coordinate of assembly Vector (second member)
AddVector(me : in out;
Element : Integer;
Dimension : Integer;
Vec : Vector from math);
---Purpose: Add an elementary Vector in the assembly Vector (second member)
ResetConstraint(me : in out);
---Purpose: Delete all Constraints.
NullifyConstraint(me : in out);
---Purpose: Nullify all Constraints.
AddConstraint(me : in out;
IndexofConstraint : Integer;
Element : Integer;
Dimension : Integer;
LinearForm : Vector from math;
Value : Real);
Solve(me : in out) returns Boolean;
---Purpose: Solve the assembly system
-- Returns Standard_False if the computation failed.
Solution(me; Solution : out Vector from math)
raises NotDone from StdFail; -- if the system is not solved.
NbGlobVar(me)
returns Integer;
GetAssemblyTable(me; AssTable : out HAssemblyTable from FEmTool);
fields
myDepTable : Array2OfInteger;
myRefTable : HAssemblyTable;
IsSolved : Boolean;
H : ProfileMatrix from FEmTool;
B : Vector from math;
GHGt : ProfileMatrix from FEmTool;
G : SeqOfLinConstr from FEmTool;
C : SequenceOfReal from TColStd;
end Assembly;

View File

@@ -14,11 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_Assembly.ixx>
#include <FEmTool_Assembly.hxx>
#include <FEmTool_ListIteratorOfListOfVectors.hxx>
#include <FEmTool_ListOfVectors.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <FEmTool_ProfileMatrix.hxx>
#include <math_Matrix.hxx>
#include <Standard_DimensionError.hxx>
#include <Standard_DomainError.hxx>
#include <StdFail_NotDone.hxx>
#include <TColStd_HArray1OfReal.hxx>
//----------------------------------------------------------------------------
// Purpose - to find min index of global variables and define

View File

@@ -0,0 +1,111 @@
// Created on: 1997-10-29
// Created by: Roman BORISOV
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_Assembly_HeaderFile
#define _FEmTool_Assembly_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TColStd_Array2OfInteger.hxx>
#include <FEmTool_HAssemblyTable.hxx>
#include <Standard_Boolean.hxx>
#include <math_Vector.hxx>
#include <FEmTool_SeqOfLinConstr.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
class FEmTool_ProfileMatrix;
class StdFail_NotDone;
class Standard_DimensionError;
class Standard_DomainError;
class math_Matrix;
//! Assemble and solve system from (one dimensional) Finite Elements
class FEmTool_Assembly
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT FEmTool_Assembly(const TColStd_Array2OfInteger& Dependence, const Handle(FEmTool_HAssemblyTable)& Table);
//! Nullify all Matrix 's Coefficient
Standard_EXPORT void NullifyMatrix();
//! Add an elementary Matrix in the assembly Matrix
//! if Dependence(Dimension1,Dimension2) is False
Standard_EXPORT void AddMatrix (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, const math_Matrix& Mat);
//! Nullify all Coordinate of assembly Vector (second member)
Standard_EXPORT void NullifyVector();
//! Add an elementary Vector in the assembly Vector (second member)
Standard_EXPORT void AddVector (const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& Vec);
//! Delete all Constraints.
Standard_EXPORT void ResetConstraint();
//! Nullify all Constraints.
Standard_EXPORT void NullifyConstraint();
Standard_EXPORT void AddConstraint (const Standard_Integer IndexofConstraint, const Standard_Integer Element, const Standard_Integer Dimension, const math_Vector& LinearForm, const Standard_Real Value);
//! Solve the assembly system
//! Returns Standard_False if the computation failed.
Standard_EXPORT Standard_Boolean Solve();
Standard_EXPORT void Solution (math_Vector& Solution) const;
Standard_EXPORT Standard_Integer NbGlobVar() const;
Standard_EXPORT void GetAssemblyTable (Handle(FEmTool_HAssemblyTable)& AssTable) const;
protected:
private:
TColStd_Array2OfInteger myDepTable;
Handle(FEmTool_HAssemblyTable) myRefTable;
Standard_Boolean IsSolved;
Handle(FEmTool_ProfileMatrix) H;
math_Vector B;
Handle(FEmTool_ProfileMatrix) GHGt;
FEmTool_SeqOfLinConstr G;
TColStd_SequenceOfReal C;
};
#endif // _FEmTool_Assembly_HeaderFile

View File

@@ -1,105 +0,0 @@
-- Created on: 1997-09-12
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Curve from FEmTool inherits TShared from MMgt
---Purpose: Curve defined by Polynomial Elements.
uses
Base from PLib,
Array1OfReal from TColStd,
HArray1OfInteger from TColStd,
Array2OfReal from TColStd,
Array1OfInteger from TColStd,
HArray1OfReal from TColStd
raises
DimensionError
is
Create(Dimension : Integer;
NbElements : Integer;
TheBase : Base from PLib;
Tolerance : Real);
Knots(me)
---C++: return &
returns Array1OfReal;
SetElement(me : mutable; IndexOfElement : Integer;
Coeffs : Array2OfReal);
D0(me : mutable; U : Real; Pnt : out Array1OfReal);
D1(me : mutable; U : Real; Vec : out Array1OfReal);
D2(me : mutable; U : Real; Vec : out Array1OfReal);
Length(me : mutable;
FirstU, LastU : Real;
Length : out Real);
GetElement(me : mutable; IndexOfElement : Integer;
Coeffs : out Array2OfReal);
GetPolynom(me : mutable; Coeffs : out Array1OfReal);
---Purpose: returns coefficients of all elements in canonical base.
NbElements(me) returns Integer;
Dimension(me) returns Integer;
Base(me) returns Base from PLib;
Degree(me; IndexOfElement : Integer) returns Integer;
SetDegree(me : mutable;
IndexOfElement : Integer;
Degree : Integer);
ReduceDegree(me : mutable;
IndexOfElement : Integer; Tol : Real;
NewDegree : out Integer; MaxError : out Real);
Update(me:mutable; Element : Integer; Order : Integer)
is private;
fields
myNbElements : Integer;
myDimension : Integer;
myBase : Base from PLib;
myKnots : HArray1OfReal;
myDegree : Array1OfInteger;
myCoeff : Array1OfReal; -- Coeff in <myBase>
myPoly : Array1OfReal; -- Coeff in the canonnical Bases
myDeri : Array1OfReal; -- Coeff of the first Derivative
-- in the canonical Base
myDsecn : Array1OfReal; -- Coeff of the second Derivative
-- in the canonnical Base
HasPoly : Array1OfInteger; -- Say If the Ith Element
-- has an canonical Representation.
HasDeri : Array1OfInteger; -- Say If the Ith Element
-- has an first Derivative Representation.
HasSecn : Array1OfInteger; -- Say If the Ith Element
-- has an second Derivative Representation.
myLength : Array1OfReal; -- Table of Length Element by Element
Uf, Ul : Real;
Denom, USum : Real;
myIndex, myPtr : Integer;
end Curve;

View File

@@ -17,10 +17,14 @@
#define No_Standard_RangeError
#define No_Standard_OutOfRange
#include <FEmTool_Curve.ixx>
#include <FEmTool_Curve.hxx>
#include <PLib.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <PLib_Base.hxx>
#include <PLib_HermitJacobi.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <Standard_DimensionError.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : FEmTool_Curve

View File

@@ -0,0 +1,119 @@
// Created on: 1997-09-12
// Created by: Philippe MANGIN
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_Curve_HeaderFile
#define _FEmTool_Curve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
#include <TColStd_Array2OfReal.hxx>
class PLib_Base;
class Standard_DimensionError;
class FEmTool_Curve;
DEFINE_STANDARD_HANDLE(FEmTool_Curve, MMgt_TShared)
//! Curve defined by Polynomial Elements.
class FEmTool_Curve : public MMgt_TShared
{
public:
Standard_EXPORT FEmTool_Curve(const Standard_Integer Dimension, const Standard_Integer NbElements, const Handle(PLib_Base)& TheBase, const Standard_Real Tolerance);
Standard_EXPORT TColStd_Array1OfReal& Knots() const;
Standard_EXPORT void SetElement (const Standard_Integer IndexOfElement, const TColStd_Array2OfReal& Coeffs);
Standard_EXPORT void D0 (const Standard_Real U, TColStd_Array1OfReal& Pnt);
Standard_EXPORT void D1 (const Standard_Real U, TColStd_Array1OfReal& Vec);
Standard_EXPORT void D2 (const Standard_Real U, TColStd_Array1OfReal& Vec);
Standard_EXPORT void Length (const Standard_Real FirstU, const Standard_Real LastU, Standard_Real& Length);
Standard_EXPORT void GetElement (const Standard_Integer IndexOfElement, TColStd_Array2OfReal& Coeffs);
//! returns coefficients of all elements in canonical base.
Standard_EXPORT void GetPolynom (TColStd_Array1OfReal& Coeffs);
Standard_EXPORT Standard_Integer NbElements() const;
Standard_EXPORT Standard_Integer Dimension() const;
Standard_EXPORT Handle(PLib_Base) Base() const;
Standard_EXPORT Standard_Integer Degree (const Standard_Integer IndexOfElement) const;
Standard_EXPORT void SetDegree (const Standard_Integer IndexOfElement, const Standard_Integer Degree);
Standard_EXPORT void ReduceDegree (const Standard_Integer IndexOfElement, const Standard_Real Tol, Standard_Integer& NewDegree, Standard_Real& MaxError);
DEFINE_STANDARD_RTTI(FEmTool_Curve,MMgt_TShared)
protected:
private:
Standard_EXPORT void Update (const Standard_Integer Element, const Standard_Integer Order);
Standard_Integer myNbElements;
Standard_Integer myDimension;
Handle(PLib_Base) myBase;
Handle(TColStd_HArray1OfReal) myKnots;
TColStd_Array1OfInteger myDegree;
TColStd_Array1OfReal myCoeff;
TColStd_Array1OfReal myPoly;
TColStd_Array1OfReal myDeri;
TColStd_Array1OfReal myDsecn;
TColStd_Array1OfInteger HasPoly;
TColStd_Array1OfInteger HasDeri;
TColStd_Array1OfInteger HasSecn;
TColStd_Array1OfReal myLength;
Standard_Real Uf;
Standard_Real Ul;
Standard_Real Denom;
Standard_Real USum;
Standard_Integer myIndex;
Standard_Integer myPtr;
};
#endif // _FEmTool_Curve_HeaderFile

View File

@@ -1,75 +0,0 @@
-- Created on: 1997-09-11
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class ElementaryCriterion from FEmTool inherits TShared from MMgt
---Purpose: defined J Criteria to used in minimisation
uses
Vector from math,
Matrix from math,
HArray2OfReal from TColStd,
HArray2OfInteger from TColStd
raises
NotImplemented,
DomainError
is
Set(me : mutable;
Coeff : HArray2OfReal)
---Purpose: Set the coefficient of the Element (the Curve)
is static;
Set(me : mutable;
FirstKnot : Real;
LastKnot : Real)
---Purpose: Set the definition interval of the Element
is virtual;
DependenceTable(me)
returns HArray2OfInteger from TColStd
---Purpose: To know if two dimension are independent.
is deferred;
Value (me : mutable)
---Purpose: To Compute J(E) where E is the current Element
returns Real is deferred;
Hessian(me : mutable ;
Dim1 : Integer;
Dim2 : Integer;
H : out Matrix from math)
---Purpose: To Compute J(E) the coefficients of Hessian matrix of
-- J(E) wich are crossed derivatives in dimensions <Dim1>
-- and <Dim2>.
raises DomainError -- If DependenceTable(Dimension1,Dimension2) is False
is deferred;
Gradient(me : mutable;
Dim : Integer;
G : out Vector from math)
---Purpose: To Compute the coefficients in the dimension <dim>
-- of the J(E)'s Gradient where E is the current Element
is deferred;
fields
myCoeff : HArray2OfReal is protected;
myFirst, myLast : Real is protected;
end ElementaryCriterion;

View File

@@ -14,7 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_ElementaryCriterion.ixx>
#include <FEmTool_ElementaryCriterion.hxx>
#include <math_Matrix.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
void FEmTool_ElementaryCriterion::Set(const Handle(TColStd_HArray2OfReal)& Coeff)
{

View File

@@ -0,0 +1,92 @@
// Created on: 1997-09-11
// Created by: Philippe MANGIN
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_ElementaryCriterion_HeaderFile
#define _FEmTool_ElementaryCriterion_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <Standard_Integer.hxx>
#include <math_Vector.hxx>
class Standard_NotImplemented;
class Standard_DomainError;
class math_Matrix;
class FEmTool_ElementaryCriterion;
DEFINE_STANDARD_HANDLE(FEmTool_ElementaryCriterion, MMgt_TShared)
//! defined J Criteria to used in minimisation
class FEmTool_ElementaryCriterion : public MMgt_TShared
{
public:
//! Set the coefficient of the Element (the Curve)
Standard_EXPORT void Set (const Handle(TColStd_HArray2OfReal)& Coeff);
//! Set the definition interval of the Element
Standard_EXPORT virtual void Set (const Standard_Real FirstKnot, const Standard_Real LastKnot);
//! To know if two dimension are independent.
Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const = 0;
//! To Compute J(E) where E is the current Element
Standard_EXPORT virtual Standard_Real Value() = 0;
//! To Compute J(E) the coefficients of Hessian matrix of
//! J(E) wich are crossed derivatives in dimensions <Dim1>
//! and <Dim2>.
//! If DependenceTable(Dimension1,Dimension2) is False
Standard_EXPORT virtual void Hessian (const Standard_Integer Dim1, const Standard_Integer Dim2, math_Matrix& H) = 0;
//! To Compute the coefficients in the dimension <dim>
//! of the J(E)'s Gradient where E is the current Element
Standard_EXPORT virtual void Gradient (const Standard_Integer Dim, math_Vector& G) = 0;
DEFINE_STANDARD_RTTI(FEmTool_ElementaryCriterion,MMgt_TShared)
protected:
Handle(TColStd_HArray2OfReal) myCoeff;
Standard_Real myFirst;
Standard_Real myLast;
private:
};
#endif // _FEmTool_ElementaryCriterion_HeaderFile

View File

@@ -1,72 +0,0 @@
-- Created on: 1998-11-10
-- Created by: Igor FEOKTISTOV
-- Copyright (c) 1998-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ElementsOfRefMatrix from FEmTool inherits FunctionSet from math
---Purpose: this class describes the functions needed for
-- calculating matrix elements of RefMatrix for linear
-- criteriums (Tension, Flexsion and Jerk) by Gauss integration.
-- Each function from set gives value Pi(u)'*Pj(u)' or
-- Pi(u)''*Pj(u)'' or Pi(u)'''*Pj(u)''' for each i and j,
-- where Pi(u) is i-th basis function of expansion and
-- (') means derivative.
uses
Vector from math,
Base from PLib
raises
ConstructionError from Standard
is
Create(TheBase : Base from PLib; DerOrder : Integer from Standard)
-- DerOrder is order of derivative (1, 2, 3)
returns ElementsOfRefMatrix from FEmTool
raises ConstructionError from Standard;
-- if DerOrder is not valid
NbVariables(me)
---Purpose: returns the number of variables of the function.
-- It is supposed that NbVariables = 1.
returns Integer;
NbEquations(me)
---Purpose: returns the number of equations of the function.
returns Integer;
Value(me: in out; X: Vector; F: out Vector)
---Purpose: computes the values <F> of the functions for the
-- variable <X>.
-- returns True if the computation was done successfully,
-- False otherwise.
-- F contains results only for i<=j in following order:
-- P0*P0, P0*P1, P0*P2... P1*P1, P1*P2,... (upper triangle of
-- matrix {PiPj})
returns Boolean;
fields
myBase : Base from PLib;
myDerOrder : Integer;
myNbEquations : Integer;
end ElementsOfRefMatrix;

View File

@@ -14,10 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_ElementsOfRefMatrix.ixx>
#include <PLib_Base.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <PLib_Base.hxx>
#include <Standard_ConstructionError.hxx>
#include <TColStd_Array1OfReal.hxx>
FEmTool_ElementsOfRefMatrix::FEmTool_ElementsOfRefMatrix(const Handle(PLib_Base)& TheBase,
const Standard_Integer DerOrder):

View File

@@ -0,0 +1,90 @@
// Created on: 1998-11-10
// Created by: Igor FEOKTISTOV
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_ElementsOfRefMatrix_HeaderFile
#define _FEmTool_ElementsOfRefMatrix_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <math_FunctionSet.hxx>
#include <Standard_Boolean.hxx>
#include <math_Vector.hxx>
class PLib_Base;
class Standard_ConstructionError;
//! this class describes the functions needed for
//! calculating matrix elements of RefMatrix for linear
//! criteriums (Tension, Flexsion and Jerk) by Gauss integration.
//! Each function from set gives value Pi(u)'*Pj(u)' or
//! Pi(u)''*Pj(u)'' or Pi(u)'''*Pj(u)''' for each i and j,
//! where Pi(u) is i-th basis function of expansion and
//! (') means derivative.
class FEmTool_ElementsOfRefMatrix : public math_FunctionSet
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT FEmTool_ElementsOfRefMatrix(const Handle(PLib_Base)& TheBase, const Standard_Integer DerOrder);
//! returns the number of variables of the function.
//! It is supposed that NbVariables = 1.
Standard_EXPORT Standard_Integer NbVariables() const;
//! returns the number of equations of the function.
Standard_EXPORT Standard_Integer NbEquations() const;
//! computes the values <F> of the functions for the
//! variable <X>.
//! returns True if the computation was done successfully,
//! False otherwise.
//! F contains results only for i<=j in following order:
//! P0*P0, P0*P1, P0*P2... P1*P1, P1*P2,... (upper triangle of
//! matrix {PiPj})
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
protected:
private:
Handle(PLib_Base) myBase;
Standard_Integer myDerOrder;
Standard_Integer myNbEquations;
};
#endif // _FEmTool_ElementsOfRefMatrix_HeaderFile

View File

@@ -1,59 +0,0 @@
-- Created on: 1997-09-18
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class LinearFlexion from FEmTool inherits ElementaryCriterion from FEmTool
---Purpose: Criterium of LinearFlexion To Hermit-Jacobi elements
uses
Vector from math,
Matrix from math,
Shape from GeomAbs,
HArray2OfReal from TColStd,
HArray2OfInteger from TColStd
raises
NotImplemented,
DomainError
is
Create(WorkDegree : Integer ;
ConstraintOrder : Shape from GeomAbs)
returns LinearFlexion from FEmTool;
DependenceTable(me)
returns HArray2OfInteger from TColStd
is redefined;
Value (me : mutable)
returns Real is redefined;
Hessian(me : mutable ;
Dimension1 : Integer;
Dimension2 : Integer;
H : out Matrix from math)
raises DomainError -- If DependenceTable(Dimension1,Dimension2) is False
is redefined;
Gradient(me : mutable;
Dimension : Integer;
G : out Vector from math)
is redefined;
fields
RefMatrix : Matrix from math;
myOrder : Integer;
end LinearFlexion;

View File

@@ -14,18 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_LinearFlexion.ixx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <FEmTool_LinearFlexion.hxx>
#include <math.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math_IntegerVector.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <PLib.hxx>
#include <PLib_HermitJacobi.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <PLib_HermitJacobi.hxx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <math_IntegerVector.hxx>
#include <math_Vector.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math.hxx>
#include <Standard_ConstructionError.hxx>
//=======================================================================
//function : FEmTool_LinearFlexion

View File

@@ -0,0 +1,80 @@
// Created on: 1997-09-18
// Created by: Philippe MANGIN
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_LinearFlexion_HeaderFile
#define _FEmTool_LinearFlexion_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <math_Matrix.hxx>
#include <Standard_Integer.hxx>
#include <FEmTool_ElementaryCriterion.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <Standard_Real.hxx>
#include <math_Vector.hxx>
class Standard_NotImplemented;
class Standard_DomainError;
class math_Matrix;
class FEmTool_LinearFlexion;
DEFINE_STANDARD_HANDLE(FEmTool_LinearFlexion, FEmTool_ElementaryCriterion)
//! Criterium of LinearFlexion To Hermit-Jacobi elements
class FEmTool_LinearFlexion : public FEmTool_ElementaryCriterion
{
public:
Standard_EXPORT FEmTool_LinearFlexion(const Standard_Integer WorkDegree, const GeomAbs_Shape ConstraintOrder);
Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real Value() Standard_OVERRIDE;
Standard_EXPORT virtual void Hessian (const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE;
Standard_EXPORT virtual void Gradient (const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(FEmTool_LinearFlexion,FEmTool_ElementaryCriterion)
protected:
private:
math_Matrix RefMatrix;
Standard_Integer myOrder;
};
#endif // _FEmTool_LinearFlexion_HeaderFile

View File

@@ -1,68 +0,0 @@
-- Created on: 1997-09-18
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class LinearJerk from FEmTool inherits ElementaryCriterion from FEmTool
---Purpose: Criterion of LinearJerk To Hermit-Jacobi elements
uses
Vector from math,
Matrix from math,
Shape from GeomAbs,
HArray2OfReal from TColStd,
HArray2OfInteger from TColStd
raises
NotImplemented,
DomainError
is
Create(WorkDegree : Integer ;
ConstraintOrder : Shape from GeomAbs)
returns LinearJerk from FEmTool;
DependenceTable(me)
returns HArray2OfInteger from TColStd
is redefined;
Value (me : mutable)
returns Real is redefined;
Hessian(me : mutable ;
Dimension1 : Integer;
Dimension2 : Integer;
H : out Matrix from math)
raises DomainError -- If DependenceTable(Dimension1,Dimension2) is False
is redefined;
Gradient(me : mutable;
Dimension : Integer;
G : out Vector from math)
is redefined;
fields
RefMatrix : Matrix from math;
myOrder : Integer;
end LinearJerk;

View File

@@ -14,19 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_LinearJerk.ixx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <FEmTool_LinearJerk.hxx>
#include <math.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math_IntegerVector.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <PLib.hxx>
#include <PLib_HermitJacobi.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <PLib_HermitJacobi.hxx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <math_IntegerVector.hxx>
#include <math_Vector.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math.hxx>
#include <Standard_ConstructionError.hxx>
FEmTool_LinearJerk::FEmTool_LinearJerk(const Standard_Integer WorkDegree,
const GeomAbs_Shape ConstraintOrder):

View File

@@ -0,0 +1,80 @@
// Created on: 1997-09-18
// Created by: Philippe MANGIN
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_LinearJerk_HeaderFile
#define _FEmTool_LinearJerk_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <math_Matrix.hxx>
#include <Standard_Integer.hxx>
#include <FEmTool_ElementaryCriterion.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <Standard_Real.hxx>
#include <math_Vector.hxx>
class Standard_NotImplemented;
class Standard_DomainError;
class math_Matrix;
class FEmTool_LinearJerk;
DEFINE_STANDARD_HANDLE(FEmTool_LinearJerk, FEmTool_ElementaryCriterion)
//! Criterion of LinearJerk To Hermit-Jacobi elements
class FEmTool_LinearJerk : public FEmTool_ElementaryCriterion
{
public:
Standard_EXPORT FEmTool_LinearJerk(const Standard_Integer WorkDegree, const GeomAbs_Shape ConstraintOrder);
Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real Value() Standard_OVERRIDE;
Standard_EXPORT virtual void Hessian (const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE;
Standard_EXPORT virtual void Gradient (const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(FEmTool_LinearJerk,FEmTool_ElementaryCriterion)
protected:
private:
math_Matrix RefMatrix;
Standard_Integer myOrder;
};
#endif // _FEmTool_LinearJerk_HeaderFile

View File

@@ -1,59 +0,0 @@
-- Created on: 1997-09-18
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class LinearTension from FEmTool inherits ElementaryCriterion from FEmTool
---Purpose: Criterium of LinearTension To Hermit-Jacobi elements
uses
Vector from math,
Matrix from math,
Shape from GeomAbs,
HArray2OfReal from TColStd,
HArray2OfInteger from TColStd
raises
NotImplemented,
DomainError
is
Create(WorkDegree : Integer ;
ConstraintOrder : Shape from GeomAbs)
returns LinearTension from FEmTool;
DependenceTable(me)
returns HArray2OfInteger from TColStd
is redefined;
Value (me : mutable)
returns Real is redefined;
Hessian(me : mutable ;
Dimension1 : Integer;
Dimension2 : Integer;
H : out Matrix from math)
raises DomainError -- If DependenceTable(Dimension1,Dimension2) is False
is redefined;
Gradient(me : mutable;
Dimension : Integer;
G : out Vector from math)
is redefined;
fields
RefMatrix : Matrix from math;
myOrder : Integer;
end LinearTension;

View File

@@ -14,18 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_LinearTension.ixx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <FEmTool_LinearTension.hxx>
#include <math.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math_IntegerVector.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <PLib.hxx>
#include <PLib_HermitJacobi.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <PLib_JacobiPolynomial.hxx>
#include <PLib_HermitJacobi.hxx>
#include <FEmTool_ElementsOfRefMatrix.hxx>
#include <math_IntegerVector.hxx>
#include <math_Vector.hxx>
#include <math_GaussSetIntegration.hxx>
#include <math.hxx>
#include <Standard_ConstructionError.hxx>
FEmTool_LinearTension::FEmTool_LinearTension(const Standard_Integer WorkDegree,
const GeomAbs_Shape ConstraintOrder):

View File

@@ -0,0 +1,80 @@
// Created on: 1997-09-18
// Created by: Philippe MANGIN
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_LinearTension_HeaderFile
#define _FEmTool_LinearTension_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <math_Matrix.hxx>
#include <Standard_Integer.hxx>
#include <FEmTool_ElementaryCriterion.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <Standard_Real.hxx>
#include <math_Vector.hxx>
class Standard_NotImplemented;
class Standard_DomainError;
class math_Matrix;
class FEmTool_LinearTension;
DEFINE_STANDARD_HANDLE(FEmTool_LinearTension, FEmTool_ElementaryCriterion)
//! Criterium of LinearTension To Hermit-Jacobi elements
class FEmTool_LinearTension : public FEmTool_ElementaryCriterion
{
public:
Standard_EXPORT FEmTool_LinearTension(const Standard_Integer WorkDegree, const GeomAbs_Shape ConstraintOrder);
Standard_EXPORT virtual Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real Value() Standard_OVERRIDE;
Standard_EXPORT virtual void Hessian (const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE;
Standard_EXPORT virtual void Gradient (const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(FEmTool_LinearTension,FEmTool_ElementaryCriterion)
protected:
private:
math_Matrix RefMatrix;
Standard_Integer myOrder;
};
#endif // _FEmTool_LinearTension_HeaderFile

View File

@@ -1,95 +0,0 @@
-- Created on: 1997-10-29
-- Created by: Roman BORISOV
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ProfileMatrix from FEmTool inherits SparseMatrix from FEmTool
---Purpose: Symmetric Sparse ProfileMatrix useful for 1D Finite
-- Element methods
uses
HArray1OfInteger from TColStd,
Array1OfInteger from TColStd,
Array2OfInteger from TColStd,
HArray1OfReal from TColStd,
Vector from math
raises
NotDone from StdFail,
NotImplemented from Standard,
OutOfRange from Standard
is
Create(FirstIndexes : Array1OfInteger)
returns ProfileMatrix from FEmTool;
Init(me: mutable; Value : Real);
ChangeValue(me: mutable; I, J : Integer)
---C++: return &
returns Real
raises OutOfRange;
Decompose(me : mutable)
---Purpose: To make a Factorization of <me>
returns Boolean;
Solve(me; B : Vector; X : in out Vector)
---Purpose: Direct Solve of AX = B
raises NotDone from StdFail; -- if <me> is not decomposed
Prepare(me : mutable)
---Purpose: Make Preparation to iterative solve
returns Boolean
raises NotImplemented from Standard;
Solve(me; B : Vector;
Init : Vector;
X : out Vector;
Residual : out Vector;
Tolerance : Real = 1.0e-8;
NbIterations: Integer = 50)
---Purpose: Iterative solve of AX = B
raises NotDone from StdFail; -- if <me> is not prepared;
Multiplied(me; X: Vector; MX : in out Vector);
---Purpose: returns the product of a SparseMatrix by a vector.
-- An exception is raised if the dimensions are different
RowNumber(me)
---Purpose: returns the row range of a matrix.
returns Integer;
ColNumber(me)
---Purpose: returns the column range of the matrix.
returns Integer;
IsInProfile(me; i, j : Integer)
returns Boolean;
-- for debug
OutM(me);
OutS(me);
fields
profile : Array2OfInteger; -- Like MPOSIT in Fortran
ProfileMatrix : HArray1OfReal; -- Like AMATRI in Fortran
SMatrix : HArray1OfReal; -- Like SMATRI in Fortran
NextCoeff : HArray1OfInteger; -- Like POSUIV in Fortran
IsDecomp : Boolean;
end ProfileMatrix;

View File

@@ -18,9 +18,13 @@
#define No_Standard_OutOfRange
#define No_Standard_DimensionError
#include <FEmTool_ProfileMatrix.ixx>
#include <gp.hxx>
#include <FEmTool_ProfileMatrix.hxx>
#include <gp.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <StdFail_NotDone.hxx>
//=======================================================================
//function : :FEmTool_ProfileMatrix

View File

@@ -0,0 +1,110 @@
// Created on: 1997-10-29
// Created by: Roman BORISOV
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_ProfileMatrix_HeaderFile
#define _FEmTool_ProfileMatrix_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array2OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Boolean.hxx>
#include <FEmTool_SparseMatrix.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <math_Vector.hxx>
class StdFail_NotDone;
class Standard_NotImplemented;
class Standard_OutOfRange;
class FEmTool_ProfileMatrix;
DEFINE_STANDARD_HANDLE(FEmTool_ProfileMatrix, FEmTool_SparseMatrix)
//! Symmetric Sparse ProfileMatrix useful for 1D Finite
//! Element methods
class FEmTool_ProfileMatrix : public FEmTool_SparseMatrix
{
public:
Standard_EXPORT FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& FirstIndexes);
Standard_EXPORT void Init (const Standard_Real Value);
Standard_EXPORT Standard_Real& ChangeValue (const Standard_Integer I, const Standard_Integer J);
//! To make a Factorization of <me>
Standard_EXPORT Standard_Boolean Decompose();
//! Direct Solve of AX = B
Standard_EXPORT void Solve (const math_Vector& B, math_Vector& X) const;
//! Make Preparation to iterative solve
Standard_EXPORT Standard_Boolean Prepare();
//! Iterative solve of AX = B
Standard_EXPORT void Solve (const math_Vector& B, const math_Vector& Init, math_Vector& X, math_Vector& Residual, const Standard_Real Tolerance = 1.0e-8, const Standard_Integer NbIterations = 50) const;
//! returns the product of a SparseMatrix by a vector.
//! An exception is raised if the dimensions are different
Standard_EXPORT void Multiplied (const math_Vector& X, math_Vector& MX) const;
//! returns the row range of a matrix.
Standard_EXPORT Standard_Integer RowNumber() const;
//! returns the column range of the matrix.
Standard_EXPORT Standard_Integer ColNumber() const;
Standard_EXPORT Standard_Boolean IsInProfile (const Standard_Integer i, const Standard_Integer j) const;
Standard_EXPORT void OutM() const;
Standard_EXPORT void OutS() const;
DEFINE_STANDARD_RTTI(FEmTool_ProfileMatrix,FEmTool_SparseMatrix)
protected:
private:
TColStd_Array2OfInteger profile;
Handle(TColStd_HArray1OfReal) ProfileMatrix;
Handle(TColStd_HArray1OfReal) SMatrix;
Handle(TColStd_HArray1OfInteger) NextCoeff;
Standard_Boolean IsDecomp;
};
#endif // _FEmTool_ProfileMatrix_HeaderFile

View File

@@ -1,77 +0,0 @@
-- Created on: 1997-10-29
-- Created by: Roman BORISOV
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class SparseMatrix from FEmTool inherits TShared from MMgt
---Purpose: Sparse Matrix definition
uses
Vector from math
raises
NotDone from StdFail
is
Init(me: mutable; Value : Real)
is deferred;
ChangeValue(me: mutable; I, J : Integer)
---C++: return &
returns Real is deferred;
Decompose(me : mutable)
---Purpose: To make a Factorization of <me>
returns Boolean
is deferred;
Solve(me; B : Vector; X : in out Vector)
---Purpose: Direct Solve of AX = B
raises NotDone from StdFail -- if <me> is not decomposed
is deferred;
Prepare(me : mutable)
---Purpose: Make Preparation to iterative solve
returns Boolean
is deferred;
Solve(me; B : Vector;
Init : Vector;
X : out Vector;
Residual : out Vector;
Tolerance : Real = 1.0e-8;
NbIterations: Integer = 50)
---Purpose: Iterative solve of AX = B
raises NotDone from StdFail -- if <me> is not prepared;
is deferred;
Multiplied(me; X: Vector; MX : in out Vector)
---Purpose: returns the product of a SparseMatrix by a vector.
-- An exception is raised if the dimensions are different
is deferred;
RowNumber(me)
---Purpose: returns the row range of a matrix.
returns Integer
is deferred;
ColNumber(me)
---Purpose: returns the column range of the matrix.
returns Integer
is deferred;
end SparseMatrix;

View File

@@ -14,4 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <FEmTool_SparseMatrix.ixx>
#include <FEmTool_SparseMatrix.hxx>
#include <Standard_Type.hxx>
#include <StdFail_NotDone.hxx>

View File

@@ -0,0 +1,90 @@
// Created on: 1997-10-29
// Created by: Roman BORISOV
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _FEmTool_SparseMatrix_HeaderFile
#define _FEmTool_SparseMatrix_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <math_Vector.hxx>
class StdFail_NotDone;
class FEmTool_SparseMatrix;
DEFINE_STANDARD_HANDLE(FEmTool_SparseMatrix, MMgt_TShared)
//! Sparse Matrix definition
class FEmTool_SparseMatrix : public MMgt_TShared
{
public:
Standard_EXPORT virtual void Init (const Standard_Real Value) = 0;
Standard_EXPORT virtual Standard_Real& ChangeValue (const Standard_Integer I, const Standard_Integer J) = 0;
//! To make a Factorization of <me>
Standard_EXPORT virtual Standard_Boolean Decompose() = 0;
//! Direct Solve of AX = B
Standard_EXPORT virtual void Solve (const math_Vector& B, math_Vector& X) const = 0;
//! Make Preparation to iterative solve
Standard_EXPORT virtual Standard_Boolean Prepare() = 0;
//! Iterative solve of AX = B
Standard_EXPORT virtual void Solve (const math_Vector& B, const math_Vector& Init, math_Vector& X, math_Vector& Residual, const Standard_Real Tolerance = 1.0e-8, const Standard_Integer NbIterations = 50) const = 0;
//! returns the product of a SparseMatrix by a vector.
//! An exception is raised if the dimensions are different
Standard_EXPORT virtual void Multiplied (const math_Vector& X, math_Vector& MX) const = 0;
//! returns the row range of a matrix.
Standard_EXPORT virtual Standard_Integer RowNumber() const = 0;
//! returns the column range of the matrix.
Standard_EXPORT virtual Standard_Integer ColNumber() const = 0;
DEFINE_STANDARD_RTTI(FEmTool_SparseMatrix,MMgt_TShared)
protected:
private:
};
#endif // _FEmTool_SparseMatrix_HeaderFile

View File

@@ -1,5 +1,23 @@
FEmTool_Assembly.cxx
FEmTool_Assembly.hxx
FEmTool_AssemblyTable.hxx
FEmTool_Curve.cxx
FEmTool_Curve.hxx
FEmTool_ElementaryCriterion.cxx
FEmTool_ElementaryCriterion.hxx
FEmTool_ElementsOfRefMatrix.cxx
FEmTool_ElementsOfRefMatrix.hxx
FEmTool_HAssemblyTable.hxx
FEmTool_ListOfVectors.hxx
FEmTool_LinearFlexion.cxx
FEmTool_LinearFlexion.hxx
FEmTool_LinearJerk.cxx
FEmTool_LinearJerk.hxx
FEmTool_LinearTension.cxx
FEmTool_LinearTension.hxx
FEmTool_ListIteratorOfListOfVectors.hxx
FEmTool_ListOfVectors.hxx
FEmTool_ProfileMatrix.cxx
FEmTool_ProfileMatrix.hxx
FEmTool_SeqOfLinConstr.hxx
FEmTool_SparseMatrix.cxx
FEmTool_SparseMatrix.hxx