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

bctype.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_BCOND_BCTYPE_H__
00030 #define __CSFL_MATH_BCOND_BCTYPE_H__
00031 
00032 
00033 // Include
00034 #include <csfl/sys/core/sflobject.h>
00035 #include <csfl/sys/math/function.h>
00036 
00037 
00038 // Namespace
00039 namespace csfl {
00040 
00041 //==============================================================================
00042 //              enum TBCType: Boundary Condition Type
00043 //==============================================================================
00044 
00048 typedef
00049         enum _TBCType {
00050                 bctNULL,
00051                 bctTemperature,             //  Temperature
00052         bctU,                       //  Velocity in the X direction
00053         bctV,                       //  Velocity in the Y direction
00054                 bctFlux,                    //  Heat Flux
00055                 bctConvection,              //  Heat Convection
00056         bctOutlet,                  //  Mass Outlet
00057                 bctInlet,                   //  Mass Inlet
00058                 bctWall,                                        //  Wall
00059                 bctOpenWall,                            //  OpenWall
00060         bctSymmetry,                //  Symmetry
00061                 bctSymmetryX,               //  Symmetric to X axis
00062                 bctSymmetryY,               //  Symmetric to Y axis 
00063                 bctPressure,                            //  Pressure
00064                 bctX,                                           //  X Coordinates 
00065                 bctY,                                           //  Y Coordinates
00066                 bctLine                                         //  X and Y Coordinates
00067         }
00068         TBCType;
00069 
00070 //==============================================================================
00071 //              Class IBCType
00072 //              Description: Base Class for Boundary Conditions' Types
00073 //==============================================================================
00074 
00075 class IBCType : 
00076         virtual public ISFLObject
00077 
00081 
00082 {
00083 
00084 public:
00085         
00091         IBCType( 
00092                 IFunction *_f = NULL,
00093                 const IString &_n = IString::empty, 
00094         TBCType _id = bctNULL );
00095 
00097         IBCType( IBCType *_bc );
00098 
00099         ~IBCType(); 
00100 
00108         virtual double Eval( double _pos )  
00109                 { return function->Eval( _pos ); }
00110 
00115         IFunction * Function() { return function; }
00116 
00122         void SetFunction( IFunction *_f ); 
00123 
00125         const IString & Name() { return name; }
00126         
00128         void SetName( const IString & _n ) { name = _n; }
00129 
00134     TBCType ID() { return id; }
00135 
00136 protected:
00137     TBCType id;
00138         IString name;
00139     IFunction *function;
00140 
00141     void AllocFunction( IFunction * );
00142 };
00143 } // csfl namespace
00144 
00145 #endif// __CSFL_MATH_BCOND_BCTYPE_H__
00146 

 

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

 

© SINMEC/EMC/UFSC, 2001.

All rights reserved.

Last Update: Jan. 18, 2002

 Webmaster