Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FilterMovingBody.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File FilterMovingBody.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Outputs values at specific points during time-stepping.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_INCNAVIERSTOKES_FILTERS_FILTERMOVINGBODY_H
37 #define NEKTAR_INCNAVIERSTOKES_FILTERS_FILTERMOVINGBODY_H
38 
42 
43 namespace Nektar
44 {
46 
47 typedef boost::shared_ptr<FilterMovingBody> FilterMovingBodySharedPtr;
48 typedef std::map<std::string, std::string> FilterParams;
49 typedef std::pair<std::string, FilterParams> FilterMap;
50 
52 {
53  public:
55 
56  /// Creates an instance of this class
59  const ParamMap &pParams) {
61  ::AllocateSharedPtr(pSession, pParams);
62  return p;
63  }
64 
65  static std::string className;
66 
69  const ParamMap &pParams);
71 
72  virtual void v_Initialise(
74  const NekDouble &time);
75 
76  virtual void v_Update(
78  const NekDouble &time) {}
79 
80  void UpdateForce(
83  Array<OneD, NekDouble> &Aeroforces,
84  const NekDouble &time);
85 
86  void UpdateMotion(
89  Array<OneD, NekDouble> &MotionVars,
90  const NekDouble &time);
91 
92  virtual void v_Finalise(
94  const NekDouble &time);
95 
96  virtual bool v_IsTimeDependent();
97 
98  private:
100 
101  /// ID's of boundary regions where we want the forces
102  vector<unsigned int> m_boundaryRegionsIdList;
103  /// Determines if a given Boundary Region is in
104  /// m_boundaryRegionsIdList
106  unsigned int m_index_f;
107  unsigned int m_index_m;
108  unsigned int m_outputFrequency;
109  /// plane to take history point from if using a homogeneous1D
110  /// expansion
111  unsigned int m_outputPlane;
114  std::string m_BoundaryString;
115  /// number of planes for homogeneous1D expansion
116  int m_planes;
118  std::string m_outputFile_fce;
119  std::string m_outputFile_mot;
120 };
121 
122 }
123 
124 #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */
unsigned int m_outputPlane
plane to take history point from if using a homogeneous1D expansion
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
Array< OneD, std::ofstream > m_outputStream
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
LibUtilities::SessionReaderSharedPtr m_session
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
boost::shared_ptr< FilterMovingBody > FilterMovingBodySharedPtr
static SolverUtils::FilterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const ParamMap &pParams)
Creates an instance of this class.
virtual void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
void UpdateMotion(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, Array< OneD, NekDouble > &MotionVars, const NekDouble &time)
static std::string className
virtual void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
vector< unsigned int > m_boundaryRegionsIdList
ID's of boundary regions where we want the forces.
LibUtilities::BasisSharedPtr m_homogeneousBasis
std::map< std::string, std::string > FilterParams
boost::shared_ptr< Filter > FilterSharedPtr
A shared pointer to a Driver object.
Definition: Filter.h:50
double NekDouble
std::map< std::string, std::string > ParamMap
Definition: Filter.h:67
vector< bool > m_boundaryRegionIsInList
Determines if a given Boundary Region is in m_boundaryRegionsIdList.
void UpdateForce(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, Array< OneD, NekDouble > &Aeroforces, const NekDouble &time)
FilterMovingBody(const LibUtilities::SessionReaderSharedPtr &pSession, const ParamMap &pParams)
boost::shared_ptr< Basis > BasisSharedPtr
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
int m_planes
number of planes for homogeneous1D expansion
std::pair< std::string, FilterParams > FilterMap