Skip to content

Commit

Permalink
Closes #67
Browse files Browse the repository at this point in the history
  • Loading branch information
jehicken committed Jul 11, 2024
1 parent c0174b0 commit 58e7b9c
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/physics/electromagnetics/electromag_integ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,13 @@ void NonlinearDiffusionIntegratorMeshRevSens::AssembleRHSElementVect(

/// const double pointflux_norm = pointflux.Norml2();
pointflux_bar = 0.0;
add(pointflux_bar,
pointflux_norm_bar / pointflux_norm,
pointflux,
pointflux_bar);
if (fabs(pointflux_norm) > 1e-14)
{
add(pointflux_bar,
pointflux_norm_bar / pointflux_norm,
pointflux,
pointflux_bar);
}

/// const double curl_psi_dot_pointflux = curl_psi * pointflux;
curl_psi_bar = 0.0;
Expand Down Expand Up @@ -1648,11 +1651,17 @@ void DGInteriorFaceDiffusionIntegratorMeshRevSens::AssembleRHSElementVect(

/// const double ip_flux2_norm = ip_flux2.Norml2();
ip_flux2_bar = 0.0;
ip_flux2_bar.Add(ip_flux2_norm_bar / ip_flux2_norm, ip_flux2);
if (fabs(ip_flux2_norm) > 1e-14)
{
ip_flux2_bar.Add(ip_flux2_norm_bar / ip_flux2_norm, ip_flux2);
}

/// const double ip_flux1_norm = ip_flux1.Norml2();
ip_flux1_bar = 0.0;
ip_flux1_bar.Add(ip_flux1_norm_bar / ip_flux1_norm, ip_flux1);
if (fabs(ip_flux1_norm) > 1e-14)
{
ip_flux1_bar.Add(ip_flux1_norm_bar / ip_flux1_norm, ip_flux1);
}

/// dshapedxt2.MultTranspose(elfun2, ip_flux2);
AddMultVWt(elfun2, ip_flux2_bar, dshapedxt2_bar);
Expand Down

0 comments on commit 58e7b9c

Please sign in to comment.