MFEM
v3.1
Finite element discretization library
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
mesh
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.org.
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
{
27
indices
[i] = ind[i];
28
}
29
}
30
31
Quadrilateral::Quadrilateral
(
int
ind1,
int
ind2,
int
ind3,
int
ind4,
32
int
attr ) :
Element
(
Geometry
::SQUARE)
33
{
34
attribute
= attr;
35
indices
[0] = ind1;
36
indices
[1] = ind2;
37
indices
[2] = ind3;
38
indices
[3] = ind4;
39
}
40
41
void
Quadrilateral::SetVertices
(
const
int
*ind)
42
{
43
for
(
int
i=0; i<4; i++)
44
{
45
indices
[i] = ind[i];
46
}
47
}
48
49
void
Quadrilateral::GetVertices
(
Array<int>
&v )
const
50
{
51
v.
SetSize
( 4 );
52
for
(
int
i=0; i<4; i++)
53
{
54
v[i] =
indices
[i];
55
}
56
}
57
58
BiLinear2DFiniteElement
QuadrilateralFE
;
59
60
}
mfem::Quadrilateral::Quadrilateral
Quadrilateral()
Definition:
quadrilateral.hpp:30
mfem::Quadrilateral::indices
int indices[4]
Definition:
quadrilateral.hpp:25
mfem::Array< int >
mesh_headers.hpp
mfem::Quadrilateral::SetVertices
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
Definition:
quadrilateral.cpp:41
mfem::Element::attribute
int attribute
Element's attribute (specifying material property, etc).
Definition:
element.hpp:32
mfem::Array::SetSize
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
Definition:
array.hpp:323
mfem::BiLinear2DFiniteElement
Class for bilinear FE on quadrilateral.
Definition:
fe.hpp:396
mfem::Quadrilateral::GetVertices
virtual int * GetVertices()
Definition:
quadrilateral.hpp:47
mfem::Geometry
Definition:
geom.hpp:29
mfem::QuadrilateralFE
BiLinear2DFiniteElement QuadrilateralFE
Definition:
quadrilateral.cpp:58
mfem::Element
Abstract data type element.
Definition:
element.hpp:27
mfem::Quadrilateral::edges
static const int edges[4][2]
Definition:
quadrilateral.hpp:26
Generated on Fri Feb 18 2022 18:59:18 for MFEM by
1.8.5