BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_ElectricalCircuitFactory.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_ELECTRICALCIRCUITFACTORY_HPP
13#define BELFEM_CL_ELECTRICALCIRCUITFACTORY_HPP
14
15#include <memory>
16
17#include "typedefs.hpp"
18
19#include "cl_InputFile.hpp"
22
23namespace belfem
24{
25 namespace electronics
26 {
27//-----------------------------------------------------------------------------
35 {
36
37 const proc_t mCommRank ;
38
41 std::unique_ptr< const InputFile > mInputFile ;
42
43 Cell < fem::PhysicalBoundaryCondition * > & mPhysicalBoundaryConditions ;
44
45 std::unique_ptr< ElectricalCircuit > mCircuit ;
46
47//-----------------------------------------------------------------------------
48
49 public:
50
51 ElectricalCircuitFactory( const string & aInputFile, Cell< fem::PhysicalBoundaryCondition * > & aPhysicalBoundaryConditions ) ;
52
54
55//-----------------------------------------------------------------------------
56
57 void
58 read_circuit( const input::Section * aSection ) ;
59
60//-----------------------------------------------------------------------------
61
62 Circuit *
63 circuit() ;
64
65//-----------------------------------------------------------------------------
66
67 private:
68
69//-----------------------------------------------------------------------------
70
76 void
77 read_circuit_from_netlist( const input::Section * aSection ) ;
78
83 void
84 read_terminal_pair( const input::Section * aComponentSection,
85 const id_t aSectionIndex,
86 const index_t aNodePlus,
87 const index_t aNodeMinus,
88 const string & aLabel,
89 uint & aCount ) ;
90
95 void
96 read_output( const input::Section * aSection,
97 const class NgspiceCircuitFactory * aNetlist ) ;
98
99//-----------------------------------------------------------------------------
100
101 };
102 }
103}
104
105#endif //BELFEM_CL_ELECTRICALCIRCUITFACTORY_HPP
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Definition cl_Circuit.hpp:20
void read_circuit(const input::Section *aSection)
Definition cl_ElectricalCircuitFactory.cpp:61
ElectricalCircuitFactory(const string &aInputFile, Cell< fem::PhysicalBoundaryCondition * > &aPhysicalBoundaryConditions)
Definition cl_ElectricalCircuitFactory.cpp:27
Circuit * circuit()
Definition cl_ElectricalCircuitFactory.cpp:830
Builds an ElectricalCircuit from a lexed netlist ( todo/ngspice_parser_plan.md ยง9....
Definition cl_NgspiceCircuitFactory.hpp:76
One hierarchical section of a configuration file.
Definition cl_Input_Section.hpp:34
Definition cl_Capacitor.cpp:18
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
unsigned int id_t
Definition typedefs.hpp:41
int proc_t
Definition commtypes.hpp:29
uint32_t index_t
Definition typedefs.hpp:52