![]() |
Dune-Fufem 2.11-git
|
Loading...
Searching...
No Matches
common.hh
Go to the documentation of this file.
74 DUNE_THROW(Dune::Exception, "Conversion from C type " << typeid(T).name() << " not implemented");
553template<class Signature, template<class> class DerivativeTraits = Dune::Functions::DefaultDerivativeTraits>
571template<class Signature, template<class> class DerivativeTraits = Dune::Functions::DefaultDerivativeTraits, class... R>
575 auto derivativeSignatureTags = Dune::Functions::derivativeSignatureTags<sizeof...(f)-1>(signatureTag);
const char * name()
auto derivativeSignatureTags(Dune::Functions::SignatureTag< Signature, DerivativeTraits > tag)
int size() const
void message(const std::string &msg)
#define DUNE_THROW(E,...)
Definition callable.hh:34
void run(const std::string &code)
Run python code given as string.
Definition common.hh:223
Reference iter(const Reference &seq)
Get iterator of iterable object.
Definition common.hh:406
Module import(const std::string &moduleName)
Import python module given by name.
Definition common.hh:160
Reference keys(const Reference &dict)
Get keys of python dictionary.
Definition common.hh:543
Module::AutoRunCodeStream runStream()
Obtain a stream to feed the code with multiple lines of python code.
Definition common.hh:270
bool isCallable(const Reference &ref)
Check if python object is callable.
Definition common.hh:532
void handlePythonError(const std::string &origin, const std::string &message)
If a python error occurred throw an exception and clear python error indicator.
Definition common.hh:589
bool isSequence(const Reference &ref)
Check if python object is some sequence.
Definition common.hh:499
void runFile(const std::string &fileName)
Run python code in file given by name.
Definition common.hh:299
Module createModule(const std::string &moduleName)
Create python module given by name.
Definition common.hh:182
bool isDict(const Reference &ref)
Check if python object is a dictionary.
Definition common.hh:510
Reference makeObject(const T &t)
Create python object from C++ object.
Definition common.hh:351
bool isModule(const Reference &)
Check if python object is a module.
Definition common.hh:521
void setItem(Reference &seq, int i, const V &v)
Set item of sequence.
Definition common.hh:471
Reference getItem(const Reference &seq, int i)
Get item of sequence.
Definition common.hh:437
Reference next(const Reference &iter)
Get next item from iterator.
Definition common.hh:421
Reference evaluate(const std::string &expression)
Evaluate python expression given as string.
Definition common.hh:331
auto makeDifferentiableFunction(const R &... f)
Create a callable differentiable function for given signature.
Definition common.hh:572
auto makeFunction(const Reference &f)
Create a callable function for given signature.
Definition common.hh:554
Reference evaluate(const std::string &expression)
Evaluate python expression given as string.
Definition module.hh:245
A stream that executed all python code it is fed with on destruction.
Definition module.hh:61
void set(const std::string &name, const V &value)
Set attribute of given name.
Definition reference.hh:258
T apply(T... args)
T c_str(T... args)
T endl(T... args)
