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
40namespace Nektar::SolverUtils
41{
42
43class CouplingFile;
44
45class CouplingFile : public Coupling
46{
47
48public:
49 static std::string className;
50
51 /// Creates an instance of this class
54 {
57 p->Init();
58 return p;
59 }
60
62
64
65protected:
66 SOLVER_UTILS_EXPORT void v_Init() override;
67
69 const int step, const NekDouble time,
71 std::vector<std::string> &varNames) override;
72
74 const int step, const NekDouble time,
76 std::vector<std::string> &varNames) override;
77
78private:
81
83};
84} // namespace Nektar::SolverUtils
85
86#endif
#define SOLVER_UTILS_EXPORT
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SessionFunctionSharedPtr m_inputFunction
Definition: CouplingFile.h:82
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) override
SOLVER_UTILS_EXPORT void v_Init() override
SOLVER_UTILS_EXPORT void v_Receive(const int step, const NekDouble time, Array< OneD, Array< OneD, NekDouble > > &field, std::vector< std::string > &varNames) override
SOLVER_UTILS_EXPORT CouplingFile(MultiRegions::ExpListSharedPtr field)
static SOLVER_UTILS_EXPORT CouplingSharedPtr create(MultiRegions::ExpListSharedPtr field)
Creates an instance of this class.
Definition: CouplingFile.h:52
SOLVER_UTILS_EXPORT ~CouplingFile() override
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
SOLVER_UTILS_EXPORT typedef std::shared_ptr< Coupling > CouplingSharedPtr
Definition: Coupling.h:45
std::shared_ptr< SessionFunction > SessionFunctionSharedPtr
double NekDouble