BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Circuit.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_CIRCUIT_HPP
13
#define BELFEM_CL_CIRCUIT_HPP
14
#include "
typedefs.hpp
"
15
#include "
hdf5_types.hpp
"
16
17
namespace
belfem
18
{
19
class
Circuit
20
{
21
public
:
22
23
Circuit
() = default ;
24
virtual
~Circuit
() = default ;
25
26
// NON-COPYABLE, NON-MOVABLE. The base owns nothing itself and is
27
// abstract, so it cannot be sliced into a value. This is not what
28
// repairs the ElectricalCircuit double free -- the deletes on the
29
// derived class do that. It buys one narrower thing: a future
30
// subclass that owns allocations cannot stay IMPLICITLY copyable
31
// by forgetting to declare its own. A hand-written copy
32
// constructor that default-initializes this base is still
33
// possible, and is still that subclass's problem
34
Circuit
(
const
Circuit
& ) = delete ;
35
Circuit
(
Circuit
&& ) = delete ;
36
Circuit
&
operator=
(
const
Circuit
& ) = delete ;
37
Circuit
&
operator=
(
Circuit
&& ) = delete ;
38
39
virtual
void
40
set_timestep
(
const
real
aTimestep ) = 0 ;
41
42
virtual
void
43
set_omega
(
const
real
aOmega ) = 0 ;
44
45
virtual
void
46
compute_jacobian_and_rhs
() = 0 ;
47
48
virtual
void
49
compute_MNA_matrix
() = 0 ;
50
51
virtual
void
52
shift
() = 0 ;
53
54
virtual
void
55
shift_back
() = 0 ;
56
57
virtual
void
58
solve
() = 0 ;
59
60
virtual
real
61
residual
()
const
= 0 ;
62
63
virtual
real
64
current
(
const
index_t
aIndex )
const
= 0 ;
65
66
virtual
real
67
voltage
(
const
index_t
aIndex )
const
= 0 ;
68
69
virtual
void
70
set_current_and_voltage
(
const
index_t
aIndex,
const
real
aI,
const
real
aV ) = 0 ;
71
72
virtual
void
73
save_timestep
() = 0 ;
74
75
virtual
void
76
save_state
(
hid_t
aFile ) = 0 ;
77
78
virtual
void
79
load_state
(
hid_t
aFile ) = 0 ;
80
81
};
82
}
83
#endif
// BELFEM_CL_CIRCUIT_HPP
belfem::Circuit::save_timestep
virtual void save_timestep()=0
belfem::Circuit::solve
virtual void solve()=0
belfem::Circuit::Circuit
Circuit(const Circuit &)=delete
belfem::Circuit::set_current_and_voltage
virtual void set_current_and_voltage(const index_t aIndex, const real aI, const real aV)=0
belfem::Circuit::operator=
Circuit & operator=(Circuit &&)=delete
belfem::Circuit::save_state
virtual void save_state(hid_t aFile)=0
belfem::Circuit::Circuit
Circuit(Circuit &&)=delete
belfem::Circuit::voltage
virtual real voltage(const index_t aIndex) const =0
belfem::Circuit::residual
virtual real residual() const =0
belfem::Circuit::compute_MNA_matrix
virtual void compute_MNA_matrix()=0
belfem::Circuit::shift_back
virtual void shift_back()=0
belfem::Circuit::operator=
Circuit & operator=(const Circuit &)=delete
belfem::Circuit::load_state
virtual void load_state(hid_t aFile)=0
belfem::Circuit::set_timestep
virtual void set_timestep(const real aTimestep)=0
belfem::Circuit::set_omega
virtual void set_omega(const real aOmega)=0
belfem::Circuit::compute_jacobian_and_rhs
virtual void compute_jacobian_and_rhs()=0
belfem::Circuit::Circuit
Circuit()=default
belfem::Circuit::current
virtual real current(const index_t aIndex) const =0
belfem::Circuit::~Circuit
virtual ~Circuit()=default
belfem::Circuit::shift
virtual void shift()=0
hdf5_types.hpp
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::hid_t
int hid_t
Definition
hdf5_types.hpp:20
belfem::index_t
uint32_t index_t
Definition
typedefs.hpp:52
belfem::real
double real
Definition
typedefs.hpp:36
typedefs.hpp
src
numerics
sources
cl_Circuit.hpp
Generated by
1.18.0