Nektar++
CouplingFile.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File CouplingFile.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2017 Kilian Lackhove
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining a
12 // copy of this software and associated documentation files (the "Software"),
13 // to deal in the Software without restriction, including without limitation
14 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 // and/or sell copies of the Software, and to permit persons to whom the
16 // Software is furnished to do so, subject to the following conditions:
17 //
18 // The above copyright notice and this permission notice shall be included
19 // in all copies or substantial portions of the Software.
20 //
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 // DEALINGS IN THE SOFTWARE.
28 //
29 // Description: File based Coupling class. Rather pointless, only for
30 // demonstration.
31 //
32 ///////////////////////////////////////////////////////////////////////////////
33 
34 #ifndef NEKTAR_COUPLINGFILE
35 #define NEKTAR_COUPLINGFILE
36 
39 
40 namespace Nektar
41 {
42 namespace SolverUtils
43 {
44 
45 class CouplingFile;
46 
47 class CouplingFile : public Coupling
48 {
49 
50 public:
51  static std::string className;
52 
53  /// Creates an instance of this class
56  {
59  p->Init();
60  return p;
61  }
62 
64 
66 
67 protected:
68  SOLVER_UTILS_EXPORT virtual void v_Init();
69 
70  SOLVER_UTILS_EXPORT virtual void v_Send(
71  const int step,
72  const NekDouble time,
73  const Array<OneD, const Array<OneD, NekDouble> > &field,
74  std::vector<std::string> &varNames);
75 
76  SOLVER_UTILS_EXPORT virtual void v_Receive(
77  const int step,
78  const NekDouble time,
80  std::vector<std::string> &varNames);
81 
82 private:
85 
87 };
88 }
89 }
90 
91 #endif
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static SOLVER_UTILS_EXPORT CouplingSharedPtr create(MultiRegions::ExpListSharedPtr field)
Creates an instance of this class.
Definition: CouplingFile.h:54
virtual SOLVER_UTILS_EXPORT ~CouplingFile()
SOLVER_UTILS_EXPORT CouplingFile(MultiRegions::ExpListSharedPtr field)
SessionFunctionSharedPtr m_inputFunction
Definition: CouplingFile.h:86
virtual SOLVER_UTILS_EXPORT void v_Send(const int step, const NekDouble time, const Array< OneD, const Array< OneD, NekDouble > > &field, std::vector< std::string > &varNames)
virtual SOLVER_UTILS_EXPORT void v_Receive(const int step, const NekDouble time, Array< OneD, Array< OneD, NekDouble > > &field, std::vector< std::string > &varNames)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
double NekDouble
SOLVER_UTILS_EXPORT typedef std::shared_ptr< Coupling > CouplingSharedPtr
Definition: Coupling.h:45
virtual SOLVER_UTILS_EXPORT void v_Init()
#define SOLVER_UTILS_EXPORT
std::shared_ptr< SessionFunction > SessionFunctionSharedPtr