MFEM  v3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
quadrilateral.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.googlecode.com.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 
13 #include "mesh_headers.hpp"
14 
15 namespace mfem
16 {
17 
18 const int Quadrilateral::edges[4][2] =
19 {{0, 1}, {1, 2}, {2, 3}, {3, 0}};
20 
21 Quadrilateral::Quadrilateral( const int *ind, int attr )
22  : Element(Geometry::SQUARE)
23 {
24  attribute = attr;
25  for (int i=0; i<4; i++)
26  indices[i] = ind[i];
27 }
28 
29 Quadrilateral::Quadrilateral( int ind1, int ind2, int ind3, int ind4,
30  int attr ) : Element(Geometry::SQUARE) {
31  attribute = attr;
32  indices[0] = ind1;
33  indices[1] = ind2;
34  indices[2] = ind3;
35  indices[3] = ind4;
36 }
37 
38 void Quadrilateral::SetVertices(const int *ind){
39  for(int i=0; i<4; i++)
40  indices[i] = ind[i];
41 }
42 
44  v.SetSize( 4 );
45  for (int i=0; i<4; i++)
46  v[i] = indices[i];
47 }
48 
50 
51 }
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
int attribute
Element&#39;s attribute (specifying material property, etc).
Definition: element.hpp:32
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
Definition: array.hpp:293
Class for bilinear FE on quadrilateral.
Definition: fe.hpp:384
virtual int * GetVertices()
BiLinear2DFiniteElement QuadrilateralFE
Abstract data type element.
Definition: element.hpp:27
static const int edges[4][2]