LifeV
MeshVertex.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief Zero dimensional entity
30 
31  @author Luca Formaggia <luca.formaggia@polimi.it>
32  @contributor Marta D'Elia <mdelia2@mathcs.emory.edu>
33  @maintainer Marta D'Elia <mdelia2@mathcs.emory.edu>
34 
35  @date 00-00-0000
36 
37 */
38 
39 #include <lifev/core/mesh/MeshVertex.hpp>
40 #include <lifev/core/LifeV.hpp>
41 
42 namespace LifeV
43 {
44 
45 
46 // ==========================================
47 // Constructor & Destructor
48 // ==========================================
50 {
51 }
52 
53 MeshVertex::MeshVertex ( ID identity, bool boundary )
54  : MeshEntity ( identity, boundary ), M_coordinates()
55 {
56 }
57 
58 MeshVertex::MeshVertex ( ID identity, Real x, Real y, Real z, bool boundary )
59  : MeshEntity ( identity, boundary ), M_coordinates ( x, y, z )
60 {
61 }
62 
63 // ==========================================
64 // Operators
65 // ==========================================
66 
67 
68 // ==========================================
69 // Methods
70 // ==========================================
71 std::ostream&
72 MeshVertex::showMe ( bool verbose, std::ostream& out ) const
73 {
74  out.setf ( std::ios::scientific, std::ios::floatfield );
75  out << "----- MeshVertex object -----" << std::endl;
76  if ( verbose )
77  {
78  UInt i;
79  out << " Coordinates:" << std::endl;
80  Real const* coordinateVector = coordinatesArray();
81  for ( i = 0; i < nDimensions - 1; i++ )
82  {
83  out << coordinateVector[ i ] << ", ";
84  }
85  out << coordinateVector[ i ] << std::endl << std::endl;
86  }
88 
89  out << "----- END OF MeshVertex data ---" << std::endl << std::endl;
90  return out;
91 }
92 
93 }
This is the base class to store basic properties of any mesh entity.
Definition: MeshEntity.hpp:97
MeshEntity(const ID &id, const bool &boundary)
backward-compatible constructor
Definition: MeshEntity.hpp:148
Real const * coordinatesArray() const
Returns the pointer to the coordinates vector.
Definition: MeshVertex.hpp:121
MeshVertex - Zero dimensional entity.
Definition: MeshVertex.hpp:59
MeshVertex(ID identity, bool boundary=false)
Declares item identity and states if it is on boundary.
Definition: MeshVertex.cpp:53
void updateInverseJacobian(const UInt &iQuadPt)
void showMe(std::ostream &output=std::cout) const
Displays the informations stored by this class.
Definition: MeshEntity.cpp:39
std::ostream & showMe(bool Verbose=false, std::ostream &coordinateVector=std::cout) const
Display general information about the content of the class.
Definition: MeshVertex.cpp:72
uint32_type ID
IDs.
Definition: LifeV.hpp:194
MeshVertex()
Empty Constructor.
Definition: MeshVertex.cpp:49
double Real
Generic real data.
Definition: LifeV.hpp:175
Vector3D M_coordinates
Definition: MeshVertex.hpp:219
const UInt nDimensions(NDIM)
MeshVertex(ID identity, Real x, Real y, Real z, bool boundary=false)
Declares item identity, provides coordinate and states if it is on boundary.
Definition: MeshVertex.cpp:58
VectorSmall()
Empty constructor (all components are set to zero)
VectorSmall(Real const &x, Real const &y, Real const &z)
Full constructor with all components explicitly initialized.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191