Nektar++
ContField.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: ContField.cpp
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 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Python wrapper for ContField.
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
39 
40 using namespace Nektar;
41 using namespace Nektar::MultiRegions;
42 
43 std::shared_ptr<ContField1D> CreateContField1D(
46  const std::string &var)
47 {
48  return std::make_shared<ContField1D>(session, graph, var);
49 }
50 
51 std::shared_ptr<ContField2D> CreateContField2D(
54  const std::string &var,
55  const bool checkSingular)
56 {
57  return std::make_shared<ContField2D>(
58  session, graph, var, true, checkSingular);
59 }
60 
61 std::shared_ptr<ContField3D> CreateContField3D(
64  const std::string &var,
65  const bool checkSingular)
66 {
67  return std::make_shared<ContField3D>(session, graph, var, checkSingular);
68 }
69 
71 {
72  py::class_<ContField1D, py::bases<ExpList1D>, std::shared_ptr<ContField1D>>(
73  "ContField1D", py::no_init)
74  .def("__init__", py::make_constructor(
76  py::default_call_policies(),
77  (py::arg("session"), py::arg("graph"), py::arg("var"))));
78 
82 
83  py::class_<ContField2D, py::bases<ExpList2D>, std::shared_ptr<ContField2D>>(
84  "ContField2D", py::no_init)
85  .def("__init__", py::make_constructor(
87  py::default_call_policies(),
88  (py::arg("session"), py::arg("graph"), py::arg("var"),
89  py::arg("checkSingular") = true)));
90 
94 
95  py::class_<ContField3D, py::bases<ExpList3D>, std::shared_ptr<ContField3D>>(
96  "ContField3D", py::no_init)
97  .def("__init__", py::make_constructor(
99  py::default_call_policies(),
100  (py::arg("session"), py::arg("graph"), py::arg("var"),
101  py::arg("checkSingular") = true)));
102 
106 }
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
std::shared_ptr< ContField1D > CreateContField1D(const LibUtilities::SessionReaderSharedPtr &session, const SpatialDomains::MeshGraphSharedPtr &graph, const std::string &var)
Definition: ContField.cpp:43
std::shared_ptr< ContField3D > CreateContField3D(const LibUtilities::SessionReaderSharedPtr &session, const SpatialDomains::MeshGraphSharedPtr &graph, const std::string &var, const bool checkSingular)
Definition: ContField.cpp:61
void export_ContField()
Definition: ContField.cpp:70
std::shared_ptr< ContField2D > CreateContField2D(const LibUtilities::SessionReaderSharedPtr &session, const SpatialDomains::MeshGraphSharedPtr &graph, const std::string &var, const bool checkSingular)
Definition: ContField.cpp:51
#define NEKPY_SHPTR_FIX(SOURCE, TARGET)
Base class for all multi-elemental spectral/hp expansions.
Definition: ExpList.h:103
This class is the abstraction of a global continuous two- dimensional spectral/hp element expansion w...
Definition: ContField2D.h:55
Abstraction of a global continuous one-dimensional spectral/hp element expansion which approximates t...
Definition: ContField1D.h:55
This class is the abstraction of a global discontinuous two- dimensional spectral/hp element expansio...
This class is the abstraction of a one-dimensional multi-elemental expansions which is merely a colle...
Definition: ExpList1D.h:58
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Definition: ExpList2D.h:57
Abstraction of a three-dimensional multi-elemental expansion which is merely a collection of local ex...
Definition: ExpList3D.h:48
std::shared_ptr< SessionReader > SessionReaderSharedPtr