Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

equation.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001 The AUTHORS 
00003  *   Romeu Andre' Pieritz, Ph.D.        - romeu_pieritz@hotmail.com
00004  *   Rafael Mendes, Eng.                – mendes_rafael@yahoo.com
00005  *   Rodrigo Ferraz de Andrade, Eng.    – rferraz@iname.com 
00006  * All rights reserved.
00007  *
00008  * Permission to use, copy and distribute this software and its
00009  * documentation for educational and personal use, without fee is hereby granted, 
00010  * provided that the above copyright notice and the following
00011  * two paragraphs appear in all copies of this software.
00012  *
00013  * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR
00014  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00015  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS
00016  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00017  *
00018  * THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES,
00019  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
00020  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HERE UNDER IS
00021  * ON AN "AS IS" BASIS, AND THE AUTHORS HAVE NO OBLIGATION TO
00022  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00023  *
00024  * SINMEC Lab. - CFD Sinflow Project - http://www.sinmec.ufsc.br/cfd
00025  */
00026 
00027 
00028 // File Define
00029 #ifndef __CSFL_MATH_EQUATION_EQUATION_H__
00030 #define __CSFL_MATH_EQUATION_EQUATION_H__
00031 
00032 
00033 // Include
00034 #include <csfl/sys/core/sflobject.h>
00035 #include <csfl/sys/core/string.h>
00036 #include <csfl/sys/container/bcond.h>
00037 #include <csfl/sys/container/param.h>
00038 #include <csfl/geom/grid/grid.h>
00039 #include <csfl/geom/metric/metric.h>
00040 #include <csfl/sys/math/array2d.h>
00041 
00042 
00043 // Namespace
00044 namespace csfl {
00045 
00046 //==============================================================================
00047 //      enum TEquationType
00048 //==============================================================================
00052 typedef
00053         enum _TEquationType {
00054                 etNULL,
00055                 etEnergy,
00056                 etMomU,
00057         etMomV,
00058                 etPres,
00059                 etMass,
00060                 etConc,
00061                 etDens,
00062                 etSHeat,
00063                 etMeshX,
00064                 etMeshY
00065         }
00066         TEquationType;
00067 
00068 //==============================================================================
00069 //              Class ICoefficient
00070 //              Description: data auxiliary class 
00071 //==============================================================================
00072 class ICoefficient 
00073 
00078 {
00079 
00080 public:
00081 
00082         static const ICoefficient zero;
00083 
00084         ICoefficient( 
00085                 double = 0.0, double = 0.0, double = 0.0, 
00086                 double = 0.0, double = 0.0, double = 0.0, 
00087                 double = 0.0, double = 0.0, double = 0.0 ) 
00088                 {}
00089 
00090         ICoefficient * operator = ( const ICoefficient & );
00091 
00092         double ap, an, as, ae, aw, ane, anw, ase, asw, b;
00093 };
00094 
00095 //==============================================================================
00096 //              Class IEquation
00097 //              Description: Base class for equation objects
00098 //==============================================================================
00099 
00100 class IEquation : 
00101         virtual public ISFLObject
00102 
00106 {
00107                 
00108 public:
00114         IEquation( 
00115                 const IString &_name,
00116                 IContainerBCond *_contBCond,
00117                 IContainerParameter *_contParam,
00118                 TEquationType _et);     
00119 
00120         IEquation( IEquation *_eq );
00121         
00122         ~IEquation();
00123 
00128         IContainerBCond * ContainerBCond() { return contBCond; }
00129         
00135     void SetContainerBCond( IContainerBCond *);
00136 
00141         IContainerParameter * ContainerParameter() { return contParam; }
00142         
00144         const IString & Name() { return name; }
00145 
00147         void SetName( const IString & _name ) { name = _name; }
00148 
00150         virtual void SetupLinearSystem() {}
00151 
00153         TEquationType ID() { return id; }
00154         
00156         void SetID( TEquationType _id ) { id = _id; }
00157 
00158         virtual ISize Size() const { return ISize( ni, nj ); } 
00159 
00160 protected:
00161         
00162         IContainerBCond         *contBCond;
00163         IContainerParameter *contParam; 
00164         IString     name;
00165         TEquationType       id;
00166 
00167         int ni, nj;
00168 
00169         virtual void SetupParameters() {}
00170 
00171 };
00172 
00173     } // csfl namespace
00174 
00175 #endif// __CSFL_MATH_EQUATION_EQUATION_H__
00176 
00177 
00178 
00179 
00180 
00181 
00182 

 

CFD Project | Documents | Downloads | Contact us | Use Terms

 

© SINMEC/EMC/UFSC, 2001.

All rights reserved.

Last Update: Jan. 18, 2002

 Webmaster