An example on how to use the eisgenerator compiled execution model.
An example on how to use the eisgenerator compiled execution model.
#include <iostream>
#include <eisgenerator/model.h>
#include <eisgenerator/log.h>
int main(int argc, char** argv)
{
eis::Model modelSweep(
"r{10~100}-r{50~1000}p{1e-3, 0.5~0.8}", 50);
std::vector<std::vector<eis::DataPoint>> data = modelSweep.
executeAllSweeps(omegaRange);
std::cout<<"Got "<<data.size()<<" sweeps with "<<data.size()*data[0].size()<<" total datapoints\n";
std::cout<<spectraSix<<'\n';
std::cout<<spectraTen<<'\n';
}
static Level level
Minimum Level required for output to be printed.
Definition log.h:56
@ WARN
Non fatal errors or problems affecting performance or numeric precision
Definition log.h:42
The main class of eisgenerator representing an equivalent circuit model.
Definition model.h:47
std::string getModelStr() const
Returns the model string corresponding to this model object, without embedded parameters.
std::string getModelStrWithParam(size_t index)
Returns the model string corresponding to this model object, with embedded parameters.
std::string getCode()
Compiles this model into efficient c++ code corresponding to the circuit of this model.
bool compile()
This function compiles the model into native vectorized code for faster execution.
std::vector< std::vector< DataPoint > > executeAllSweeps(const Range &omega)
Executes a frequency sweep with the given omega values for each parameter combination in the applied ...
A range.
Definition eistype.h:110