50 std::cout << std::endl <<
"Processing partition: " << part << std::endl;
55 f->m_partComm = std::shared_ptr<FieldConvertComm>(
65 int output_points_hom_z = 0,
bool error =
false,
66 bool force_output =
false,
bool no_equispaced =
false,
67 int npz = 0, std::string onlyshape =
"",
68 int part_only = 0,
int part_only_overlapping = 0,
69 bool useSessionVariables =
false,
70 bool useSessionExpansion =
false,
71 bool verbose =
false, std::string domain =
"")
76 if (py::len(argv) > 0)
88 std::make_pair(
"nparts", po::variable_value(nparts,
false)));
92 f->m_defComm = f->m_comm;
100 f->m_vm.insert(std::make_pair(
101 "output-points", po::variable_value(output_points,
false)));
104 if (output_points_hom_z)
107 std::make_pair(
"output-points-hom-z",
108 po::variable_value(output_points_hom_z,
false)));
113 f->m_vm.insert(std::make_pair(
"error", po::variable_value()));
118 f->m_vm.insert(std::make_pair(
"force-output", po::variable_value()));
124 "The doamin option in field is deprecated. Please use "
125 "the xml option range=\"xmax,xmin,ymax,ymin\", \n\t i.e."
126 "InputModule.Create(\"xml\", field, \"myfile.xml\", "
127 "range=\"-1,1,-1,1\").Run()");
132 f->m_vm.insert(std::make_pair(
"no-equispaced", po::variable_value()));
137 f->m_vm.insert(std::make_pair(
"npz", po::variable_value(npz,
false)));
140 if (onlyshape.size())
143 std::make_pair(
"onlyshape", po::variable_value(onlyshape,
false)));
149 std::make_pair(
"part-only", po::variable_value(part_only,
false)));
152 if (part_only_overlapping)
155 std::make_pair(
"part-only-overlapping",
156 po::variable_value(part_only_overlapping,
false)));
159 if (useSessionVariables)
162 std::make_pair(
"use_session_variables", po::variable_value()));
165 if (useSessionExpansion)
168 std::make_pair(
"use_session_expansion", po::variable_value()));
173 f->m_vm.insert(std::make_pair(
"verbose", po::variable_value()));
182 return f->m_fieldPts->GetPts(i);
193 f->m_fieldPts->SetPts(i, inarray);
198 py::class_<Field, std::shared_ptr<Field>>(m,
"Field")
199 .def(py::init<>(&
Field_Init), py::arg(
"argv") = py::list(),
200 py::arg(
"nparts") = 0, py::arg(
"output_points") = 0,
201 py::arg(
"output_points_hom_z") = 0, py::arg(
"error") =
false,
202 py::arg(
"force_output") =
false, py::arg(
"no_equispaced") =
false,
203 py::arg(
"npz") = 0, py::arg(
"onlyshape") =
"",
204 py::arg(
"part_only") = 0, py::arg(
"part_only_overlapping") = 0,
205 py::arg(
"use_session_variables") =
false,
206 py::arg(
"use_session_expansion") =
false,
207 py::arg(
"verbose") =
false, py::arg(
"domain") =
"")
211 .def(
"ClearField", &Field::ClearField)
213 .def(
"ReadFieldDefs", &Field::ReadFieldDefs)
215 .def(
"SetupFromExpList", &Field::SetupFromExpList)
217 .def_readwrite(
"graph", &Field::m_graph)
218 .def_readwrite(
"session", &Field::m_session)
219 .def_readwrite(
"verbose", &Field::m_verbose)
220 .def_readwrite(
"comm", &Field::m_comm);
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
void export_Field(py::module &m)
void NewPartition(FieldSharedPtr f, py::list &py_argv, int part)
void Field_SetPts(FieldSharedPtr f, const int i, const Array< OneD, const NekDouble > &inarray)
const Array< OneD, const NekDouble > Field_GetPts(FieldSharedPtr f, const int i)
FieldSharedPtr Field_Init(py::list &argv, int nparts=0, int output_points=0, int output_points_hom_z=0, bool error=false, bool force_output=false, bool no_equispaced=false, int npz=0, std::string onlyshape="", int part_only=0, int part_only_overlapping=0, bool useSessionVariables=false, bool useSessionExpansion=false, bool verbose=false, std::string domain="")
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::shared_ptr< Field > FieldSharedPtr
CommFactory & GetCommFactory()
Helper structure to construct C++ command line argc and argv variables from a Python list.
int GetArgc()
Returns the constructed argc.
char ** GetArgv()
Returns the constructed argv.