Patch Antenna#

We now apply a refined mesh for the patch antenna. Because the electromagnetic fields change rapidly near the metallic patch and the substrate edges, we increase the mesh density in these areas to ensure high simulation accuracy for resonance and radiation patterns.

import gmsh
import math

from palacetoolkit.plot_farfield import load_data, polar_plots, three_d_plot
from palacetoolkit.postpro import s_params
from palacetoolkit.simulation import generate_palace_config_from_entities
from palacetoolkit.viz import view_mesh
from palacetoolkit.mesh import (
    Entity, 
    run_meshing_pipeline, 
    generate_3d_mesh, 
    refine_near_surfaces
)

Parameters:#

  • l : Patch length along x-axis, specified as a scalar in meters.

  • w : Patch width along y-axis, specified as a scalar in meters.

  • h : Patch height along z-axis, specified as a scalar in meters.

  • l1 : Ground plane length along x-axis, specified as a scalar in meters

  • w1 : Ground plane width along y-axis, specified as a scalar in meters

  • l2 : Notch length along x-axis, specified as a scalar in meters.

  • w2 : Notch width along x-axis, specified as a scalar in meters.

  • w3 : Strip line width along y-axis, specified as a scalar in meters.

  • airsphere_radius : Air sphere radius, specified as a scalar in meters.

  • freq : Simulation frequency in GHz, specified as a scalar.

  • filename : Output mesh filename, specified as a string.

  • eps_r: relative permittivity of the substrate

  • loss_tan: loss tangent of the substrate

  • port_impedance: characteristic impedance of the lumped port (Ohms)

# Patch
l: float = 0.030
w: float = 0.029

# Ground plane
l1: float = 0.06
w1: float = 0.06

# Notch
l2: float = 0.008
w2: float = 0.003

# Feed line
w3: float = 0.002

# Substrate
h: float = 0.0013

freq: float = 3.3
eps_r: float = 2.2
loss_tan: float = 0.0009
mu_r = 1.0
port_impedance: float = 50.0
wavelength = 3e8 / (freq * 1e9)

# Air sphere
airsphere_radius: float = wavelength

# Filename where the mesh is loadeds
filename = "patch_antenna.msh"

Initialize the model#

gmsh.initialize()
gmsh.model.add("patch_antenna")
kernel = gmsh.model.occ

Geometry Construction#

In this step, we build the physical structure of the patch antenna. We define the substrate, the metallic ground plane, and the antenna patch itself.

Patch Design: We combine the main patch and the feed line, including an inset to help with impedance matching. Excitation: A lumped port is created and positioned to feed the antenna. Domain Setup: We enclose the entire structure in an “air sphere,” which defines the simulation region (the radiation space). Finalizing: We use boolean operations (fragmenting) to ensure all components are properly connected and recognized as a single cohesive model by the solver.

substrate = kernel.addBox(-l1/2, -w1/2, 0, l1, w1, h)

# Ground plane
ground_plane = kernel.addRectangle(-l1/2, -w1/2, 0, l1, w1)

# Patch definition
main_patch = kernel.addRectangle(-l/2, -w/2, h, l, w)
inset = kernel.addRectangle(-l/2, -w2/2, h, l2, w2)

patch_dimtags, _ = kernel.cut(
    [(2, main_patch)], 
    [(2, inset)], 
    removeObject=True, removeTool=True
)
kernel.synchronize()

feed_length = (l1 - l)/2 + l2
feed_line = kernel.addRectangle(-l1/2, -w3/2, h, feed_length, w3)

# Our patch
top_conductor, _ = kernel.fuse(
    patch_dimtags, [(2, feed_line)],
    removeObject=True, removeTool=True
)
kernel.synchronize()

# Gap bewteen the gropund plane and the bottom of the lumped port.
lumped_port = kernel.addRectangle(-l1/2, -w3/2, 0, h, w3)
kernel.rotate([(2, lumped_port)], -l1/2, 0, 0, 0, 1, 0, -math.pi/2)
kernel.synchronize()

def create_air_sphere(airsphere_radius: float) -> int:
    return kernel.addSphere(0.0, 0.0, 0.0, airsphere_radius)

air_sphere = create_air_sphere(airsphere_radius)
kernel.synchronize()
Info    : Cannot bind existing OpenCASCADE surface 8 to second tag 9                                                      
Info    : Could not preserve tag of 2D object 9 (->8)

Entities definition and mesh refinement.#

# Define the entities which later will become the physical groups.
entities = [
    Entity("air_sphere", dim = 3, mesh_order = 2, btype = "dielectric", tags = [air_sphere], loss_tan = 0.0, eps_r = 1.0, mu_r = 1.0),
    Entity("substrate", dim = 3, mesh_order = 1, btype = "dielectric", tags = [substrate], loss_tan = loss_tan, eps_r = eps_r, mu_r = mu_r),
    Entity("top_conductor", dim = 2, mesh_order= 1, btype = "pec", tags = [top_conductor[0][1]]),
    Entity("ground_plane", dim = 2, mesh_order = 1, btype = "pec", tags = [ground_plane]),
    Entity("lumped_port", dim = 2, mesh_order = 0, btype = "lumped_port", tags = [lumped_port], R = port_impedance, direction = '+Z', excitation = True)
]

# Boolean operations to guarantee a nice mesh, algo it returns the
# physical group map.
pg_map = run_meshing_pipeline(entities)

# Refine near the top conductor and locally the lumped port
refine_near_surfaces(entities[2].dimtags + entities[-1].dimtags, 
                     wavelength, 
                     ppw_near=400, 
                     ppw_far=5, 
                     transition_distance=wavelength/4,
                     set_as_background=True)

# # Mesh sizes
# mesh_sizes = {
#     "substrate": wavelength / 12,
#     "air_sphere": wavelength / 4,
#     "lumped_port": wavelength / 150,
#     "ground_plane" : wavelength / 10,
#     "top_conductor": wavelength / 50
# }

generate_3d_mesh(entities, output_file=filename, optimize=True)
gmsh.option.setNumber("Mesh.MshFileVersion", 2.2)
gmsh.write(filename)
gmsh.finalize()
  Physical group 'air_sphere' (dim=3): pg=1, tags=[2]                                                                                            
  Physical group 'substrate' (dim=3): pg=2, tags=[1]
  Physical group 'top_conductor' (dim=2): pg=3, tags=[8]
  Physical group 'ground_plane' (dim=2): pg=4, tags=[7]
  Physical group 'lumped_port' (dim=2): pg=5, tags=[9]
  Physical group 'air_sphere__None' (dim=2): pg=6, tags=[16]
  Physical group 'air_sphere__substrate' (dim=2): pg=7, tags=[10, 11, 13, 15, 14, 12]
  ppw_near=400  ppw_far=5
  SizeMax=0.0182  transition=0.0227
  global: 15 curves, SizeMin=0.0002
Info    : Meshing 1D...
Info    : [  0%] Meshing curve 45 (Line)
Info    : [ 10%] Meshing curve 46 (Line)
Info    : [ 10%] Meshing curve 47 (Line)
Info    : [ 10%] Meshing curve 48 (Line)
Info    : [ 20%] Meshing curve 49 (Line)
Info    : [ 20%] Meshing curve 50 (Line)
Info    : [ 20%] Meshing curve 51 (Line)
Info    : [ 30%] Meshing curve 52 (Line)
Info    : [ 30%] Meshing curve 53 (Line)
Info    : [ 30%] Meshing curve 54 (Line)
Info    : [ 40%] Meshing curve 55 (Line)
Info    : [ 40%] Meshing curve 56 (Line)
Info    : [ 40%] Meshing curve 57 (Line)
Info    : [ 50%] Meshing curve 58 (Line)
Info    : [ 50%] Meshing curve 59 (Line)
Info    : [ 50%] Meshing curve 60 (Line)
Info    : [ 60%] Meshing curve 61 (Line)
Info    : [ 60%] Meshing curve 62 (Line)
Info    : [ 60%] Meshing curve 63 (Line)
Info    : [ 60%] Meshing curve 64 (Line)
Info    : [ 70%] Meshing curve 65 (Line)
Info    : [ 70%] Meshing curve 66 (Line)
Info    : [ 70%] Meshing curve 67 (Line)
Info    : [ 80%] Meshing curve 68 (Line)
Info    : [ 80%] Meshing curve 69 (Line)
Info    : [ 80%] Meshing curve 70 (Line)
Info    : [ 90%] Meshing curve 71 (Line)
Info    : [ 90%] Meshing curve 72 (Line)
Info    : [100%] Meshing curve 74 (Circle)
Info    : [100%] Meshing curve 76 (Line)
Info    : Done meshing 1D (Wall 0.236431s, CPU 0.227489s)
Info    : Meshing 2D...
Info    : [  0%] Meshing surface 7 (Plane, MeshAdapt)
Info    : [ 20%] Meshing surface 8 (Plane, MeshAdapt)
Info    : [ 30%] Meshing surface 9 (Plane, MeshAdapt)
Info    : [ 40%] Meshing surface 10 (Plane, MeshAdapt)
Info    : [ 50%] Meshing surface 11 (Plane, MeshAdapt)
Info    : [ 60%] Meshing surface 12 (Plane, MeshAdapt)
Info    : [ 70%] Meshing surface 13 (Plane, MeshAdapt)
Info    : [ 80%] Meshing surface 14 (Plane, MeshAdapt)
Info    : [ 90%] Meshing surface 15 (Plane, MeshAdapt)
Info    : [100%] Meshing surface 16 (Sphere, MeshAdapt)
Info    : Done meshing 2D (Wall 0.373643s, CPU 0.371467s)
Info    : Meshing 3D...
Info    : 3D Meshing 2 volumes with 1 connected component
Info    : Tetrahedrizing 3397 nodes...
Info    : Done tetrahedrizing 3405 nodes (Wall 0.0230094s, CPU 0.023024s)
Info    : Reconstructing mesh...
Info    :  - Creating surface mesh
Info    :  - Identifying boundary edges
Info    :  - Recovering boundary
Info    : Done reconstructing mesh (Wall 0.0450368s, CPU 0.044711s)
Info    : Found volume 2
Info    : Found volume 1
Info    : It. 0 - 0 nodes created - worst tet radius 11.0285 (nodes removed 0 0)
Info    : It. 500 - 500 nodes created - worst tet radius 1.43714 (nodes removed 0 0)
Info    : It. 1000 - 1000 nodes created - worst tet radius 1.17669 (nodes removed 0 0)
Info    : It. 1500 - 1500 nodes created - worst tet radius 1.03815 (nodes removed 0 0)
Info    : 3D refinement terminated (5056 nodes total):
Info    :  - 1 Delaunay cavities modified for star shapeness
Info    :  - 0 nodes could not be inserted
Info    :  - 28108 tetrahedra created in 0.102852 sec. (273286 tets/s)
Info    : 0 node relocations
Info    : Done meshing 3D (Wall 0.196644s, CPU 0.196658s)
Info    : Optimizing mesh...
Info    : Optimizing volume 1
Info    : Optimization starts (volume = 4.68e-06) with worst = 0.00812265 / average = 0.606544:
Info    : 0.00 < quality < 0.10 :        32 elements
Info    : 0.10 < quality < 0.20 :       103 elements
Info    : 0.20 < quality < 0.30 :       252 elements
Info    : 0.30 < quality < 0.40 :       666 elements
Info    : 0.40 < quality < 0.50 :      1737 elements
Info    : 0.50 < quality < 0.60 :      2185 elements
Info    : 0.60 < quality < 0.70 :      2006 elements
Info    : 0.70 < quality < 0.80 :      1616 elements
Info    : 0.80 < quality < 0.90 :      1061 elements
Info    : 0.90 < quality < 1.00 :       416 elements
Info    : 289 edge swaps, 11 node relocations (volume = 4.68e-06): worst = 0.146028 / average = 0.618471 (Wall 0.0025048s, CPU 0.002533s)
Info    : 304 edge swaps, 15 node relocations (volume = 4.68e-06): worst = 0.158684 / average = 0.618763 (Wall 0.00341546s, CPU 0.003466s)
Info    : 308 edge swaps, 17 node relocations (volume = 4.68e-06): worst = 0.158684 / average = 0.61881 (Wall 0.00427831s, CPU 0.00435s)
Info    : No ill-shaped tets in the mesh :-)
Info    : 0.00 < quality < 0.10 :         0 elements
Info    : 0.10 < quality < 0.20 :         6 elements
Info    : 0.20 < quality < 0.30 :        84 elements
Info    : 0.30 < quality < 0.40 :       712 elements
Info    : 0.40 < quality < 0.50 :      1706 elements
Info    : 0.50 < quality < 0.60 :      2169 elements
Info    : 0.60 < quality < 0.70 :      2023 elements
Info    : 0.70 < quality < 0.80 :      1631 elements
Info    : 0.80 < quality < 0.90 :      1092 elements
Info    : 0.90 < quality < 1.00 :       409 elements
Info    : Optimizing volume 2
Info    : Optimization starts (volume = 0.00309809) with worst = 0.0111154 / average = 0.620966:
Info    : 0.00 < quality < 0.10 :        76 elements
Info    : 0.10 < quality < 0.20 :       294 elements
Info    : 0.20 < quality < 0.30 :       433 elements
Info    : 0.30 < quality < 0.40 :      1064 elements
Info    : 0.40 < quality < 0.50 :      2553 elements
Info    : 0.50 < quality < 0.60 :      3613 elements
Info    : 0.60 < quality < 0.70 :      3699 elements
Info    : 0.70 < quality < 0.80 :      3145 elements
Info    : 0.80 < quality < 0.90 :      2391 elements
Info    : 0.90 < quality < 1.00 :       766 elements
Info    : 673 edge swaps, 61 node relocations (volume = 0.00309809): worst = 0.0962665 / average = 0.637204 (Wall 0.00600244s, CPU 0.006037s)
Info    : 708 edge swaps, 74 node relocations (volume = 0.00309809): worst = 0.0962665 / average = 0.637422 (Wall 0.00803917s, CPU 0.00811s)
Info    : No ill-shaped tets in the mesh :-)
Info    : 0.00 < quality < 0.10 :         1 elements
Info    : 0.10 < quality < 0.20 :        33 elements
Info    : 0.20 < quality < 0.30 :        47 elements
Info    : 0.30 < quality < 0.40 :      1146 elements
Info    : 0.40 < quality < 0.50 :      2503 elements
Info    : 0.50 < quality < 0.60 :      3605 elements
Info    : 0.60 < quality < 0.70 :      3723 elements
Info    : 0.70 < quality < 0.80 :      3189 elements
Info    : 0.80 < quality < 0.90 :      2405 elements
Info    : 0.90 < quality < 1.00 :       769 elements
Info    : Done optimizing mesh (Wall 0.0239096s, CPU 0.024129s)
Info    : 5056 nodes 35023 elements
Info    : Optimizing mesh (Netgen)...
Info    : Optimizing volume 1
Info    : CalcLocalH: 3265 Points 9839 Elements 5952 Surface Elements 
Info    : Remove Illegal Elements 
Info    : 188 illegal tets 
Info    : SplitImprove 
Info    : badmax = 193.075 
Info    : 25 splits performed 
Info    : SwapImprove  
Info    : 23 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : 150 illegal tets 
Info    : SplitImprove 
Info    : badmax = 193.075 
Info    : 29 splits performed 
Info    : SwapImprove  
Info    : 9 swaps performed 
Info    : SwapImprove2  
Info    : 3 swaps performed 
Info    : 86 illegal tets 
Info    : SplitImprove 
Info    : badmax = 3349.48 
Info    : 24 splits performed 
Info    : SwapImprove  
Info    : 5 swaps performed 
Info    : SwapImprove2  
Info    : 2 swaps performed 
Info    : 26 illegal tets 
Info    : SplitImprove 
Info    : badmax = 1865.02 
Info    : 9 splits performed 
Info    : SwapImprove  
Info    : 2 swaps performed 
Info    : SwapImprove2  
Info    : 1 swaps performed 
Info    : 8 illegal tets 
Info    : SplitImprove 
Info    : badmax = 411.944 
Info    : 3 splits performed 
Info    : SwapImprove  
Info    : 0 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : 0 illegal tets 
Info    : Volume Optimization 
Info    : CombineImprove 
Info    : 27 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 21659.3 
Info    : Total badness = 19580.3 
Info    : SplitImprove 
Info    : badmax = 135.164 
Info    : 1 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 19588.1 
Info    : Total badness = 19505.8 
Info    : SwapImprove  
Info    : 477 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 18595.8 
Info    : Total badness = 18407.6 
Info    : CombineImprove 
Info    : 1 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 18398 
Info    : Total badness = 18389.7 
Info    : SplitImprove 
Info    : badmax = 85.9383 
Info    : 2 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 18404.5 
Info    : Total badness = 18403.9 
Info    : SwapImprove  
Info    : 124 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 18282.4 
Info    : Total badness = 18197.2 
Info    : CombineImprove 
Info    : 2 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 18166.1 
Info    : Total badness = 18161 
Info    : SplitImprove 
Info    : badmax = 85.934 
Info    : 0 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 18161 
Info    : Total badness = 18160.6 
Info    : SwapImprove  
Info    : 50 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 18098.4 
Info    : Total badness = 18061.9 
Info    : Optimizing volume 2
Info    : CalcLocalH: 4769 Points 17490 Elements 6786 Surface Elements 
Info    : Remove Illegal Elements 
Info    : 0 illegal tets 
Info    : Volume Optimization 
Info    : CombineImprove 
Info    : 27 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 33185.9 
Info    : Total badness = 29557.2 
Info    : SplitImprove 
Info    : badmax = 107.923 
Info    : 4 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 29588.9 
Info    : Total badness = 29195.3 
Info    : SwapImprove  
Info    : 934 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 27513.4 
Info    : Total badness = 26943.9 
Info    : CombineImprove 
Info    : 3 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 26896.8 
Info    : Total badness = 26860.6 
Info    : SplitImprove 
Info    : badmax = 64.8656 
Info    : 1 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 26867.1 
Info    : Total badness = 26859.8 
Info    : SwapImprove  
Info    : 280 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 26625.8 
Info    : Total badness = 26454.3 
Info    : CombineImprove 
Info    : 0 elements combined 
Info    : ImproveMesh 
Info    : Total badness = 26454.3 
Info    : Total badness = 26446.7 
Info    : SplitImprove 
Info    : badmax = 60.9791 
Info    : 0 splits performed 
Info    : ImproveMesh 
Info    : Total badness = 26446.7 
Info    : Total badness = 26445.9 
Info    : SwapImprove  
Info    : 105 swaps performed 
Info    : SwapImprove2  
Info    : 0 swaps performed 
Info    : ImproveMesh 
Info    : Total badness = 26368.2 
Info    : Total badness = 26301.2 
Info    : Done optimizing mesh (Wall 0.859175s, CPU 0.860999s)
Info    : Writing 'patch_antenna.msh'...
Mesh saved to patch_antenna.mshInfo    : Done writing 'patch_antenna.msh'

  Nodes: 5094
  Elements: 34488
Info    : Writing 'patch_antenna.msh'...
Info    : Done writing 'patch_antenna.msh'

Mesh visualization#

view_mesh(filename, transparent_groups= "air_sphere__None")
Loading mesh file: patch_antenna.msh
Groups to render transparent: air_sphere__None

Mesh loaded successfully with 2 cell blocks
Found 6786 triangles total
Physical group tags in mesh: {3: 'top_conductor', 4: 'ground_plane', 5: 'lumped_port', 6: 'air_sphere__None', 7: 'air_sphere__substrate'}

Simulation Configuration#

We define the key parameters for the electromagnetic simulation here. These settings control the frequency sweep range, material properties (dielectric constant and loss tangent for the substrate), and solver-specific configurations like port impedance and mesh order.

  • output_file : output filename for the configuration JSON file

  • freq_min : minimum frequency for the simulation (GHz)

  • freq_max: maximum frequency for the simulation (GHz)

  • freq_step: frequency step for the simulation (GHz)

  • solver_order: order of the finite element basis functions for the simulation (e.g., 1 for linear, 2 for quadratic)

output_file: str = "patch_antenna.json"
# Sweep de simulación 
freq_min: float = 2.5
freq_max: float = 4
freq_step: float = 0.025

solver_order: int = 2

Generating the Palace Configuration File#

Finally, we assemble the simulation parameters into a JSON configuration .

generate_palace_config_from_entities(entity_defs = [e.to_dict() for e in entities],
    pg_map = pg_map,
    mesh_file = filename,
    output_file = 'patch.config',
    freq_min = freq_min,
    freq_max = freq_max,
    freq_step = freq_step ,
    L0 = 1.0,
    solver_order = solver_order,
    absorbing_order = 2,
    farfield=True)
Palace config written to patch.config
{'Problem': {'Type': 'Driven', 'Verbose': 2, 'Output': 'postpro/patch'},
 'Model': {'Mesh': 'patch_antenna.msh', 'L0': 1.0, 'Refinement': {}},
 'Domains': {'Materials': [{'Attributes': [1],
    'Permeability': 1.0,
    'Permittivity': 1.0,
    'LossTan': 0.0},
   {'Attributes': [2],
    'Permeability': 1.0,
    'Permittivity': 2.2,
    'LossTan': 0.0009}]},
 'Boundaries': {'PEC': {'Attributes': [3, 4]},
  'Absorbing': {'Attributes': [6], 'Order': 2},
  'LumpedPort': [{'Index': 1,
    'Attributes': [5],
    'R': 50.0,
    'Excitation': True,
    'Direction': '+Z'}],
  'Postprocessing': {'FarField': {'Attributes': [6], 'NSample': 16000}}},
 'Solver': {'Order': 2,
  'Device': 'CPU',
  'Driven': {'MinFreq': 2.5,
   'MaxFreq': 4,
   'FreqStep': 0.025,
   'SaveStep': 5,
   'AdaptiveTol': 0.001},
  'Linear': {'Type': 'Default',
   'KSPType': 'GMRES',
   'Tol': 1e-08,
   'MaxIts': 500}}}

Running Palace#

from palacetoolkit.simulation import set_palace_path, run_palace
run_palace(config_file="patch.config", num_procs=16)
  Running: /home/martin/.cache/palacetoolkit/runtime/palace-cpu-v0.1.2/bin/palace -np 16 /home/martin/Desktop/PalaceToolkit/docs/examples/patch.config
>> /usr/bin/mpirun -n 16 /home/martin/.cache/palacetoolkit/runtime/palace-cpu-v0.1.2/bin/palace-x86_64.bin /home/martin/Desktop/PalaceToolkit/docs/examples/patch.config

_____________     _______
_____   __   \____ __   /____ ____________
____   /_/  /  __ ` /  /  __ ` /  ___/  _ \
___   _____/  /_/  /  /  /_/  /  /__/  ___/
  /__/     \___,__/__/\___,__/\_____\_____/


--> Warning!
Output folder is not empty; program will overwrite content! (postpro/patch)
Git changeset ID: v0.16.1-51-g4f2e2d97
Running with 16 MPI processes, 1 OpenMP thread
Device configuration: omp,cpu
Memory configuration: host-std
libCEED backend: /cpu/self/xsmm/blocked

Added 1324 duplicate vertices for interior boundaries in the mesh
Added 3457 duplicate boundary elements for interior boundaries in the mesh

Characteristic length and time scales:
 Lc = 1.818e-01 m, tc = 6.065e-01 ns
Finished partitioning mesh into 16 subdomains

Mesh curvature order: 1
Mesh bounding box:
 (Xmin, Ymin, Zmin) = (-9.062e-02, -9.058e-02, -9.091e-02) m
 (Xmax, Ymax, Zmax) = (+9.091e-02, +9.067e-02, +9.091e-02) m

Parallel Mesh Stats:

                minimum     average     maximum       total
 vertices           312         401         457        6418
 edges             2047        2317        2478       37083
 faces             3362        3591        3738       57462
 elements          1625        1674        1724       26794
 neighbors            3           7          14

            minimum     maximum
 h      0.000933774    0.172125
 kappa      1.09793     18.2995

Estimated current per-rank memory usage is: Min. 51.0M, Max. 69.5M, Avg. 53.0M, Total 847.3M
Estimated current per-node memory usage is: Min. 849.4M, Max. 849.4M, Avg. 849.4M, Total 849.4M

Configuring Robin absorbing BC (order 2) at attributes:
 6

Configuring Robin impedance BC for lumped ports at attributes:
 5: Rs = 7.692e+01 Ω/sq, n = (-1.0,+0.0,+0.0)

Configuring lumped port circuit properties:
 Index = 1: R = 5.000e+01 Ω

Configuring lumped port excitation source term at attributes:
 5: Index = 1

Configuring Dirichlet PEC BC at attributes:
 3-4

Computing adaptive fast frequency response for:
Excitation with index 1 has contributions from:
 Lumped port  1

Beginning PROM construction offline phase:
 61 points for frequency sweep over [2.500e+00, 4.000e+00] GHz

Assembling system matrices, number of global unknowns:
 H1 (p = 2): 43501, ND (p = 2): 189090, RT (p = 2): 252768
 Operator assembly level: Partial
 Mesh geometries:
  Tetrahedron: P = 20, Q = 14 (quadrature order = 4)

Assembling multigrid hierarchy:
 Level 0 (p = 1): 37083 unknowns
 Level 1 (p = 2): 189090 unknowns
 Level 0 (auxiliary) (p = 1): 6418 unknowns
 Level 1 (auxiliary) (p = 2): 43501 unknowns

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 3.483989e+01
  1 (restart 0) KSP residual norm 1.638033e+01
  2 (restart 0) KSP residual norm 1.595283e+01
  3 (restart 0) KSP residual norm 6.785846e+00
  4 (restart 0) KSP residual norm 6.778450e+00
  5 (restart 0) KSP residual norm 3.702500e+00
  6 (restart 0) KSP residual norm 3.687719e+00
  7 (restart 0) KSP residual norm 2.833579e+00
  8 (restart 0) KSP residual norm 2.685200e+00
  9 (restart 0) KSP residual norm 2.439460e+00
 10 (restart 0) KSP residual norm 2.304808e+00
 11 (restart 0) KSP residual norm 2.176711e+00
 12 (restart 0) KSP residual norm 2.088950e+00
 13 (restart 0) KSP residual norm 1.814150e+00
 14 (restart 0) KSP residual norm 1.769837e+00
 15 (restart 0) KSP residual norm 1.268215e+00
 16 (restart 0) KSP residual norm 1.179278e+00
 17 (restart 0) KSP residual norm 9.180005e-01
 18 (restart 0) KSP residual norm 8.574307e-01
 19 (restart 0) KSP residual norm 7.436316e-01
 20 (restart 0) KSP residual norm 7.354207e-01
 21 (restart 0) KSP residual norm 6.041496e-01
 22 (restart 0) KSP residual norm 5.836149e-01
 23 (restart 0) KSP residual norm 4.773363e-01
 24 (restart 0) KSP residual norm 4.423789e-01
 25 (restart 0) KSP residual norm 3.990211e-01
 26 (restart 0) KSP residual norm 3.768231e-01
 27 (restart 0) KSP residual norm 3.253256e-01
 28 (restart 0) KSP residual norm 3.046586e-01
 29 (restart 0) KSP residual norm 2.735369e-01
 30 (restart 0) KSP residual norm 2.442329e-01
 31 (restart 0) KSP residual norm 2.248002e-01
 32 (restart 0) KSP residual norm 1.915834e-01
 33 (restart 0) KSP residual norm 1.731497e-01
 34 (restart 0) KSP residual norm 1.516500e-01
 35 (restart 0) KSP residual norm 1.306338e-01
 36 (restart 0) KSP residual norm 1.151003e-01
 37 (restart 0) KSP residual norm 1.017698e-01
 38 (restart 0) KSP residual norm 8.946518e-02
 39 (restart 0) KSP residual norm 8.162207e-02
 40 (restart 0) KSP residual norm 6.826053e-02
 41 (restart 0) KSP residual norm 5.849272e-02
 42 (restart 0) KSP residual norm 4.649408e-02
 43 (restart 0) KSP residual norm 3.906652e-02
 44 (restart 0) KSP residual norm 3.337561e-02
 45 (restart 0) KSP residual norm 2.745105e-02
 46 (restart 0) KSP residual norm 2.238034e-02
 47 (restart 0) KSP residual norm 1.945662e-02
 48 (restart 0) KSP residual norm 1.604033e-02
 49 (restart 0) KSP residual norm 1.320134e-02
 50 (restart 0) KSP residual norm 1.139103e-02
 51 (restart 0) KSP residual norm 9.516884e-03
 52 (restart 0) KSP residual norm 7.978735e-03
 53 (restart 0) KSP residual norm 6.978859e-03
 54 (restart 0) KSP residual norm 6.057595e-03
 55 (restart 0) KSP residual norm 5.122472e-03
 56 (restart 0) KSP residual norm 4.177217e-03
 57 (restart 0) KSP residual norm 3.483511e-03
 58 (restart 0) KSP residual norm 2.881101e-03
 59 (restart 0) KSP residual norm 2.284306e-03
 60 (restart 0) KSP residual norm 1.687449e-03
 61 (restart 0) KSP residual norm 1.378651e-03
 62 (restart 0) KSP residual norm 1.054077e-03
 63 (restart 0) KSP residual norm 8.102737e-04
 64 (restart 0) KSP residual norm 5.994272e-04
 65 (restart 0) KSP residual norm 4.876721e-04
 66 (restart 0) KSP residual norm 3.688129e-04
 67 (restart 0) KSP residual norm 2.817588e-04
 68 (restart 0) KSP residual norm 2.178700e-04
 69 (restart 0) KSP residual norm 1.695158e-04
 70 (restart 0) KSP residual norm 1.376695e-04
 71 (restart 0) KSP residual norm 1.031975e-04
 72 (restart 0) KSP residual norm 7.942367e-05
 73 (restart 0) KSP residual norm 6.557393e-05
 74 (restart 0) KSP residual norm 5.005595e-05
 75 (restart 0) KSP residual norm 3.913512e-05
 76 (restart 0) KSP residual norm 3.177019e-05
 77 (restart 0) KSP residual norm 2.441544e-05
 78 (restart 0) KSP residual norm 1.849384e-05
 79 (restart 0) KSP residual norm 1.370196e-05
 80 (restart 0) KSP residual norm 1.053222e-05
 81 (restart 0) KSP residual norm 8.183339e-06
 82 (restart 0) KSP residual norm 6.130604e-06
 83 (restart 0) KSP residual norm 4.489035e-06
 84 (restart 0) KSP residual norm 3.393996e-06
 85 (restart 0) KSP residual norm 2.579677e-06
 86 (restart 0) KSP residual norm 1.855782e-06
 87 (restart 0) KSP residual norm 1.421381e-06
 88 (restart 0) KSP residual norm 1.038339e-06
 89 (restart 0) KSP residual norm 7.509084e-07
 90 (restart 0) KSP residual norm 5.502241e-07
 91 (restart 0) KSP residual norm 4.096127e-07
 92 (restart 0) KSP residual norm 3.103170e-07
GMRES solver converged in 92 iterations (avg. reduction factor: 8.175e-01)
 Field energy E (9.443e-11 J) + H (8.540e-11 J) = 1.798e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 6.127287e+02
  1 (restart 0) KSP residual norm 4.133755e+02
  2 (restart 0) KSP residual norm 1.524727e+02
  3 (restart 0) KSP residual norm 2.562884e+01
  4 (restart 0) KSP residual norm 1.342230e+01
  5 (restart 0) KSP residual norm 1.209925e+01
  6 (restart 0) KSP residual norm 9.415011e+00
  7 (restart 0) KSP residual norm 8.309334e+00
  8 (restart 0) KSP residual norm 5.956349e+00
  9 (restart 0) KSP residual norm 5.499117e+00
 10 (restart 0) KSP residual norm 4.871423e+00
 11 (restart 0) KSP residual norm 4.446807e+00
 12 (restart 0) KSP residual norm 4.323772e+00
 13 (restart 0) KSP residual norm 3.666343e+00
 14 (restart 0) KSP residual norm 3.346962e+00
 15 (restart 0) KSP residual norm 3.037226e+00
 16 (restart 0) KSP residual norm 2.860766e+00
 17 (restart 0) KSP residual norm 2.484136e+00
 18 (restart 0) KSP residual norm 2.303107e+00
 19 (restart 0) KSP residual norm 2.050596e+00
 20 (restart 0) KSP residual norm 1.934924e+00
 21 (restart 0) KSP residual norm 1.720610e+00
 22 (restart 0) KSP residual norm 1.519782e+00
 23 (restart 0) KSP residual norm 1.440875e+00
 24 (restart 0) KSP residual norm 1.287882e+00
 25 (restart 0) KSP residual norm 1.107643e+00
 26 (restart 0) KSP residual norm 1.025571e+00
 27 (restart 0) KSP residual norm 9.424809e-01
 28 (restart 0) KSP residual norm 8.875850e-01
 29 (restart 0) KSP residual norm 8.041387e-01
 30 (restart 0) KSP residual norm 7.352586e-01
 31 (restart 0) KSP residual norm 6.196269e-01
 32 (restart 0) KSP residual norm 5.701512e-01
 33 (restart 0) KSP residual norm 4.908969e-01
 34 (restart 0) KSP residual norm 4.713662e-01
 35 (restart 0) KSP residual norm 3.834599e-01
 36 (restart 0) KSP residual norm 3.166544e-01
 37 (restart 0) KSP residual norm 2.843801e-01
 38 (restart 0) KSP residual norm 2.341915e-01
 39 (restart 0) KSP residual norm 2.028657e-01
 40 (restart 0) KSP residual norm 1.830838e-01
 41 (restart 0) KSP residual norm 1.527841e-01
 42 (restart 0) KSP residual norm 1.386398e-01
 43 (restart 0) KSP residual norm 1.189579e-01
 44 (restart 0) KSP residual norm 9.824002e-02
 45 (restart 0) KSP residual norm 8.667564e-02
 46 (restart 0) KSP residual norm 7.410323e-02
 47 (restart 0) KSP residual norm 6.769035e-02
 48 (restart 0) KSP residual norm 5.549277e-02
 49 (restart 0) KSP residual norm 4.946804e-02
 50 (restart 0) KSP residual norm 4.226992e-02
 51 (restart 0) KSP residual norm 3.536169e-02
 52 (restart 0) KSP residual norm 3.194277e-02
 53 (restart 0) KSP residual norm 2.479068e-02
 54 (restart 0) KSP residual norm 2.107365e-02
 55 (restart 0) KSP residual norm 1.667650e-02
 56 (restart 0) KSP residual norm 1.350032e-02
 57 (restart 0) KSP residual norm 1.097500e-02
 58 (restart 0) KSP residual norm 9.149061e-03
 59 (restart 0) KSP residual norm 7.239501e-03
 60 (restart 0) KSP residual norm 5.479457e-03
 61 (restart 0) KSP residual norm 4.315327e-03
 62 (restart 0) KSP residual norm 3.204613e-03
 63 (restart 0) KSP residual norm 2.504098e-03
 64 (restart 0) KSP residual norm 1.951110e-03
 65 (restart 0) KSP residual norm 1.456591e-03
 66 (restart 0) KSP residual norm 1.081992e-03
 67 (restart 0) KSP residual norm 8.312153e-04
 68 (restart 0) KSP residual norm 6.614283e-04
 69 (restart 0) KSP residual norm 5.144312e-04
 70 (restart 0) KSP residual norm 4.159172e-04
 71 (restart 0) KSP residual norm 3.222218e-04
 72 (restart 0) KSP residual norm 2.523205e-04
 73 (restart 0) KSP residual norm 1.931220e-04
 74 (restart 0) KSP residual norm 1.470466e-04
 75 (restart 0) KSP residual norm 1.212632e-04
 76 (restart 0) KSP residual norm 9.132374e-05
 77 (restart 0) KSP residual norm 6.646041e-05
 78 (restart 0) KSP residual norm 5.102816e-05
 79 (restart 0) KSP residual norm 3.905517e-05
 80 (restart 0) KSP residual norm 2.732811e-05
 81 (restart 0) KSP residual norm 2.035191e-05
 82 (restart 0) KSP residual norm 1.629701e-05
 83 (restart 0) KSP residual norm 1.241005e-05
 84 (restart 0) KSP residual norm 9.646276e-06
 85 (restart 0) KSP residual norm 7.234284e-06
 86 (restart 0) KSP residual norm 5.387659e-06
GMRES solver converged in 86 iterations (avg. reduction factor: 8.060e-01)
 Field energy E (1.791e-10 J) + H (1.403e-10 J) = 3.194e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 6.422833e+01
  1 (restart 0) KSP residual norm 5.909908e+01
  2 (restart 0) KSP residual norm 5.731930e+01
  3 (restart 0) KSP residual norm 5.590266e+01
  4 (restart 0) KSP residual norm 3.557516e+01
  5 (restart 0) KSP residual norm 3.359920e+01
  6 (restart 0) KSP residual norm 2.908714e+01
  7 (restart 0) KSP residual norm 2.828656e+01
  8 (restart 0) KSP residual norm 1.824952e+01
  9 (restart 0) KSP residual norm 1.660275e+01
 10 (restart 0) KSP residual norm 1.452791e+01
 11 (restart 0) KSP residual norm 1.269428e+01
 12 (restart 0) KSP residual norm 1.179351e+01
 13 (restart 0) KSP residual norm 9.919147e+00
 14 (restart 0) KSP residual norm 9.655951e+00
 15 (restart 0) KSP residual norm 8.117533e+00
 16 (restart 0) KSP residual norm 7.947305e+00
 17 (restart 0) KSP residual norm 6.807874e+00
 18 (restart 0) KSP residual norm 6.576186e+00
 19 (restart 0) KSP residual norm 6.048569e+00
 20 (restart 0) KSP residual norm 5.941768e+00
 21 (restart 0) KSP residual norm 5.424400e+00
 22 (restart 0) KSP residual norm 5.098727e+00
 23 (restart 0) KSP residual norm 4.684337e+00
 24 (restart 0) KSP residual norm 4.367407e+00
 25 (restart 0) KSP residual norm 3.891868e+00
 26 (restart 0) KSP residual norm 3.353459e+00
 27 (restart 0) KSP residual norm 2.876110e+00
 28 (restart 0) KSP residual norm 2.428272e+00
 29 (restart 0) KSP residual norm 2.157620e+00
 30 (restart 0) KSP residual norm 1.706710e+00
 31 (restart 0) KSP residual norm 1.350227e+00
 32 (restart 0) KSP residual norm 1.175448e+00
 33 (restart 0) KSP residual norm 9.741625e-01
 34 (restart 0) KSP residual norm 8.417918e-01
 35 (restart 0) KSP residual norm 6.693608e-01
 36 (restart 0) KSP residual norm 5.823043e-01
 37 (restart 0) KSP residual norm 4.329445e-01
 38 (restart 0) KSP residual norm 3.945657e-01
 39 (restart 0) KSP residual norm 3.559011e-01
 40 (restart 0) KSP residual norm 3.183543e-01
 41 (restart 0) KSP residual norm 2.822484e-01
 42 (restart 0) KSP residual norm 2.354904e-01
 43 (restart 0) KSP residual norm 1.953934e-01
 44 (restart 0) KSP residual norm 1.698437e-01
 45 (restart 0) KSP residual norm 1.295485e-01
 46 (restart 0) KSP residual norm 1.134569e-01
 47 (restart 0) KSP residual norm 9.492531e-02
 48 (restart 0) KSP residual norm 8.203244e-02
 49 (restart 0) KSP residual norm 6.971183e-02
 50 (restart 0) KSP residual norm 5.785595e-02
 51 (restart 0) KSP residual norm 4.982094e-02
 52 (restart 0) KSP residual norm 4.149603e-02
 53 (restart 0) KSP residual norm 3.486490e-02
 54 (restart 0) KSP residual norm 2.821372e-02
 55 (restart 0) KSP residual norm 2.193128e-02
 56 (restart 0) KSP residual norm 1.849151e-02
 57 (restart 0) KSP residual norm 1.397141e-02
 58 (restart 0) KSP residual norm 1.193903e-02
 59 (restart 0) KSP residual norm 9.572595e-03
 60 (restart 0) KSP residual norm 8.309780e-03
 61 (restart 0) KSP residual norm 6.768526e-03
 62 (restart 0) KSP residual norm 5.476860e-03
 63 (restart 0) KSP residual norm 4.321610e-03
 64 (restart 0) KSP residual norm 3.395052e-03
 65 (restart 0) KSP residual norm 2.732107e-03
 66 (restart 0) KSP residual norm 2.275156e-03
 67 (restart 0) KSP residual norm 1.850842e-03
 68 (restart 0) KSP residual norm 1.566182e-03
 69 (restart 0) KSP residual norm 1.287659e-03
 70 (restart 0) KSP residual norm 1.062755e-03
 71 (restart 0) KSP residual norm 8.530118e-04
 72 (restart 0) KSP residual norm 7.176268e-04
 73 (restart 0) KSP residual norm 5.847050e-04
 74 (restart 0) KSP residual norm 4.371709e-04
 75 (restart 0) KSP residual norm 3.485502e-04
 76 (restart 0) KSP residual norm 2.837566e-04
 77 (restart 0) KSP residual norm 2.237954e-04
 78 (restart 0) KSP residual norm 1.801038e-04
 79 (restart 0) KSP residual norm 1.385508e-04
 80 (restart 0) KSP residual norm 1.107846e-04
 81 (restart 0) KSP residual norm 8.797957e-05
 82 (restart 0) KSP residual norm 7.087791e-05
 83 (restart 0) KSP residual norm 5.806354e-05
 84 (restart 0) KSP residual norm 4.537038e-05
 85 (restart 0) KSP residual norm 3.556853e-05
 86 (restart 0) KSP residual norm 2.797601e-05
 87 (restart 0) KSP residual norm 2.228275e-05
 88 (restart 0) KSP residual norm 1.788914e-05
 89 (restart 0) KSP residual norm 1.436337e-05
 90 (restart 0) KSP residual norm 1.171775e-05
 91 (restart 0) KSP residual norm 9.777471e-06
 92 (restart 0) KSP residual norm 8.014507e-06
 93 (restart 0) KSP residual norm 6.564083e-06
 94 (restart 0) KSP residual norm 5.256535e-06
 95 (restart 0) KSP residual norm 4.363411e-06
 96 (restart 0) KSP residual norm 3.416353e-06
 97 (restart 0) KSP residual norm 2.825313e-06
 98 (restart 0) KSP residual norm 2.314622e-06
 99 (restart 0) KSP residual norm 1.992927e-06
100 (restart 0) KSP residual norm 1.682405e-06
101 (restart 0) KSP residual norm 1.396012e-06
102 (restart 0) KSP residual norm 1.110892e-06
103 (restart 0) KSP residual norm 8.639034e-07
104 (restart 0) KSP residual norm 6.714228e-07
105 (restart 0) KSP residual norm 5.408358e-07
GMRES solver converged in 105 iterations (avg. reduction factor: 8.377e-01)

Greedy iteration 1 (n = 4): ω* = 3.433e+00 GHz (1.308e+01), error = 9.133e-01, memory = 0/2
 Field energy E (3.855e-10 J) + H (3.762e-10 J) = 7.617e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 6.751877e+01
  1 (restart 0) KSP residual norm 6.452576e+01
  2 (restart 0) KSP residual norm 6.398192e+01
  3 (restart 0) KSP residual norm 6.297234e+01
  4 (restart 0) KSP residual norm 5.955310e+01
  5 (restart 0) KSP residual norm 5.246780e+01
  6 (restart 0) KSP residual norm 5.116704e+01
  7 (restart 0) KSP residual norm 4.461565e+01
  8 (restart 0) KSP residual norm 3.875282e+01
  9 (restart 0) KSP residual norm 3.627986e+01
 10 (restart 0) KSP residual norm 3.120721e+01
 11 (restart 0) KSP residual norm 3.060050e+01
 12 (restart 0) KSP residual norm 2.692292e+01
 13 (restart 0) KSP residual norm 2.619024e+01
 14 (restart 0) KSP residual norm 2.205613e+01
 15 (restart 0) KSP residual norm 2.063419e+01
 16 (restart 0) KSP residual norm 1.899624e+01
 17 (restart 0) KSP residual norm 1.582685e+01
 18 (restart 0) KSP residual norm 1.559804e+01
 19 (restart 0) KSP residual norm 1.196281e+01
 20 (restart 0) KSP residual norm 1.172514e+01
 21 (restart 0) KSP residual norm 9.469576e+00
 22 (restart 0) KSP residual norm 8.853273e+00
 23 (restart 0) KSP residual norm 7.184457e+00
 24 (restart 0) KSP residual norm 5.861032e+00
 25 (restart 0) KSP residual norm 5.686578e+00
 26 (restart 0) KSP residual norm 4.114097e+00
 27 (restart 0) KSP residual norm 3.969076e+00
 28 (restart 0) KSP residual norm 3.056252e+00
 29 (restart 0) KSP residual norm 2.721980e+00
 30 (restart 0) KSP residual norm 2.528253e+00
 31 (restart 0) KSP residual norm 2.205267e+00
 32 (restart 0) KSP residual norm 2.115015e+00
 33 (restart 0) KSP residual norm 1.859324e+00
 34 (restart 0) KSP residual norm 1.672388e+00
 35 (restart 0) KSP residual norm 1.519707e+00
 36 (restart 0) KSP residual norm 1.310987e+00
 37 (restart 0) KSP residual norm 1.137148e+00
 38 (restart 0) KSP residual norm 9.845613e-01
 39 (restart 0) KSP residual norm 8.357532e-01
 40 (restart 0) KSP residual norm 7.239113e-01
 41 (restart 0) KSP residual norm 6.366858e-01
 42 (restart 0) KSP residual norm 5.567867e-01
 43 (restart 0) KSP residual norm 4.822652e-01
 44 (restart 0) KSP residual norm 4.129331e-01
 45 (restart 0) KSP residual norm 3.316254e-01
 46 (restart 0) KSP residual norm 2.811233e-01
 47 (restart 0) KSP residual norm 2.329883e-01
 48 (restart 0) KSP residual norm 1.844688e-01
 49 (restart 0) KSP residual norm 1.475320e-01
 50 (restart 0) KSP residual norm 1.227750e-01
 51 (restart 0) KSP residual norm 1.057340e-01
 52 (restart 0) KSP residual norm 9.288955e-02
 53 (restart 0) KSP residual norm 7.809988e-02
 54 (restart 0) KSP residual norm 6.884301e-02
 55 (restart 0) KSP residual norm 5.041672e-02
 56 (restart 0) KSP residual norm 4.335446e-02
 57 (restart 0) KSP residual norm 3.533921e-02
 58 (restart 0) KSP residual norm 3.108481e-02
 59 (restart 0) KSP residual norm 2.227216e-02
 60 (restart 0) KSP residual norm 1.843009e-02
 61 (restart 0) KSP residual norm 1.448048e-02
 62 (restart 0) KSP residual norm 1.094719e-02
 63 (restart 0) KSP residual norm 8.996505e-03
 64 (restart 0) KSP residual norm 6.475258e-03
 65 (restart 0) KSP residual norm 5.359283e-03
 66 (restart 0) KSP residual norm 4.263527e-03
 67 (restart 0) KSP residual norm 3.595564e-03
 68 (restart 0) KSP residual norm 2.895906e-03
 69 (restart 0) KSP residual norm 2.257061e-03
 70 (restart 0) KSP residual norm 1.751555e-03
 71 (restart 0) KSP residual norm 1.333477e-03
 72 (restart 0) KSP residual norm 1.065507e-03
 73 (restart 0) KSP residual norm 8.382675e-04
 74 (restart 0) KSP residual norm 6.789414e-04
 75 (restart 0) KSP residual norm 5.545764e-04
 76 (restart 0) KSP residual norm 4.446536e-04
 77 (restart 0) KSP residual norm 3.659269e-04
 78 (restart 0) KSP residual norm 2.874459e-04
 79 (restart 0) KSP residual norm 2.217447e-04
 80 (restart 0) KSP residual norm 1.744376e-04
 81 (restart 0) KSP residual norm 1.378919e-04
 82 (restart 0) KSP residual norm 1.128298e-04
 83 (restart 0) KSP residual norm 8.943913e-05
 84 (restart 0) KSP residual norm 6.935279e-05
 85 (restart 0) KSP residual norm 5.274236e-05
 86 (restart 0) KSP residual norm 3.940963e-05
 87 (restart 0) KSP residual norm 2.993260e-05
 88 (restart 0) KSP residual norm 2.358713e-05
 89 (restart 0) KSP residual norm 1.848710e-05
 90 (restart 0) KSP residual norm 1.469989e-05
 91 (restart 0) KSP residual norm 1.214209e-05
 92 (restart 0) KSP residual norm 9.835470e-06
 93 (restart 0) KSP residual norm 8.106071e-06
 94 (restart 0) KSP residual norm 6.766851e-06
 95 (restart 0) KSP residual norm 5.454406e-06
 96 (restart 0) KSP residual norm 4.463527e-06
 97 (restart 0) KSP residual norm 3.493510e-06
 98 (restart 0) KSP residual norm 2.800834e-06
 99 (restart 0) KSP residual norm 2.259994e-06
100 (restart 0) KSP residual norm 1.801515e-06
101 (restart 0) KSP residual norm 1.393576e-06
102 (restart 0) KSP residual norm 1.111101e-06
103 (restart 0) KSP residual norm 8.590819e-07
104 (restart 0) KSP residual norm 6.587193e-07
GMRES solver converged in 104 iterations (avg. reduction factor: 8.375e-01)

Greedy iteration 2 (n = 6): ω* = 3.248e+00 GHz (1.238e+01), error = 2.433e-02, memory = 0/2
 Field energy E (1.295e-09 J) + H (1.296e-09 J) = 2.591e-09 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 9.177989e+01
  1 (restart 0) KSP residual norm 9.152952e+01
  2 (restart 0) KSP residual norm 7.869349e+01
  3 (restart 0) KSP residual norm 7.424285e+01
  4 (restart 0) KSP residual norm 4.169797e+01
  5 (restart 0) KSP residual norm 1.598209e+01
  6 (restart 0) KSP residual norm 7.376414e+00
  7 (restart 0) KSP residual norm 6.229556e+00
  8 (restart 0) KSP residual norm 5.932415e+00
  9 (restart 0) KSP residual norm 5.135071e+00
 10 (restart 0) KSP residual norm 4.850819e+00
 11 (restart 0) KSP residual norm 4.568502e+00
 12 (restart 0) KSP residual norm 4.091557e+00
 13 (restart 0) KSP residual norm 3.834386e+00
 14 (restart 0) KSP residual norm 3.181003e+00
 15 (restart 0) KSP residual norm 2.959862e+00
 16 (restart 0) KSP residual norm 2.657674e+00
 17 (restart 0) KSP residual norm 2.428988e+00
 18 (restart 0) KSP residual norm 2.149931e+00
 19 (restart 0) KSP residual norm 1.900168e+00
 20 (restart 0) KSP residual norm 1.703937e+00
 21 (restart 0) KSP residual norm 1.592794e+00
 22 (restart 0) KSP residual norm 1.311300e+00
 23 (restart 0) KSP residual norm 1.237153e+00
 24 (restart 0) KSP residual norm 1.008013e+00
 25 (restart 0) KSP residual norm 9.098768e-01
 26 (restart 0) KSP residual norm 8.476587e-01
 27 (restart 0) KSP residual norm 7.151217e-01
 28 (restart 0) KSP residual norm 6.442731e-01
 29 (restart 0) KSP residual norm 5.336693e-01
 30 (restart 0) KSP residual norm 4.878138e-01
 31 (restart 0) KSP residual norm 4.065293e-01
 32 (restart 0) KSP residual norm 3.789890e-01
 33 (restart 0) KSP residual norm 3.092096e-01
 34 (restart 0) KSP residual norm 2.952991e-01
 35 (restart 0) KSP residual norm 2.565412e-01
 36 (restart 0) KSP residual norm 2.431211e-01
 37 (restart 0) KSP residual norm 2.101030e-01
 38 (restart 0) KSP residual norm 1.977771e-01
 39 (restart 0) KSP residual norm 1.786690e-01
 40 (restart 0) KSP residual norm 1.638160e-01
 41 (restart 0) KSP residual norm 1.493695e-01
 42 (restart 0) KSP residual norm 1.337401e-01
 43 (restart 0) KSP residual norm 1.225251e-01
 44 (restart 0) KSP residual norm 1.081126e-01
 45 (restart 0) KSP residual norm 9.973055e-02
 46 (restart 0) KSP residual norm 8.744658e-02
 47 (restart 0) KSP residual norm 7.199996e-02
 48 (restart 0) KSP residual norm 6.361322e-02
 49 (restart 0) KSP residual norm 5.272906e-02
 50 (restart 0) KSP residual norm 4.331777e-02
 51 (restart 0) KSP residual norm 3.485704e-02
 52 (restart 0) KSP residual norm 2.680712e-02
 53 (restart 0) KSP residual norm 2.252466e-02
 54 (restart 0) KSP residual norm 1.844531e-02
 55 (restart 0) KSP residual norm 1.534257e-02
 56 (restart 0) KSP residual norm 1.193549e-02
 57 (restart 0) KSP residual norm 1.020902e-02
 58 (restart 0) KSP residual norm 8.386319e-03
 59 (restart 0) KSP residual norm 6.919243e-03
 60 (restart 0) KSP residual norm 5.730582e-03
 61 (restart 0) KSP residual norm 4.833756e-03
 62 (restart 0) KSP residual norm 3.986004e-03
 63 (restart 0) KSP residual norm 3.130830e-03
 64 (restart 0) KSP residual norm 2.569436e-03
 65 (restart 0) KSP residual norm 2.007649e-03
 66 (restart 0) KSP residual norm 1.603029e-03
 67 (restart 0) KSP residual norm 1.319865e-03
 68 (restart 0) KSP residual norm 1.093935e-03
 69 (restart 0) KSP residual norm 9.393492e-04
 70 (restart 0) KSP residual norm 8.067507e-04
 71 (restart 0) KSP residual norm 6.841680e-04
 72 (restart 0) KSP residual norm 5.682887e-04
 73 (restart 0) KSP residual norm 4.560594e-04
 74 (restart 0) KSP residual norm 3.691072e-04
 75 (restart 0) KSP residual norm 3.072845e-04
 76 (restart 0) KSP residual norm 2.590848e-04
 77 (restart 0) KSP residual norm 2.211552e-04
 78 (restart 0) KSP residual norm 1.850145e-04
 79 (restart 0) KSP residual norm 1.570334e-04
 80 (restart 0) KSP residual norm 1.356486e-04
 81 (restart 0) KSP residual norm 1.119924e-04
 82 (restart 0) KSP residual norm 9.190565e-05
 83 (restart 0) KSP residual norm 7.025169e-05
 84 (restart 0) KSP residual norm 5.594092e-05
 85 (restart 0) KSP residual norm 4.305005e-05
 86 (restart 0) KSP residual norm 3.489671e-05
 87 (restart 0) KSP residual norm 2.882052e-05
 88 (restart 0) KSP residual norm 2.376939e-05
 89 (restart 0) KSP residual norm 1.997174e-05
 90 (restart 0) KSP residual norm 1.648143e-05
 91 (restart 0) KSP residual norm 1.284108e-05
 92 (restart 0) KSP residual norm 9.620320e-06
 93 (restart 0) KSP residual norm 7.278495e-06
 94 (restart 0) KSP residual norm 5.806932e-06
 95 (restart 0) KSP residual norm 4.891996e-06
 96 (restart 0) KSP residual norm 4.221792e-06
 97 (restart 0) KSP residual norm 3.448051e-06
 98 (restart 0) KSP residual norm 2.803473e-06
 99 (restart 0) KSP residual norm 2.230566e-06
100 (restart 0) KSP residual norm 1.749352e-06
101 (restart 0) KSP residual norm 1.476622e-06
102 (restart 0) KSP residual norm 1.180482e-06
103 (restart 0) KSP residual norm 9.567908e-07
104 (restart 0) KSP residual norm 7.251037e-07
GMRES solver converged in 104 iterations (avg. reduction factor: 8.358e-01)

Greedy iteration 3 (n = 8): ω* = 2.924e+00 GHz (1.114e+01), error = 2.067e-02, memory = 0/2
 Field energy E (1.804e-10 J) + H (1.451e-10 J) = 3.254e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 1.372959e+02
  1 (restart 0) KSP residual norm 1.128715e+02
  2 (restart 0) KSP residual norm 8.912722e+01
  3 (restart 0) KSP residual norm 8.546913e+01
  4 (restart 0) KSP residual norm 3.221686e+01
  5 (restart 0) KSP residual norm 2.632163e+01
  6 (restart 0) KSP residual norm 1.305538e+01
  7 (restart 0) KSP residual norm 1.203742e+01
  8 (restart 0) KSP residual norm 8.230779e+00
  9 (restart 0) KSP residual norm 7.891549e+00
 10 (restart 0) KSP residual norm 4.913623e+00
 11 (restart 0) KSP residual norm 4.567958e+00
 12 (restart 0) KSP residual norm 3.389194e+00
 13 (restart 0) KSP residual norm 3.058161e+00
 14 (restart 0) KSP residual norm 2.844429e+00
 15 (restart 0) KSP residual norm 2.517300e+00
 16 (restart 0) KSP residual norm 2.135186e+00
 17 (restart 0) KSP residual norm 1.984746e+00
 18 (restart 0) KSP residual norm 1.751728e+00
 19 (restart 0) KSP residual norm 1.319259e+00
 20 (restart 0) KSP residual norm 1.227137e+00
 21 (restart 0) KSP residual norm 9.986861e-01
 22 (restart 0) KSP residual norm 9.354465e-01
 23 (restart 0) KSP residual norm 7.563072e-01
 24 (restart 0) KSP residual norm 6.661308e-01
 25 (restart 0) KSP residual norm 6.225457e-01
 26 (restart 0) KSP residual norm 5.463842e-01
 27 (restart 0) KSP residual norm 5.169146e-01
 28 (restart 0) KSP residual norm 4.302804e-01
 29 (restart 0) KSP residual norm 3.902731e-01
 30 (restart 0) KSP residual norm 3.633307e-01
 31 (restart 0) KSP residual norm 3.081742e-01
 32 (restart 0) KSP residual norm 2.737887e-01
 33 (restart 0) KSP residual norm 2.493960e-01
 34 (restart 0) KSP residual norm 2.218964e-01
 35 (restart 0) KSP residual norm 1.956791e-01
 36 (restart 0) KSP residual norm 1.758013e-01
 37 (restart 0) KSP residual norm 1.527805e-01
 38 (restart 0) KSP residual norm 1.350639e-01
 39 (restart 0) KSP residual norm 1.207223e-01
 40 (restart 0) KSP residual norm 1.021419e-01
 41 (restart 0) KSP residual norm 9.077256e-02
 42 (restart 0) KSP residual norm 7.572173e-02
 43 (restart 0) KSP residual norm 6.958446e-02
 44 (restart 0) KSP residual norm 5.815937e-02
 45 (restart 0) KSP residual norm 5.305829e-02
 46 (restart 0) KSP residual norm 4.736470e-02
 47 (restart 0) KSP residual norm 3.908551e-02
 48 (restart 0) KSP residual norm 3.231361e-02
 49 (restart 0) KSP residual norm 2.312278e-02
 50 (restart 0) KSP residual norm 1.817625e-02
 51 (restart 0) KSP residual norm 1.522597e-02
 52 (restart 0) KSP residual norm 1.291029e-02
 53 (restart 0) KSP residual norm 1.085184e-02
 54 (restart 0) KSP residual norm 9.077214e-03
 55 (restart 0) KSP residual norm 6.936694e-03
 56 (restart 0) KSP residual norm 5.633346e-03
 57 (restart 0) KSP residual norm 4.330025e-03
 58 (restart 0) KSP residual norm 3.566413e-03
 59 (restart 0) KSP residual norm 2.918939e-03
 60 (restart 0) KSP residual norm 2.372077e-03
 61 (restart 0) KSP residual norm 1.859969e-03
 62 (restart 0) KSP residual norm 1.463097e-03
 63 (restart 0) KSP residual norm 1.180329e-03
 64 (restart 0) KSP residual norm 8.808573e-04
 65 (restart 0) KSP residual norm 6.945934e-04
 66 (restart 0) KSP residual norm 5.380736e-04
 67 (restart 0) KSP residual norm 4.030670e-04
 68 (restart 0) KSP residual norm 3.117366e-04
 69 (restart 0) KSP residual norm 2.374652e-04
 70 (restart 0) KSP residual norm 1.911764e-04
 71 (restart 0) KSP residual norm 1.469482e-04
 72 (restart 0) KSP residual norm 1.151719e-04
 73 (restart 0) KSP residual norm 8.979172e-05
 74 (restart 0) KSP residual norm 6.930527e-05
 75 (restart 0) KSP residual norm 5.415952e-05
 76 (restart 0) KSP residual norm 4.059719e-05
 77 (restart 0) KSP residual norm 3.250670e-05
 78 (restart 0) KSP residual norm 2.528496e-05
 79 (restart 0) KSP residual norm 1.988229e-05
 80 (restart 0) KSP residual norm 1.634029e-05
 81 (restart 0) KSP residual norm 1.221817e-05
 82 (restart 0) KSP residual norm 9.314199e-06
 83 (restart 0) KSP residual norm 7.230490e-06
 84 (restart 0) KSP residual norm 5.724798e-06
 85 (restart 0) KSP residual norm 4.676204e-06
 86 (restart 0) KSP residual norm 3.566226e-06
 87 (restart 0) KSP residual norm 2.858742e-06
 88 (restart 0) KSP residual norm 2.254506e-06
 89 (restart 0) KSP residual norm 1.800814e-06
 90 (restart 0) KSP residual norm 1.388366e-06
 91 (restart 0) KSP residual norm 1.107893e-06
GMRES solver converged in 91 iterations (avg. reduction factor: 8.148e-01)

Greedy iteration 4 (n = 10): ω* = 3.809e+00 GHz (1.451e+01), error = 3.530e-03, memory = 0/2
 Field energy E (1.767e-10 J) + H (1.387e-10 J) = 3.154e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 6.222085e+01
  1 (restart 0) KSP residual norm 4.381337e+01
  2 (restart 0) KSP residual norm 3.419550e+01
  3 (restart 0) KSP residual norm 2.287002e+01
  4 (restart 0) KSP residual norm 1.998795e+01
  5 (restart 0) KSP residual norm 1.495055e+01
  6 (restart 0) KSP residual norm 1.260422e+01
  7 (restart 0) KSP residual norm 6.424551e+00
  8 (restart 0) KSP residual norm 5.116454e+00
  9 (restart 0) KSP residual norm 4.421058e+00
 10 (restart 0) KSP residual norm 3.904571e+00
 11 (restart 0) KSP residual norm 3.135637e+00
 12 (restart 0) KSP residual norm 2.914152e+00
 13 (restart 0) KSP residual norm 2.765510e+00
 14 (restart 0) KSP residual norm 2.657584e+00
 15 (restart 0) KSP residual norm 2.500346e+00
 16 (restart 0) KSP residual norm 2.420276e+00
 17 (restart 0) KSP residual norm 2.163025e+00
 18 (restart 0) KSP residual norm 2.106579e+00
 19 (restart 0) KSP residual norm 1.644889e+00
 20 (restart 0) KSP residual norm 1.622478e+00
 21 (restart 0) KSP residual norm 1.171059e+00
 22 (restart 0) KSP residual norm 1.128753e+00
 23 (restart 0) KSP residual norm 8.051986e-01
 24 (restart 0) KSP residual norm 6.440209e-01
 25 (restart 0) KSP residual norm 5.921281e-01
 26 (restart 0) KSP residual norm 4.829806e-01
 27 (restart 0) KSP residual norm 4.562400e-01
 28 (restart 0) KSP residual norm 3.640074e-01
 29 (restart 0) KSP residual norm 3.324961e-01
 30 (restart 0) KSP residual norm 2.801600e-01
 31 (restart 0) KSP residual norm 2.516290e-01
 32 (restart 0) KSP residual norm 2.174024e-01
 33 (restart 0) KSP residual norm 1.797887e-01
 34 (restart 0) KSP residual norm 1.647001e-01
 35 (restart 0) KSP residual norm 1.370087e-01
 36 (restart 0) KSP residual norm 1.265886e-01
 37 (restart 0) KSP residual norm 1.057798e-01
 38 (restart 0) KSP residual norm 9.356038e-02
 39 (restart 0) KSP residual norm 8.208251e-02
 40 (restart 0) KSP residual norm 7.215524e-02
 41 (restart 0) KSP residual norm 6.408075e-02
 42 (restart 0) KSP residual norm 5.757803e-02
 43 (restart 0) KSP residual norm 5.048022e-02
 44 (restart 0) KSP residual norm 4.418607e-02
 45 (restart 0) KSP residual norm 4.003496e-02
 46 (restart 0) KSP residual norm 3.566512e-02
 47 (restart 0) KSP residual norm 3.231030e-02
 48 (restart 0) KSP residual norm 2.788927e-02
 49 (restart 0) KSP residual norm 2.591259e-02
 50 (restart 0) KSP residual norm 2.295406e-02
 51 (restart 0) KSP residual norm 2.050630e-02
 52 (restart 0) KSP residual norm 1.689337e-02
 53 (restart 0) KSP residual norm 1.494613e-02
 54 (restart 0) KSP residual norm 1.256695e-02
 55 (restart 0) KSP residual norm 1.113618e-02
 56 (restart 0) KSP residual norm 8.991409e-03
 57 (restart 0) KSP residual norm 7.772763e-03
 58 (restart 0) KSP residual norm 6.531004e-03
 59 (restart 0) KSP residual norm 5.442527e-03
 60 (restart 0) KSP residual norm 4.336628e-03
 61 (restart 0) KSP residual norm 3.514321e-03
 62 (restart 0) KSP residual norm 2.827697e-03
 63 (restart 0) KSP residual norm 2.383514e-03
 64 (restart 0) KSP residual norm 1.980419e-03
 65 (restart 0) KSP residual norm 1.597098e-03
 66 (restart 0) KSP residual norm 1.322080e-03
 67 (restart 0) KSP residual norm 1.047992e-03
 68 (restart 0) KSP residual norm 8.421180e-04
 69 (restart 0) KSP residual norm 6.585459e-04
 70 (restart 0) KSP residual norm 5.003593e-04
 71 (restart 0) KSP residual norm 3.975060e-04
 72 (restart 0) KSP residual norm 3.139329e-04
 73 (restart 0) KSP residual norm 2.427717e-04
 74 (restart 0) KSP residual norm 1.926201e-04
 75 (restart 0) KSP residual norm 1.576160e-04
 76 (restart 0) KSP residual norm 1.258398e-04
 77 (restart 0) KSP residual norm 9.624037e-05
 78 (restart 0) KSP residual norm 8.131621e-05
 79 (restart 0) KSP residual norm 6.607089e-05
 80 (restart 0) KSP residual norm 4.985662e-05
 81 (restart 0) KSP residual norm 3.959006e-05
 82 (restart 0) KSP residual norm 3.101511e-05
 83 (restart 0) KSP residual norm 2.412430e-05
 84 (restart 0) KSP residual norm 2.039786e-05
 85 (restart 0) KSP residual norm 1.638222e-05
 86 (restart 0) KSP residual norm 1.318017e-05
 87 (restart 0) KSP residual norm 1.012080e-05
 88 (restart 0) KSP residual norm 7.468368e-06
 89 (restart 0) KSP residual norm 5.854505e-06
 90 (restart 0) KSP residual norm 4.448338e-06
 91 (restart 0) KSP residual norm 3.369989e-06
 92 (restart 0) KSP residual norm 2.697929e-06
 93 (restart 0) KSP residual norm 2.177307e-06
 94 (restart 0) KSP residual norm 1.710142e-06
 95 (restart 0) KSP residual norm 1.287683e-06
 96 (restart 0) KSP residual norm 9.997472e-07
 97 (restart 0) KSP residual norm 7.756246e-07
 98 (restart 0) KSP residual norm 5.663468e-07
GMRES solver converged in 98 iterations (avg. reduction factor: 8.278e-01)

Greedy iteration 5 (n = 12): ω* = 2.663e+00 GHz (1.015e+01), error = 3.258e-03, memory = 0/2
 Field energy E (1.114e-10 J) + H (9.199e-11 J) = 2.034e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 2.535874e+02
  1 (restart 0) KSP residual norm 2.490783e+02
  2 (restart 0) KSP residual norm 3.652298e+01
  3 (restart 0) KSP residual norm 2.500372e+01
  4 (restart 0) KSP residual norm 1.623279e+01
  5 (restart 0) KSP residual norm 1.600993e+01
  6 (restart 0) KSP residual norm 1.246772e+01
  7 (restart 0) KSP residual norm 1.129512e+01
  8 (restart 0) KSP residual norm 1.070943e+01
  9 (restart 0) KSP residual norm 9.127092e+00
 10 (restart 0) KSP residual norm 8.847800e+00
 11 (restart 0) KSP residual norm 7.922787e+00
 12 (restart 0) KSP residual norm 7.387119e+00
 13 (restart 0) KSP residual norm 6.780079e+00
 14 (restart 0) KSP residual norm 5.392184e+00
 15 (restart 0) KSP residual norm 5.286355e+00
 16 (restart 0) KSP residual norm 3.935810e+00
 17 (restart 0) KSP residual norm 3.771180e+00
 18 (restart 0) KSP residual norm 2.974326e+00
 19 (restart 0) KSP residual norm 2.909686e+00
 20 (restart 0) KSP residual norm 2.443514e+00
 21 (restart 0) KSP residual norm 2.348887e+00
 22 (restart 0) KSP residual norm 2.014583e+00
 23 (restart 0) KSP residual norm 1.969284e+00
 24 (restart 0) KSP residual norm 1.713132e+00
 25 (restart 0) KSP residual norm 1.649370e+00
 26 (restart 0) KSP residual norm 1.319584e+00
 27 (restart 0) KSP residual norm 1.256733e+00
 28 (restart 0) KSP residual norm 1.041676e+00
 29 (restart 0) KSP residual norm 9.532907e-01
 30 (restart 0) KSP residual norm 8.586915e-01
 31 (restart 0) KSP residual norm 7.226973e-01
 32 (restart 0) KSP residual norm 6.201188e-01
 33 (restart 0) KSP residual norm 5.630776e-01
 34 (restart 0) KSP residual norm 4.817622e-01
 35 (restart 0) KSP residual norm 4.265927e-01
 36 (restart 0) KSP residual norm 3.588622e-01
 37 (restart 0) KSP residual norm 3.107969e-01
 38 (restart 0) KSP residual norm 2.785809e-01
 39 (restart 0) KSP residual norm 2.407726e-01
 40 (restart 0) KSP residual norm 2.126014e-01
 41 (restart 0) KSP residual norm 1.768253e-01
 42 (restart 0) KSP residual norm 1.425849e-01
 43 (restart 0) KSP residual norm 1.223558e-01
 44 (restart 0) KSP residual norm 9.900582e-02
 45 (restart 0) KSP residual norm 8.679791e-02
 46 (restart 0) KSP residual norm 7.461620e-02
 47 (restart 0) KSP residual norm 6.444422e-02
 48 (restart 0) KSP residual norm 5.567814e-02
 49 (restart 0) KSP residual norm 4.760342e-02
 50 (restart 0) KSP residual norm 4.190164e-02
 51 (restart 0) KSP residual norm 3.400770e-02
 52 (restart 0) KSP residual norm 2.941075e-02
 53 (restart 0) KSP residual norm 2.316184e-02
 54 (restart 0) KSP residual norm 1.968001e-02
 55 (restart 0) KSP residual norm 1.589984e-02
 56 (restart 0) KSP residual norm 1.366496e-02
 57 (restart 0) KSP residual norm 1.085874e-02
 58 (restart 0) KSP residual norm 9.196070e-03
 59 (restart 0) KSP residual norm 7.616862e-03
 60 (restart 0) KSP residual norm 6.400661e-03
 61 (restart 0) KSP residual norm 5.392925e-03
 62 (restart 0) KSP residual norm 4.158556e-03
 63 (restart 0) KSP residual norm 3.487808e-03
 64 (restart 0) KSP residual norm 2.720670e-03
 65 (restart 0) KSP residual norm 2.400893e-03
 66 (restart 0) KSP residual norm 1.966862e-03
 67 (restart 0) KSP residual norm 1.708589e-03
 68 (restart 0) KSP residual norm 1.402091e-03
 69 (restart 0) KSP residual norm 1.160595e-03
 70 (restart 0) KSP residual norm 9.375729e-04
 71 (restart 0) KSP residual norm 7.682539e-04
 72 (restart 0) KSP residual norm 6.433656e-04
 73 (restart 0) KSP residual norm 5.561198e-04
 74 (restart 0) KSP residual norm 4.668754e-04
 75 (restart 0) KSP residual norm 3.863634e-04
 76 (restart 0) KSP residual norm 3.161325e-04
 77 (restart 0) KSP residual norm 2.422457e-04
 78 (restart 0) KSP residual norm 1.896312e-04
 79 (restart 0) KSP residual norm 1.457312e-04
 80 (restart 0) KSP residual norm 1.144688e-04
 81 (restart 0) KSP residual norm 9.605358e-05
 82 (restart 0) KSP residual norm 8.294798e-05
 83 (restart 0) KSP residual norm 7.070766e-05
 84 (restart 0) KSP residual norm 5.852022e-05
 85 (restart 0) KSP residual norm 4.708698e-05
 86 (restart 0) KSP residual norm 3.903079e-05
 87 (restart 0) KSP residual norm 3.174705e-05
 88 (restart 0) KSP residual norm 2.567829e-05
 89 (restart 0) KSP residual norm 2.031271e-05
 90 (restart 0) KSP residual norm 1.580737e-05
 91 (restart 0) KSP residual norm 1.270921e-05
 92 (restart 0) KSP residual norm 9.942090e-06
 93 (restart 0) KSP residual norm 7.824863e-06
 94 (restart 0) KSP residual norm 6.289548e-06
 95 (restart 0) KSP residual norm 5.075182e-06
 96 (restart 0) KSP residual norm 4.010277e-06
 97 (restart 0) KSP residual norm 3.164513e-06
 98 (restart 0) KSP residual norm 2.518475e-06
GMRES solver converged in 98 iterations (avg. reduction factor: 8.286e-01)

Greedy iteration 6 (n = 14): ω* = 3.025e+00 GHz (1.153e+01), error = 9.695e-04, memory = 1/2
 Field energy E (2.621e-10 J) + H (2.210e-10 J) = 4.831e-10 J

  Residual norms for GMRES solve
  0 (restart 0) KSP residual norm 1.930300e+02
  1 (restart 0) KSP residual norm 1.486121e+02
  2 (restart 0) KSP residual norm 9.058308e+01
  3 (restart 0) KSP residual norm 7.425036e+01
  4 (restart 0) KSP residual norm 4.227448e+01
  5 (restart 0) KSP residual norm 4.085673e+01
  6 (restart 0) KSP residual norm 2.325765e+01
  7 (restart 0) KSP residual norm 1.834803e+01
  8 (restart 0) KSP residual norm 1.439011e+01
  9 (restart 0) KSP residual norm 1.317514e+01
 10 (restart 0) KSP residual norm 8.147007e+00
 11 (restart 0) KSP residual norm 7.673532e+00
 12 (restart 0) KSP residual norm 5.351121e+00
 13 (restart 0) KSP residual norm 5.099402e+00
 14 (restart 0) KSP residual norm 3.973760e+00
 15 (restart 0) KSP residual norm 3.647087e+00
 16 (restart 0) KSP residual norm 3.000290e+00
 17 (restart 0) KSP residual norm 2.701561e+00
 18 (restart 0) KSP residual norm 2.353383e+00
 19 (restart 0) KSP residual norm 2.173996e+00
 20 (restart 0) KSP residual norm 1.924804e+00
 21 (restart 0) KSP residual norm 1.530308e+00
 22 (restart 0) KSP residual norm 1.390681e+00
 23 (restart 0) KSP residual norm 1.213257e+00
 24 (restart 0) KSP residual norm 1.169319e+00
 25 (restart 0) KSP residual norm 1.047080e+00
 26 (restart 0) KSP residual norm 9.090855e-01
 27 (restart 0) KSP residual norm 7.111096e-01
 28 (restart 0) KSP residual norm 6.391407e-01
 29 (restart 0) KSP residual norm 4.616208e-01
 30 (restart 0) KSP residual norm 3.929084e-01
 31 (restart 0) KSP residual norm 3.310419e-01
 32 (restart 0) KSP residual norm 2.913446e-01
 33 (restart 0) KSP residual norm 2.505471e-01
 34 (restart 0) KSP residual norm 2.206247e-01
 35 (restart 0) KSP residual norm 1.820965e-01
 36 (restart 0) KSP residual norm 1.596558e-01
 37 (restart 0) KSP residual norm 1.252252e-01
 38 (restart 0) KSP residual norm 1.099865e-01
 39 (restart 0) KSP residual norm 9.385903e-02
 40 (restart 0) KSP residual norm 8.129578e-02
 41 (restart 0) KSP residual norm 7.199896e-02
 42 (restart 0) KSP residual norm 6.061779e-02
 43 (restart 0) KSP residual norm 5.350946e-02
 44 (restart 0) KSP residual norm 4.735193e-02
 45 (restart 0) KSP residual norm 4.020791e-02
 46 (restart 0) KSP residual norm 3.338069e-02
 47 (restart 0) KSP residual norm 2.863165e-02
 48 (restart 0) KSP residual norm 2.345198e-02
 49 (restart 0) KSP residual norm 1.999858e-02
 50 (restart 0) KSP residual norm 1.733930e-02
 51 (restart 0) KSP residual norm 1.511007e-02
 52 (restart 0) KSP residual norm 1.253086e-02
 53 (restart 0) KSP residual norm 1.071864e-02
 54 (restart 0) KSP residual norm 8.654238e-03
 55 (restart 0) KSP residual norm 7.028552e-03
 56 (restart 0) KSP residual norm 6.041806e-03
 57 (restart 0) KSP residual norm 5.066366e-03
 58 (restart 0) KSP residual norm 4.428582e-03
 59 (restart 0) KSP residual norm 3.729887e-03
 60 (restart 0) KSP residual norm 3.150696e-03
 61 (restart 0) KSP residual norm 2.682870e-03
 62 (restart 0) KSP residual norm 2.254940e-03
 63 (restart 0) KSP residual norm 1.890621e-03
 64 (restart 0) KSP residual norm 1.631501e-03
 65 (restart 0) KSP residual norm 1.368213e-03
 66 (restart 0) KSP residual norm 1.116512e-03
 67 (restart 0) KSP residual norm 8.612473e-04
 68 (restart 0) KSP residual norm 6.818560e-04
 69 (restart 0) KSP residual norm 5.753370e-04
 70 (restart 0) KSP residual norm 4.944585e-04
 71 (restart 0) KSP residual norm 4.006294e-04
 72 (restart 0) KSP residual norm 3.317791e-04
 73 (restart 0) KSP residual norm 2.805047e-04
 74 (restart 0) KSP residual norm 2.295977e-04
 75 (restart 0) KSP residual norm 1.949779e-04
 76 (restart 0) KSP residual norm 1.603829e-04
 77 (restart 0) KSP residual norm 1.376361e-04
 78 (restart 0) KSP residual norm 1.123122e-04
 79 (restart 0) KSP residual norm 9.393307e-05
 80 (restart 0) KSP residual norm 6.748733e-05
 81 (restart 0) KSP residual norm 5.514348e-05
 82 (restart 0) KSP residual norm 4.623780e-05
 83 (restart 0) KSP residual norm 4.099595e-05
 84 (restart 0) KSP residual norm 3.063596e-05
 85 (restart 0) KSP residual norm 2.386411e-05
 86 (restart 0) KSP residual norm 1.879529e-05
 87 (restart 0) KSP residual norm 1.512025e-05
 88 (restart 0) KSP residual norm 1.178537e-05
 89 (restart 0) KSP residual norm 9.173912e-06
 90 (restart 0) KSP residual norm 7.124294e-06
 91 (restart 0) KSP residual norm 5.454701e-06
 92 (restart 0) KSP residual norm 4.314241e-06
 93 (restart 0) KSP residual norm 3.307069e-06
 94 (restart 0) KSP residual norm 2.517918e-06
 95 (restart 0) KSP residual norm 1.970565e-06
 96 (restart 0) KSP residual norm 1.471577e-06
GMRES solver converged in 96 iterations (avg. reduction factor: 8.231e-01)

Greedy iteration 7 (n = 16): ω* = 3.640e+00 GHz (1.387e+01), error = 8.617e-05, memory = 2/2
 Field energy E (1.961e-10 J) + H (1.642e-10 J) = 3.603e-10 J

Adaptive sampling converged with 9 frequency samples:
 n = 18, error = 8.617e-05, tol = 1.000e-03, memory = 2/2
 Sampled frequencies (GHz): 2.500e+00, 4.000e+00, 3.433e+00, 3.248e+00,
                            2.924e+00, 3.809e+00, 2.663e+00, 3.025e+00,
                            3.640e+00
 Sample errors: inf, inf, 9.133e-01, 2.433e-02, 2.067e-02,
                3.530e-03, 3.258e-03, 9.695e-04, 8.617e-05
 Total offline phase elapsed time: 7.84e+01 s

Beginning fast frequency sweep online phase

It 1/61: ω/2π = 2.500e+00 GHz (total elapsed time = 7.84e+01 s)

 Sol. ||E|| = 3.127238e+01
 Field energy E (9.443e-11 J) + H (8.540e-11 J) = 1.798e-10 J
 S[1][1] = +9.831e-01-1.419e-01i, |S[1][1]| = -5.890e-02, arg(S[1][1]) = -8.211e+00

 Wrote fields to disk (Paraview) at step 1

It 2/61: ω/2π = 2.525e+00 GHz (total elapsed time = 7.95e+01 s)

 Sol. ||E|| = 3.154322e+01
 Field energy E (9.654e-11 J) + H (8.587e-11 J) = 1.824e-10 J
 S[1][1] = +9.783e-01-1.693e-01i, |S[1][1]| = -6.264e-02, arg(S[1][1]) = -9.818e+00

It 3/61: ω/2π = 2.550e+00 GHz (total elapsed time = 8.03e+01 s)

 Sol. ||E|| = 3.182459e+01
 Field energy E (9.880e-11 J) + H (8.650e-11 J) = 1.853e-10 J
 S[1][1] = +9.726e-01-1.970e-01i, |S[1][1]| = -6.676e-02, arg(S[1][1]) = -1.145e+01

It 4/61: ω/2π = 2.575e+00 GHz (total elapsed time = 8.11e+01 s)

 Sol. ||E|| = 3.211780e+01
 Field energy E (1.012e-10 J) + H (8.732e-11 J) = 1.885e-10 J
 S[1][1] = +9.660e-01-2.249e-01i, |S[1][1]| = -7.132e-02, arg(S[1][1]) = -1.311e+01

It 5/61: ω/2π = 2.600e+00 GHz (total elapsed time = 8.20e+01 s)

 Sol. ||E|| = 3.242431e+01
 Field energy E (1.038e-10 J) + H (8.834e-11 J) = 1.922e-10 J
 S[1][1] = +9.584e-01-2.531e-01i, |S[1][1]| = -7.638e-02, arg(S[1][1]) = -1.479e+01

It 6/61: ω/2π = 2.625e+00 GHz (total elapsed time = 8.29e+01 s)

 Sol. ||E|| = 3.274585e+01
 Field energy E (1.067e-10 J) + H (8.958e-11 J) = 1.962e-10 J
 S[1][1] = +9.498e-01-2.815e-01i, |S[1][1]| = -8.202e-02, arg(S[1][1]) = -1.651e+01

 Wrote fields to disk (Paraview) at step 6

It 7/61: ω/2π = 2.650e+00 GHz (total elapsed time = 8.42e+01 s)

 Sol. ||E|| = 3.308446e+01
 Field energy E (1.097e-10 J) + H (9.109e-11 J) = 2.008e-10 J
 S[1][1] = +9.400e-01-3.102e-01i, |S[1][1]| = -8.834e-02, arg(S[1][1]) = -1.826e+01

It 8/61: ω/2π = 2.675e+00 GHz (total elapsed time = 8.52e+01 s)

 Sol. ||E|| = 3.344253e+01
 Field energy E (1.131e-10 J) + H (9.289e-11 J) = 2.060e-10 J
 S[1][1] = +9.291e-01-3.393e-01i, |S[1][1]| = -9.545e-02, arg(S[1][1]) = -2.006e+01

It 9/61: ω/2π = 2.700e+00 GHz (total elapsed time = 8.63e+01 s)

 Sol. ||E|| = 3.382289e+01
 Field energy E (1.168e-10 J) + H (9.503e-11 J) = 2.118e-10 J
 S[1][1] = +9.168e-01-3.686e-01i, |S[1][1]| = -1.035e-01, arg(S[1][1]) = -2.190e+01

It 10/61: ω/2π = 2.725e+00 GHz (total elapsed time = 8.74e+01 s)

 Sol. ||E|| = 3.422895e+01
 Field energy E (1.208e-10 J) + H (9.757e-11 J) = 2.184e-10 J
 S[1][1] = +9.032e-01-3.983e-01i, |S[1][1]| = -1.126e-01, arg(S[1][1]) = -2.380e+01

It 11/61: ω/2π = 2.750e+00 GHz (total elapsed time = 8.85e+01 s)

 Sol. ||E|| = 3.466481e+01
 Field energy E (1.254e-10 J) + H (1.006e-10 J) = 2.259e-10 J
 S[1][1] = +8.880e-01-4.284e-01i, |S[1][1]| = -1.231e-01, arg(S[1][1]) = -2.576e+01

 Wrote fields to disk (Paraview) at step 11

It 12/61: ω/2π = 2.775e+00 GHz (total elapsed time = 9.00e+01 s)

 Sol. ||E|| = 3.513547e+01
 Field energy E (1.304e-10 J) + H (1.041e-10 J) = 2.345e-10 J
 S[1][1] = +8.711e-01-4.589e-01i, |S[1][1]| = -1.351e-01, arg(S[1][1]) = -2.778e+01

It 13/61: ω/2π = 2.800e+00 GHz (total elapsed time = 9.12e+01 s)

 Sol. ||E|| = 3.564703e+01
 Field energy E (1.362e-10 J) + H (1.083e-10 J) = 2.445e-10 J
 S[1][1] = +8.523e-01-4.898e-01i, |S[1][1]| = -1.490e-01, arg(S[1][1]) = -2.988e+01

It 14/61: ω/2π = 2.825e+00 GHz (total elapsed time = 9.24e+01 s)

 Sol. ||E|| = 3.620704e+01
 Field energy E (1.427e-10 J) + H (1.133e-10 J) = 2.560e-10 J
 S[1][1] = +8.313e-01-5.211e-01i, |S[1][1]| = -1.654e-01, arg(S[1][1]) = -3.208e+01

It 15/61: ω/2π = 2.850e+00 GHz (total elapsed time = 9.37e+01 s)

 Sol. ||E|| = 3.682492e+01
 Field energy E (1.501e-10 J) + H (1.193e-10 J) = 2.694e-10 J
 S[1][1] = +8.079e-01-5.528e-01i, |S[1][1]| = -1.846e-01, arg(S[1][1]) = -3.438e+01

It 16/61: ω/2π = 2.875e+00 GHz (total elapsed time = 9.50e+01 s)

 Sol. ||E|| = 3.751249e+01
 Field energy E (1.588e-10 J) + H (1.264e-10 J) = 2.852e-10 J
 S[1][1] = +7.817e-01-5.850e-01i, |S[1][1]| = -2.074e-01, arg(S[1][1]) = -3.681e+01

 Wrote fields to disk (Paraview) at step 16

It 17/61: ω/2π = 2.900e+00 GHz (total elapsed time = 9.67e+01 s)

 Sol. ||E|| = 3.828480e+01
 Field energy E (1.689e-10 J) + H (1.350e-10 J) = 3.040e-10 J
 S[1][1] = +7.523e-01-6.176e-01i, |S[1][1]| = -2.350e-01, arg(S[1][1]) = -3.939e+01

It 18/61: ω/2π = 2.925e+00 GHz (total elapsed time = 9.82e+01 s)

 Sol. ||E|| = 3.916146e+01
 Field energy E (1.810e-10 J) + H (1.456e-10 J) = 3.265e-10 J
 S[1][1] = +7.189e-01-6.505e-01i, |S[1][1]| = -2.685e-01, arg(S[1][1]) = -4.214e+01

It 19/61: ω/2π = 2.950e+00 GHz (total elapsed time = 9.96e+01 s)

 Sol. ||E|| = 4.016750e+01
 Field energy E (1.954e-10 J) + H (1.585e-10 J) = 3.539e-10 J
 S[1][1] = +6.810e-01-6.837e-01i, |S[1][1]| = -3.098e-01, arg(S[1][1]) = -4.511e+01

It 20/61: ω/2π = 2.975e+00 GHz (total elapsed time = 1.01e+02 s)

 Sol. ||E|| = 4.133465e+01
 Field energy E (2.130e-10 J) + H (1.746e-10 J) = 3.876e-10 J
 S[1][1] = +6.375e-01-7.167e-01i, |S[1][1]| = -3.616e-01, arg(S[1][1]) = -4.835e+01

It 21/61: ω/2π = 3.000e+00 GHz (total elapsed time = 1.03e+02 s)

 Sol. ||E|| = 4.270686e+01
 Field energy E (2.347e-10 J) + H (1.950e-10 J) = 4.297e-10 J
 S[1][1] = +5.872e-01-7.493e-01i, |S[1][1]| = -4.276e-01, arg(S[1][1]) = -5.192e+01

 Wrote fields to disk (Paraview) at step 21

It 22/61: ω/2π = 3.025e+00 GHz (total elapsed time = 1.05e+02 s)

 Sol. ||E|| = 4.434163e+01
 Field energy E (2.621e-10 J) + H (2.210e-10 J) = 4.832e-10 J
 S[1][1] = +5.284e-01-7.806e-01i, |S[1][1]| = -5.135e-01, arg(S[1][1]) = -5.591e+01

It 23/61: ω/2π = 3.050e+00 GHz (total elapsed time = 1.06e+02 s)

 Sol. ||E|| = 4.631569e+01
 Field energy E (2.972e-10 J) + H (2.549e-10 J) = 5.521e-10 J
 S[1][1] = +4.589e-01-8.092e-01i, |S[1][1]| = -6.278e-01, arg(S[1][1]) = -6.044e+01

It 24/61: ω/2π = 3.075e+00 GHz (total elapsed time = 1.08e+02 s)

 Sol. ||E|| = 4.873113e+01
 Field energy E (3.429e-10 J) + H (2.998e-10 J) = 6.427e-10 J
 S[1][1] = +3.760e-01-8.328e-01i, |S[1][1]| = -7.838e-01, arg(S[1][1]) = -6.570e+01

It 25/61: ω/2π = 3.100e+00 GHz (total elapsed time = 1.10e+02 s)

 Sol. ||E|| = 5.172111e+01
 Field energy E (4.038e-10 J) + H (3.603e-10 J) = 7.640e-10 J
 S[1][1] = +2.761e-01-8.470e-01i, |S[1][1]| = -1.004e+00, arg(S[1][1]) = -7.195e+01

It 26/61: ω/2π = 3.125e+00 GHz (total elapsed time = 1.12e+02 s)

 Sol. ||E|| = 5.544988e+01
 Field energy E (4.860e-10 J) + H (4.430e-10 J) = 9.290e-10 J
 S[1][1] = +1.555e-01-8.445e-01i, |S[1][1]| = -1.324e+00, arg(S[1][1]) = -7.957e+01

 Wrote fields to disk (Paraview) at step 26

It 27/61: ω/2π = 3.150e+00 GHz (total elapsed time = 1.14e+02 s)

 Sol. ||E|| = 6.009117e+01
 Field energy E (5.981e-10 J) + H (5.571e-10 J) = 1.155e-09 J
 S[1][1] = +1.151e-02-8.119e-01i, |S[1][1]| = -1.809e+00, arg(S[1][1]) = -8.919e+01

It 28/61: ω/2π = 3.175e+00 GHz (total elapsed time = 1.16e+02 s)

 Sol. ||E|| = 6.574242e+01
 Field energy E (7.492e-10 J) + H (7.127e-10 J) = 1.462e-09 J
 S[1][1] = -1.524e-01-7.277e-01i, |S[1][1]| = -2.574e+00, arg(S[1][1]) = -1.018e+02

It 29/61: ω/2π = 3.200e+00 GHz (total elapsed time = 1.17e+02 s)

 Sol. ||E|| = 7.218857e+01
 Field energy E (9.417e-10 J) + H (9.137e-10 J) = 1.855e-09 J
 S[1][1] = -3.152e-01-5.617e-01i, |S[1][1]| = -3.821e+00, arg(S[1][1]) = -1.193e+02

It 30/61: ω/2π = 3.225e+00 GHz (total elapsed time = 1.19e+02 s)

 Sol. ||E|| = 7.844610e+01
 Field energy E (1.151e-09 J) + H (1.137e-09 J) = 2.288e-09 J
 S[1][1] = -4.198e-01-2.915e-01i, |S[1][1]| = -5.830e+00, arg(S[1][1]) = -1.452e+02

It 31/61: ω/2π = 3.250e+00 GHz (total elapsed time = 1.21e+02 s)

 Sol. ||E|| = 8.244404e+01
 Field energy E (1.303e-09 J) + H (1.305e-09 J) = 2.608e-09 J
 S[1][1] = -3.766e-01+4.828e-02i, |S[1][1]| = -8.411e+00, arg(S[1][1]) = +1.727e+02

 Wrote fields to disk (Paraview) at step 31

It 32/61: ω/2π = 3.275e+00 GHz (total elapsed time = 1.24e+02 s)

 Sol. ||E|| = 8.204990e+01
 Field energy E (1.305e-09 J) + H (1.321e-09 J) = 2.626e-09 J
 S[1][1] = -1.447e-01+3.319e-01i, |S[1][1]| = -8.825e+00, arg(S[1][1]) = +1.136e+02

It 33/61: ω/2π = 3.300e+00 GHz (total elapsed time = 1.26e+02 s)

 Sol. ||E|| = 7.731434e+01
 Field energy E (1.155e-09 J) + H (1.176e-09 J) = 2.331e-09 J
 S[1][1] = +1.838e-01+4.414e-01i, |S[1][1]| = -6.409e+00, arg(S[1][1]) = +6.739e+01

It 34/61: ω/2π = 3.325e+00 GHz (total elapsed time = 1.28e+02 s)

 Sol. ||E|| = 7.049695e+01
 Field energy E (9.430e-10 J) + H (9.616e-10 J) = 1.905e-09 J
 S[1][1] = +4.739e-01+3.874e-01i, |S[1][1]| = -4.264e+00, arg(S[1][1]) = +3.926e+01

It 35/61: ω/2π = 3.350e+00 GHz (total elapsed time = 1.30e+02 s)

 Sol. ||E|| = 6.376662e+01
 Field energy E (7.481e-10 J) + H (7.601e-10 J) = 1.508e-09 J
 S[1][1] = +6.699e-01+2.525e-01i, |S[1][1]| = -2.903e+00, arg(S[1][1]) = +2.066e+01

It 36/61: ω/2π = 3.375e+00 GHz (total elapsed time = 1.32e+02 s)

 Sol. ||E|| = 5.811103e+01
 Field energy E (5.964e-10 J) + H (6.011e-10 J) = 1.198e-09 J
 S[1][1] = +7.821e-01+1.002e-01i, |S[1][1]| = -2.064e+00, arg(S[1][1]) = +7.300e+00

 Wrote fields to disk (Paraview) at step 36

It 37/61: ω/2π = 3.400e+00 GHz (total elapsed time = 1.35e+02 s)

 Sol. ||E|| = 5.369081e+01
 Field energy E (4.855e-10 J) + H (4.835e-10 J) = 9.691e-10 J
 S[1][1] = +8.372e-01-4.174e-02i, |S[1][1]| = -1.533e+00, arg(S[1][1]) = -2.854e+00

It 38/61: ω/2π = 3.425e+00 GHz (total elapsed time = 1.37e+02 s)

 Sol. ||E|| = 5.034358e+01
 Field energy E (4.057e-10 J) + H (3.980e-10 J) = 8.037e-10 J
 S[1][1] = +8.570e-01-1.655e-01i, |S[1][1]| = -1.182e+00, arg(S[1][1]) = -1.093e+01

It 39/61: ω/2π = 3.450e+00 GHz (total elapsed time = 1.39e+02 s)

 Sol. ||E|| = 4.784135e+01
 Field energy E (3.480e-10 J) + H (3.355e-10 J) = 6.835e-10 J
 S[1][1] = +8.553e-01-2.712e-01i, |S[1][1]| = -9.412e-01, arg(S[1][1]) = -1.759e+01

It 40/61: ω/2π = 3.475e+00 GHz (total elapsed time = 1.41e+02 s)

 Sol. ||E|| = 4.598016e+01
 Field energy E (3.058e-10 J) + H (2.892e-10 J) = 5.950e-10 J
 S[1][1] = +8.407e-01-3.615e-01i, |S[1][1]| = -7.708e-01, arg(S[1][1]) = -2.327e+01

It 41/61: ω/2π = 3.500e+00 GHz (total elapsed time = 1.44e+02 s)

 Sol. ||E|| = 4.459951e+01
 Field energy E (2.744e-10 J) + H (2.545e-10 J) = 5.289e-10 J
 S[1][1] = +8.179e-01-4.391e-01i, |S[1][1]| = -6.464e-01, arg(S[1][1]) = -2.823e+01

 Wrote fields to disk (Paraview) at step 41

It 42/61: ω/2π = 3.525e+00 GHz (total elapsed time = 1.47e+02 s)

 Sol. ||E|| = 4.357915e+01
 Field energy E (2.509e-10 J) + H (2.280e-10 J) = 4.788e-10 J
 S[1][1] = +7.899e-01-5.064e-01i, |S[1][1]| = -5.534e-01, arg(S[1][1]) = -3.266e+01

It 43/61: ω/2π = 3.550e+00 GHz (total elapsed time = 1.49e+02 s)

 Sol. ||E|| = 4.283053e+01
 Field energy E (2.329e-10 J) + H (2.076e-10 J) = 4.405e-10 J
 S[1][1] = +7.584e-01-5.654e-01i, |S[1][1]| = -4.823e-01, arg(S[1][1]) = -3.670e+01

It 44/61: ω/2π = 3.575e+00 GHz (total elapsed time = 1.52e+02 s)

 Sol. ||E|| = 4.228870e+01
 Field energy E (2.191e-10 J) + H (1.916e-10 J) = 4.107e-10 J
 S[1][1] = +7.246e-01-6.175e-01i, |S[1][1]| = -4.271e-01, arg(S[1][1]) = -4.044e+01

It 45/61: ω/2π = 3.600e+00 GHz (total elapsed time = 1.54e+02 s)

 Sol. ||E|| = 4.190578e+01
 Field energy E (2.084e-10 J) + H (1.791e-10 J) = 3.875e-10 J
 S[1][1] = +6.889e-01-6.640e-01i, |S[1][1]| = -3.836e-01, arg(S[1][1]) = -4.394e+01

It 46/61: ω/2π = 3.625e+00 GHz (total elapsed time = 1.57e+02 s)

 Sol. ||E|| = 4.164629e+01
 Field energy E (2.001e-10 J) + H (1.691e-10 J) = 3.692e-10 J
 S[1][1] = +6.519e-01-7.056e-01i, |S[1][1]| = -3.489e-01, arg(S[1][1]) = -4.727e+01

 Wrote fields to disk (Paraview) at step 46

It 47/61: ω/2π = 3.650e+00 GHz (total elapsed time = 1.60e+02 s)

 Sol. ||E|| = 4.148362e+01
 Field energy E (1.936e-10 J) + H (1.612e-10 J) = 3.548e-10 J
 S[1][1] = +6.137e-01-7.431e-01i, |S[1][1]| = -3.210e-01, arg(S[1][1]) = -5.045e+01

It 48/61: ω/2π = 3.675e+00 GHz (total elapsed time = 1.63e+02 s)

 Sol. ||E|| = 4.139766e+01
 Field energy E (1.886e-10 J) + H (1.550e-10 J) = 3.436e-10 J
 S[1][1] = +5.745e-01-7.769e-01i, |S[1][1]| = -2.983e-01, arg(S[1][1]) = -5.352e+01

It 49/61: ω/2π = 3.700e+00 GHz (total elapsed time = 1.65e+02 s)

 Sol. ||E|| = 4.137299e+01
 Field energy E (1.847e-10 J) + H (1.500e-10 J) = 3.347e-10 J
 S[1][1] = +5.344e-01-8.074e-01i, |S[1][1]| = -2.799e-01, arg(S[1][1]) = -5.650e+01

It 50/61: ω/2π = 3.725e+00 GHz (total elapsed time = 1.68e+02 s)

 Sol. ||E|| = 4.139769e+01
 Field energy E (1.818e-10 J) + H (1.461e-10 J) = 3.279e-10 J
 S[1][1] = +4.935e-01-8.350e-01i, |S[1][1]| = -2.648e-01, arg(S[1][1]) = -5.942e+01

It 51/61: ω/2π = 3.750e+00 GHz (total elapsed time = 1.71e+02 s)

 Sol. ||E|| = 4.146243e+01
 Field energy E (1.796e-10 J) + H (1.431e-10 J) = 3.227e-10 J
 S[1][1] = +4.518e-01-8.599e-01i, |S[1][1]| = -2.524e-01, arg(S[1][1]) = -6.228e+01

 Wrote fields to disk (Paraview) at step 51

It 52/61: ω/2π = 3.775e+00 GHz (total elapsed time = 1.74e+02 s)

 Sol. ||E|| = 4.155978e+01
 Field energy E (1.780e-10 J) + H (1.408e-10 J) = 3.188e-10 J
 S[1][1] = +4.094e-01-8.821e-01i, |S[1][1]| = -2.422e-01, arg(S[1][1]) = -6.510e+01

It 53/61: ω/2π = 3.800e+00 GHz (total elapsed time = 1.77e+02 s)

 Sol. ||E|| = 4.168380e+01
 Field energy E (1.769e-10 J) + H (1.392e-10 J) = 3.161e-10 J
 S[1][1] = +3.662e-01-9.019e-01i, |S[1][1]| = -2.339e-01, arg(S[1][1]) = -6.790e+01

It 54/61: ω/2π = 3.825e+00 GHz (total elapsed time = 1.80e+02 s)

 Sol. ||E|| = 4.182965e+01
 Field energy E (1.763e-10 J) + H (1.380e-10 J) = 3.143e-10 J
 S[1][1] = +3.223e-01-9.193e-01i, |S[1][1]| = -2.272e-01, arg(S[1][1]) = -7.068e+01

It 55/61: ω/2π = 3.850e+00 GHz (total elapsed time = 1.83e+02 s)

 Sol. ||E|| = 4.199333e+01
 Field energy E (1.760e-10 J) + H (1.374e-10 J) = 3.134e-10 J
 S[1][1] = +2.777e-01-9.344e-01i, |S[1][1]| = -2.218e-01, arg(S[1][1]) = -7.345e+01

It 56/61: ω/2π = 3.875e+00 GHz (total elapsed time = 1.86e+02 s)

 Sol. ||E|| = 4.217152e+01
 Field energy E (1.760e-10 J) + H (1.371e-10 J) = 3.131e-10 J
 S[1][1] = +2.324e-01-9.472e-01i, |S[1][1]| = -2.175e-01, arg(S[1][1]) = -7.622e+01

 Wrote fields to disk (Paraview) at step 56

It 57/61: ω/2π = 3.900e+00 GHz (total elapsed time = 1.89e+02 s)

 Sol. ||E|| = 4.236137e+01
 Field energy E (1.763e-10 J) + H (1.372e-10 J) = 3.135e-10 J
 S[1][1] = +1.865e-01-9.577e-01i, |S[1][1]| = -2.142e-01, arg(S[1][1]) = -7.898e+01

It 58/61: ω/2π = 3.925e+00 GHz (total elapsed time = 1.92e+02 s)

 Sol. ||E|| = 4.256043e+01
 Field energy E (1.768e-10 J) + H (1.376e-10 J) = 3.144e-10 J
 S[1][1] = +1.400e-01-9.658e-01i, |S[1][1]| = -2.117e-01, arg(S[1][1]) = -8.175e+01

It 59/61: ω/2π = 3.950e+00 GHz (total elapsed time = 1.95e+02 s)

 Sol. ||E|| = 4.276658e+01
 Field energy E (1.774e-10 J) + H (1.383e-10 J) = 3.157e-10 J
 S[1][1] = +9.293e-02-9.717e-01i, |S[1][1]| = -2.100e-01, arg(S[1][1]) = -8.454e+01

It 60/61: ω/2π = 3.975e+00 GHz (total elapsed time = 1.98e+02 s)

 Sol. ||E|| = 4.297789e+01
 Field energy E (1.782e-10 J) + H (1.392e-10 J) = 3.174e-10 J
 S[1][1] = +4.541e-02-9.752e-01i, |S[1][1]| = -2.088e-01, arg(S[1][1]) = -8.733e+01

It 61/61: ω/2π = 4.000e+00 GHz (total elapsed time = 2.02e+02 s)

 Sol. ||E|| = 4.319265e+01
 Field energy E (1.791e-10 J) + H (1.403e-10 J) = 3.194e-10 J
 S[1][1] = -2.519e-03-9.763e-01i, |S[1][1]| = -2.082e-01, arg(S[1][1]) = -9.015e+01

 Wrote fields to disk (Paraview) at step 61

Completed 0 iterations of adaptive mesh refinement (AMR):
 Indicator norm = 1.328e-01, global unknowns = 189090
 Max. iterations = 0, tol. = 1.000e-02

Estimated peak per-rank memory usage is: Min. 172.6M, Max. 682.4M, Avg. 209.3M, Total 3.3G
Estimated peak per-node memory usage is: Min. 3.3G, Max. 3.3G, Avg. 3.3G, Total 3.3G

Elapsed Time Report (s)           Min.        Max.        Avg.
==============================================================
Initialization                   0.035       0.116       0.109
  Mesh Preprocessing             0.067       0.141       0.071
Operator Construction            0.450      60.657      56.887
Linear Solve                     8.382       8.548       8.413
  Setup                          3.987       3.988       3.988
  Preconditioner                57.619      58.089      58.026
  Coarse Solve                   4.493       4.822       4.534
PROM Construction                0.142       0.147       0.143
PROM Solve                       0.011       0.012       0.011
Estimation                       0.047       0.052       0.050
  Construction                   0.300       0.301       0.300
  Solve                          3.153       3.156       3.154
Postprocessing                   0.454      76.883       5.232
  Far Fields                    44.855      44.868      44.861
  Paraview                       4.867      21.089      20.074
Disk IO                          0.081       0.082       0.082
--------------------------------------------------------------
Total                          206.296     206.316     206.307

Peak Memory                   Per-Node       Total   Total HWM
==============================================================
Initialization                   76.8M       76.8M       76.8M
  Mesh Preprocessing             59.8M       59.8M      136.6M
Operator Construction           150.9M      150.9M      287.6M
Linear Solve                      2.1M        2.1M      289.7M
  Setup                         525.7M      525.7M      815.4M
  Preconditioner                 13.9M       13.9M      829.3M
  Coarse Solve                    1.1G        1.1G        1.9G
PROM Construction                 0.0K        0.0K        1.9G
PROM Solve                      520.0K      520.0K        1.9G
Estimation                        6.2M        6.2M        1.9G
  Construction                  222.9M      222.9M        2.1G
  Solve                         256.0K      256.0K        2.1G
Postprocessing                  495.1M      495.1M        2.6G
  Far Fields                      0.0K        0.0K        2.6G
  Paraview                        2.2M        2.2M        2.6G
Disk IO                          11.2M       11.2M        2.6G
--------------------------------------------------------------
Total                             2.9G        2.9G        2.9G

Post processing.#

We want to see the S parameters, H plane, E plane and the radiation pattern.

# S parameters. Return the frequency where the minimum is reached.
from pathlib import Path

notebook_dir = Path().resolve()
postpro_dir = notebook_dir / "postpro" / "patch"

f = s_params(str(postpro_dir / "port-S.csv"))
../_images/049d7011a4a288a929769ea9c81b1f2fa47c6013c63e947a50a9a750abc1e788.png

Additional Field Visualizations at Resonant Frequency f#

The next two views use the new VTU workflow:

  • Surface-current-oriented view over antenna conductors.

  • A z-slice in the air region above the patch to inspect forward propagation.

import importlib

import pyvista as pv
import palacetoolkit.postpro_vtu as postpro_vtu

postpro_vtu = importlib.reload(postpro_vtu)

# Prefer interactive backends in notebooks.
pv_backend = "static"
for candidate in ("trame", "client", "server"):
    try:
        pv.set_jupyter_backend(candidate)
        pv_backend = candidate
        break
    except Exception:
        pass

# Synchronize boundary/volume steps to the solved frequency f.
boundary_step, volume_step = postpro_vtu.resolve_synced_step_indices(
    postpro_dir,
    boundary_dataset="driven_boundary",
    volume_dataset="driven",
    timestep=float(f),
)

selector_ctx = postpro_vtu.build_selector_context("patch.config", pg_map)
conductors = ["top_conductor", "ground_plane"]
boundary_fields = postpro_vtu.load_boundary_field_data(
    postpro_dir,
    selector_ctx,
    entity_names=conductors,
    dataset_name="driven_boundary",
    step_index=boundary_step,
)

# Prefer explicit current-like vectors when present.
surface_vector_candidates = ["Jsurf_real", "J_real", "Jsurf", "J", "K_real", "K", "H_real", "E_real", "S"]
available_boundary = set(boundary_fields.point_arrays)
surface_vector = next((name for name in surface_vector_candidates if name in available_boundary), None)
if surface_vector is None:
    raise KeyError(f"No suitable surface vector field found. Available: {sorted(available_boundary)}")

pl_surface = postpro_vtu.plot_boundary_field(
    boundary_fields,
    vector_field=surface_vector,
    component="mag",
    cmap="plasma",
    log_scale=True,
    opacity=0.82,
    scalar_bar_title=f"|{surface_vector}| on conductors @ {float(f):.3f} GHz",
    show_edges=False,
    off_screen=False,
)

# Improve transparency sorting when available.
try:
    pl_surface.enable_depth_peeling()
except Exception:
    pass

# Keep a subtle wireframe so the surface crowding remains visible.
# pl_surface.add_mesh(
#     boundary_fields.mesh,
#     style="wireframe",
#     color="white",
#     line_width=1.0,
#     opacity=0.40,
#     lighting=True,
# )

# Orthographic top view with axis alignment.
top_view = True
if top_view:
    bounds = boundary_fields.mesh.bounds
    cx = 0.5 * (bounds[0] + bounds[1])
    cy = 0.5 * (bounds[2] + bounds[3])
    cz = 0.5 * (bounds[4] + bounds[5])
    span_xy = max(bounds[1] - bounds[0], bounds[3] - bounds[2])
    cam_dist = max(span_xy, 1e-9) * 3.0

    pl_surface.camera.position = (cx, cy, cz + cam_dist)
    pl_surface.camera.focal_point = (cx, cy, cz)
    pl_surface.camera.up = (0.0, 1.0, 0.0)
    pl_surface.enable_parallel_projection()
    pl_surface.camera.parallel_scale = 0.6 * span_xy
    pl_surface.add_bounding_box(color="black", line_width=1.0)

pl_surface.show(jupyter_backend=pv_backend)
from palacetoolkit.postpro_vtu import (
    activate_vector_component,
    extract_axis_slice,
    load_volume_field_data,
)

# Load volume data at the synchronized frequency step.
volume_fields = load_volume_field_data(
    postpro_dir,
    dataset_name="driven",
    step_index=volume_step,
)

# Slice slightly above the patch into the air region, along forward radiation direction (+z).
z_air_slice = h + 0.10 * wavelength
slice_mesh = extract_axis_slice(volume_fields, axis="z", value=float(z_air_slice))
scalar_name = activate_vector_component(slice_mesh, field_name="S", component="z", output_name="S_z")

# Combine mesh geometry + semi-transparent volume slice in one scene.
mesh_geom = pv.read(filename)
pl_air_slice = pv.Plotter(off_screen=False)
pl_air_slice.set_background("white")

# Keep a subtle wireframe so the surface crowding remains visible.
pl_air_slice.add_mesh(
    boundary_fields.mesh,
    style="wireframe",
    color="black",
    line_width=1.0,
    opacity=0.25,
    lighting=True,
)

# Overlay the slice with alpha transparency.
pl_air_slice.add_mesh(
    slice_mesh,
    scalars=scalar_name,
    cmap="viridis",
    opacity=0.62,
    show_edges=False,
    scalar_bar_args={"title": f"S_z in air slice @ z={z_air_slice:.4f} m, f={float(f):.3f} GHz"},
)

pl_air_slice.add_axes()
pl_air_slice.camera_position = "iso"
pl_air_slice.show(jupyter_backend=pv_backend)

data, label = load_data(str(postpro_dir / "farfield-rE.csv"), f)
polar_plots(data, label)
# Radiation pattern.
three_d_plot(
        data, 
        label,
        n_theta           = 360,
        n_phi             = 720,
        n_smooth          = 100,
        taubin_pass_band  = 0.1,
    )