LifeV
ExporterEmpty.hpp
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 This file provides a dummy interface for post-processing
30 
31  @date 27-12-2008
32  @author Simone Deparis <simone.deparis@epfl.ch>
33 
34  @maintainer Radu Popescu <radu.popescu@epfl.ch>
35  */
36 
37 #ifndef EXPORTER_EMPTY_H
38 #define EXPORTER_EMPTY_H 1
39 
40 #include <lifev/core/filter/Exporter.hpp>
41 
42 namespace LifeV
43 {
44 
45 //! @name Class that provides a dummy interface for post-processing
46 template<typename MeshType>
47 class ExporterEmpty : public Exporter<MeshType>
48 {
49 
50 public:
51  //! @name Public typedefs
52  //@{
53  typedef MeshType mesh_Type;
54  typedef Exporter<MeshType> super;
55  typedef typename super::meshPtr_Type meshPtr_Type;
56  typedef typename super::vectorPtr_Type vectorPtr_Type;
57  typedef typename super::commPtr_Type commPtr_Type;
58 
59 
60  //@}
61 
62  //! @name Static members
63 
64  //! returns the type of the map to use for the VectorEpetra
65  static MapEpetraType const MapType;
66  //@}
67 
68  //! @name Constructors
69  //@{
70  ExporterEmpty();
71  ExporterEmpty (const GetPot& dfile, meshPtr_Type mesh, const std::string& prefix, const int& procId);
72  ExporterEmpty (const GetPot& dfile, const std::string& prefix);
73  //@}
74 
75  //! @name Public methods
76  //@{
77  void postProcess (const Real& /*time*/) {}
78  void exportPID ( meshPtr_Type /*meshPart*/, commPtr_Type /*comm*/, const bool /*binaryFormat*/ = false ) {}
80  UInt importFromTime ( const Real& /*time*/ )
81  {
82  assert (false);
83  return 0;
84  }
85  void import (const Real& /*startTime*/, const Real& /*dt*/) {}
86  void import (const Real& /*startTime*/) {}
87  //@}
88 
89  //! @name Get methods
90  //@{
91  MapEpetraType mapType() const;
92  //@}
93 
94 private:
95  //! @name Private methods
96  //@{
97  virtual void readScalar ( ExporterData<MeshType>& /*dvar*/) {}
98  virtual void readVector ( ExporterData<MeshType>& /*dvar*/) {}
99  //@}
100 
101 };
102 
103 // ======================
104 // IMPLEMENTATION
105 // ======================
106 
107 template<typename MeshType>
108 MapEpetraType const ExporterEmpty<MeshType>::MapType (Unique);
109 
110 
111 // ======================
112 // Constructors
113 // ======================
114 
115 template<typename MeshType>
117  super()
118 {
119 }
120 
121 template<typename MeshType>
122 ExporterEmpty<MeshType>::ExporterEmpty (const GetPot& dfile, meshPtr_Type mesh, const std::string& prefix,
123  const int& procId) :
124  super (dfile, prefix)
125 {
126  this->setMeshProcId (mesh, procId);
127 }
128 
129 template<typename MeshType>
130 ExporterEmpty<MeshType>::ExporterEmpty (const GetPot& dfile, const std::string& prefix) :
131  super (dfile, prefix)
132 {
133 }
134 
135 // ====================
136 // Get methods
137 // ====================
138 
139 template<typename MeshType>
141 {
142  return MapType;
143 }
144 
145 } // Namespace LifeV
146 
147 #endif // EXPORTER_EMPTY_H
super::commPtr_Type commPtr_Type
UInt importFromTime(const Real &)
Import data from previous simulations at a certain time.
void exportRegionMarkerID(std::shared_ptr< MeshType >, std::shared_ptr< Epetra_Comm >)
virtual void readScalar(ExporterData< MeshType > &)
virtual void readVector(ExporterData< MeshType > &)
super::vectorPtr_Type vectorPtr_Type
double Real
Generic real data.
Definition: LifeV.hpp:175
static MapEpetraType const MapType
returns the type of the map to use for the VectorEpetra
ExporterEmpty(const GetPot &dfile, meshPtr_Type mesh, const std::string &prefix, const int &procId)
ExporterEmpty(const GetPot &dfile, const std::string &prefix)
MapEpetraType mapType() const
returns the type of the map to use for the VectorEpetra
void import(const Real &, const Real &)
Import data from previous simulations.
super::meshPtr_Type meshPtr_Type
void postProcess(const Real &)
Post-process the variables added to the list.
Exporter< MeshType > super
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
void import(const Real &)
Read only last timestep.
void exportPID(meshPtr_Type, commPtr_Type, const bool=false)