MCPcopy Create free account
hub / github.com/NanoComp/meep / mapping

Method mapping

python/tests/test_adjoint_solver.py:510–527  ·  view source on GitHub ↗
(
        self,
        x: List[float] = None,
        filter_radius: float = None,
        eta: float = None,
        beta: float = None,
    )

Source from the content-addressed store, hash-verified

508 return f0_merged, np.array([])
509
510 def mapping(
511 self,
512 x: List[float] = None,
513 filter_radius: float = None,
514 eta: float = None,
515 beta: float = None,
516 ):
517 filtered_field = mpa.conic_filter(
518 x,
519 filter_radius,
520 self.design_region_size.x,
521 self.design_region_size.y,
522 self.design_region_resolution,
523 )
524
525 projected_field = mpa.tanh_projection(filtered_field, beta, eta)
526
527 return projected_field.flatten()
528
529 def test_DFT_fields(self):
530 """Verifies that the adjoint gradient for an objective function based

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected