Commit dedebdfb authored by Markus Mirz's avatar Markus Mirz
Browse files

update shmem examples

parent eaf0a037
......@@ -60,9 +60,12 @@ int main(int argc, char *argv[]) {
auto n1 = Node::make("n1");
// Components
auto ecs = CurrentSource::make("v_intf", Complex(10, 0));
auto r1 = Resistor::make("r_1", 1);
auto load = PQLoadCS::make("load_cs", 10., 0., 10.);
auto ecs = CurrentSource::make("v_intf");
ecs->setParameters(Complex(10, 0));
auto r1 = Resistor::make("r_1");
r1->setParameters(1);
auto load = PQLoadCS::make("load_cs");
load->setParameters(10., 0., 10.);
ecs->connect({ Node::GND, n1 });
r1->connect({ Node::GND, n1 });
......
......@@ -45,8 +45,10 @@ int main(int argc, char *argv[]) {
auto n1 = Node::make("n1");
// Components
auto ecs = CurrentSource::make("v_intf", Complex(10, 0));
auto r1 = Resistor::make("r_1", 1);
auto ecs = CurrentSource::make("v_intf");
ecs->setParameters(Complex(10, 0));
auto r1 = Resistor::make("r_1");
r1->setParameters(1);
ecs->connect({ Node::GND, n1 });
r1->connect({ Node::GND, n1 });
......
......@@ -67,10 +67,11 @@ int main(int argc, char *argv[]) {
// Components
auto evs = VoltageSource::make("v_intf", Logger::Level::DEBUG);
auto vs1 = VoltageSource::make("vs_1", Logger::Level::DEBUG);
auto r01 = Resistor::make("r_0_1", 1, Logger::Level::DEBUG);
auto r01 = Resistor::make("r_0_1", Logger::Level::DEBUG);
evs->setParameters(Complex(5, 0));
vs1->setParameters(Complex(10, 0));
r01->setParameters(1);
evs->connect({ Node::GND, n2 });
vs1->connect({ Node::GND, n1 });
......@@ -90,8 +91,10 @@ int main(int argc, char *argv[]) {
auto n1 = Node::make("n1");
// Components
auto ecs = CurrentSource::make("i_intf", Complex(5, 0), Logger::Level::DEBUG);
auto rgnd0 = Resistor::make("r_gnd_0", 1, Logger::Level::DEBUG);
auto ecs = CurrentSource::make("i_intf", Logger::Level::DEBUG);
ecs->setParameters(Complex(5, 0));
auto rgnd0 = Resistor::make("r_gnd_0", Logger::Level::DEBUG);
rgnd0->setParameters(1);
ecs->connect({ Node::GND, n1 });
rgnd0->connect({ Node::GND, n1 });
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment