Break the comments to be mostly 80 chars wide, with a 100 char ceiling (mostly, probably missed some).

No actual code modification yet, only whitespace.
这个提交包含在:
fake-name
2017-04-25 16:40:55 -07:00
父节点 857e5ce55e
当前提交 6b36b597bd
共有 21 个文件被更改,包括 1197 次插入165 次删除

查看文件

@@ -69,7 +69,10 @@ class Source(object):
class VoltageSource(Source):
"""A voltage source can be a hard source if it's resistance is zero, i.e. the time variation of the specified electric field component is prescribed. If it's resistance is non-zero it behaves as a resistive voltage source."""
"""
A voltage source can be a hard source if it's resistance is zero, i.e. the
time variation of the specified electric field component is prescribed.
If it's resistance is non-zero it behaves as a resistive voltage source."""
def __init__(self):
super().__init__()
@@ -111,7 +114,9 @@ class VoltageSource(Source):
Ez[i, j, k] = -1 * self.waveformvaluesJ[iteration] / G.dz
def create_material(self, G):
"""Create a new material at the voltage source location that adds the voltage source conductivity to the underlying parameters.
"""
Create a new material at the voltage source location that adds the
voltage source conductivity to the underlying parameters.
Args:
G (class): Grid class instance - holds essential parameters describing the model.
@@ -211,7 +216,10 @@ class MagneticDipole(Source):
class TransmissionLine(Source):
"""A transmission line source is a one-dimensional transmission line which is attached virtually to a grid cell."""
"""
A transmission line source is a one-dimensional transmission
line which is attached virtually to a grid cell.
"""
def __init__(self, G):
"""
@@ -226,10 +234,12 @@ class TransmissionLine(Source):
self.abcv0 = 0
self.abcv1 = 0
# Spatial step of transmission line (N.B if the magic time step is used it results in instabilities for certain impedances)
# Spatial step of transmission line (N.B if the magic time step is
# used it results in instabilities for certain impedances)
self.dl = np.sqrt(3) * c * G.dt
# Number of cells in the transmission line (initially a long line to calculate incident voltage and current); consider putting ABCs/PML at end
# Number of cells in the transmission line (initially a long line to
# calculate incident voltage and current); consider putting ABCs/PML at end
self.nl = round_value(0.667 * G.iterations)
# Cell position of the one-way injector excitation in the transmission line
@@ -246,7 +256,9 @@ class TransmissionLine(Source):
self.Itotal = np.zeros(G.iterations, dtype=floattype)
def calculate_incident_V_I(self, G):
"""Calculates the incident voltage and current with a long length transmission line not connected to the main grid from: http://dx.doi.org/10.1002/mop.10415
"""
Calculates the incident voltage and current with a long length
transmission line not connected to the main grid from: http://dx.doi.org/10.1002/mop.10415
Args:
G (class): Grid class instance - holds essential parameters describing the model.