LifeV
BCInterfaceData0D.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 File containing the BCInterfaceData0D class
30  *
31  * @date 17-07-2009
32  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
33  *
34  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
35  */
36 
37 #include <lifev/bc_interface/0D/bc/BCInterfaceData0D.hpp>
38 
39 namespace LifeV
40 {
41 
42 // ===================================================
43 // Constructors
44 // ===================================================
47  M_type (),
48  M_mapType ()
49 {
50  //Set mapType
51  M_mapType["Current"] = Current;
52  M_mapType["Voltage"] = Voltage;
53 }
54 
57  M_type ( data.M_type ),
59 {
60 }
61 
62 // ===================================================
63 // Operators
64 // ===================================================
67 {
68  if ( this != &data )
69  {
70  BCInterfaceData::operator= ( data );
71  M_type = data.M_type;
72  M_mapType = data.M_mapType;
73  }
74 
75  return *this;
76 }
77 
78 // ===================================================
79 // Methods
80 // ===================================================
81 void
82 BCInterfaceData0D::readBC ( const std::string& fileName, const std::string& dataSection, const std::string& name )
83 {
84  // Call to the base class
85  dataContainer_Type::readBC ( fileName, dataSection, name );
86 
87  // Read 0D data
88  GetPot dataFile ( fileName );
89 
90  readFlag ( dataFile, ( dataSection + name + "/flag" ).c_str() );
91  readType ( dataFile, ( dataSection + name + "/type0D" ).c_str() );
92 }
93 
94 void
95 BCInterfaceData0D::showMe ( std::ostream& output ) const
96 {
97  // Call to the base class
98  dataContainer_Type::showMe ( output );
99 
100  // Show 0D data
101  output << "Type = " << M_type << std::endl;
102 }
103 
104 } // Namespace LifeV
BCInterfaceData0D & operator=(const BCInterfaceData0D &data)
Operator =.
BCInterfaceData - The BCInterface data container.
void showMe(std::ostream &output=std::cout) const
Display general information about the content of the class.
BCInterfaceData0D - The BCInterface1D data container.
void updateInverseJacobian(const UInt &iQuadPt)
void readBC(const std::string &fileName, const std::string &dataSection, const std::string &name)
Read parameters for all kind of BC.
BCInterfaceData0D(const BCInterfaceData0D &data)
Copy constructor.
BCInterfaceData()
Constructor.