-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GEOPY-1700: Benchmark parallelization between Azure (spot) and DUG #58
Conversation
from simpeg.utils import sdiag | ||
|
||
|
||
def _eval_impedance_deriv(self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
def _eval_impedance_deriv(self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False): | |
def _eval_impedance_deriv( | |
self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False | |
): |
gh_v = PH.T @ gbot_v | ||
ge_v = PE.T @ gtop_v | ||
|
||
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) | |
gfu_h_v = ( | |
-1.0 | |
/ (1j * 2 * np.pi * frequency) | |
* (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) | |
) |
PointNaturalSource._eval_impedance_deriv = _eval_impedance_deriv | ||
|
||
|
||
def _eval_tipper_deriv(self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
def _eval_tipper_deriv(self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False): | |
def _eval_tipper_deriv( | |
self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False | |
): |
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * ( | ||
mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * ( | |
mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) | |
gfu_h_v = ( | |
-1.0 | |
/ (1j * 2 * np.pi * frequency) | |
* (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v))) | |
) |
if isinstance(receiver, Point3DTipper): | ||
if receiver.component == "imag": | ||
v = -1j * v | ||
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True) | |
dfduT = receiver._eval_tipper_deriv( | |
frequency, mesh, h, simulation, v=v, adjoint=True | |
) |
v = -1j * v | ||
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True) | ||
elif isinstance(receiver, PointNaturalSource): | ||
dfduT, _ = receiver._eval_impedance_deriv(frequency, mesh, e, h, simulation, v=v, adjoint=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
dfduT, _ = receiver._eval_impedance_deriv(frequency, mesh, e, h, simulation, v=v, adjoint=True) | |
dfduT, _ = receiver._eval_impedance_deriv( | |
frequency, mesh, e, h, simulation, v=v, adjoint=True | |
) |
gh_v = sp.csr_matrix( | ||
Phx.T @ ghx_v | ||
+ Phy.T @ ghy_v | ||
+ Phz.T @ ghz_v | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
gh_v = sp.csr_matrix( | |
Phx.T @ ghx_v | |
+ Phy.T @ ghy_v | |
+ Phz.T @ ghz_v | |
) | |
gh_v = sp.csr_matrix(Phx.T @ ghx_v + Phy.T @ ghy_v + Phz.T @ ghz_v) |
GEOPY-1700 - Benchmark parallelization between Azure (spot) and DUG