Skip to content

Commit 3c161c3

Browse files
committed
add more details to SimpleTrap example
1 parent 8ec807a commit 3c161c3

16 files changed

+319
-48
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ in the terminal. Remote execution on Berkeley HPC (Savio) requires running
212212
sbatch saviojob.sh
213213
```
214214

215-
The data will be saved as VTK files. The file named as ```<prefix>_<electrode name>.vtk``` stores potential, field (RF only), and field square (RF only). The file named as ```<prefix>_<electrode name>_mesh.vtk``` stores the charge distribution, and the final mesh after adaptive mesh during simulation.
215+
The data will be saved as VTK files. The file named as ```<prefix>_<electrode_name>.vtk``` stores potential, field (RF only), and field square (RF only). The file named as ```<prefix>_<electrode_name>_mesh.vtk``` stores the charge distribution, and the final mesh after adaptive mesh during simulation.
216216

217217
### 4. Result analysis <div id='id-6'/>
218218

219219
Lastly, after we get the results, we can visualize the result by simply calling
220220
```
221-
Result.view(prefix, '<electrode name>')
221+
Result.view(prefix, '<electrode_name>')
222222
```
223223
For example, if we want to visualize the field square of the SimpleTrap's RF electrode, we can simply call ```Result.view(prefix, 'RF')``` in the same folder as the result VTK files. Here is the visualization example
224224

bem/area_constraints.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ def __init__(self, start, end, radius, *a, **k):
3434

3535
def lookup(self, x):
3636
# http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html
37-
print((self.start-x).shape)
3837
d = np.linalg.norm(np.cross(self.start-x, self.end-x), axis=1)/np.linalg.norm(self.end-self.start)
3938
dmax = np.sqrt(np.linalg.norm(self.start-self.end)**2 + self.radius**2)
4039
dx1 = np.linalg.norm(self.start - x, axis=1)
4140
dx2 = np.linalg.norm(self.end - x, axis=1)
4241
# return np.where((d<self.radius), self.inside, self.outside)
4342
return np.where((d<self.radius)&(dx1<dmax)&(dx2<dmax), self.inside, self.outside)
44-
# FIXME: cylinder has infinite length
4543

4644
class Box(Constraint):
4745
def __init__(self, start=None, center=None, diagonal=None, end=None,

examples/SimpleTrap/SimpleTrap.ipynb

Lines changed: 317 additions & 44 deletions
Large diffs are not rendered by default.
0 Bytes
Binary file not shown.
-5.26 KB
Binary file not shown.
0 Bytes
Binary file not shown.
-2.48 KB
Binary file not shown.
0 Bytes
Binary file not shown.
-3.72 KB
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)