MFEM v2.0
quadrilateral.cpp
Go to the documentation of this file.
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
00003 // reserved. See file COPYRIGHT for details.
00004 //
00005 // This file is part of the MFEM library. For more information and source code
00006 // availability see http://mfem.googlecode.com.
00007 //
00008 // MFEM is free software; you can redistribute it and/or modify it under the
00009 // terms of the GNU Lesser General Public License (as published by the Free
00010 // Software Foundation) version 2.1 dated February 1999.
00011 
00012 
00013 #include "mesh_headers.hpp"
00014 
00015 const int Quadrilateral::edges[4][2] =
00016 {{0, 1}, {1, 2}, {2, 3}, {3, 0}};
00017 
00018 Quadrilateral::Quadrilateral( const int *ind, int attr )
00019    : Element(Geometry::SQUARE)
00020 {
00021    attribute = attr;
00022    for (int i=0; i<4; i++)
00023       indices[i] = ind[i];
00024 }
00025 
00026 Quadrilateral::Quadrilateral( int ind1, int ind2, int ind3, int ind4,
00027                               int attr ) : Element(Geometry::SQUARE) {
00028    attribute  = attr;
00029    indices[0] = ind1;
00030    indices[1] = ind2;
00031    indices[2] = ind3;
00032    indices[3] = ind4;
00033 }
00034 
00035 void Quadrilateral::SetVertices(const int *ind){
00036    for(int i=0; i<4; i++)
00037       indices[i] = ind[i];
00038 }
00039 
00040 void Quadrilateral::GetVertices( Array<int> &v ) const {
00041    v.SetSize( 4 );
00042    for (int i=0; i<4; i++)
00043       v[i] = indices[i];
00044 }
00045 
00046 BiLinear2DFiniteElement QuadrilateralFE;
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines