Block2D.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.3 $
00022 // $Date: 2003/02/14 23:01:47 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/modelbuilder/tcl/Block2D.h,v $
00024                                                                         
00025 // Written: Ed Love
00026 // Created: 07/01
00027 //
00028 // Description: This file contains the implementation of Block2D.
00029 
00030 //
00031 // What: "@(#) Block2D.h, revA"
00032 
00033 #include <math.h>
00034 #include <Vector.h>
00035 #include <Matrix.h>
00036 #include <ID.h> 
00037 
00038 class Block2D {
00039 
00040  public:
00041 
00042   //constructor
00043   Block2D(int numx, int numy, 
00044           const ID& nodeID, 
00045           const Matrix& coorArray,
00046           int numNodeElement);
00047 
00048   //destructor
00049   ~Block2D();
00050 
00051   //generate node 
00052   const Vector &getNodalCoords(int i, int j);
00053 
00054   //generate element
00055   const ID &getElementNodes(int i, int j);
00056 
00057  protected:
00058 
00059  private:
00060 
00061   int nx; //number of elements x-direction
00062 
00063   int ny; //number of elements y-direction
00064 
00065   double xl[3][9]; //block coordinates 
00066 
00067   Vector coor; //coordinates of a node
00068 
00069   ID element; //ID-array of an element
00070 
00071   //set up xl array
00072   void setUpXl(const ID &nodeID, const Matrix &coorArray);
00073   
00074   //transform to real coordiantes
00075   void transformNodalCoordinates();
00076 
00077   //shape functions
00078   void shape2d(double x1, 
00079                double x2, 
00080                double shape[9]);
00081 
00082   int numNodesElement; // 4 or 9
00083   int errorFlag;       // flag indicating if odd nx and ny ok for 9-noded elements
00084 };

Generated on Mon Oct 23 15:05:23 2006 for OpenSees by doxygen 1.5.0