Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
932909c
Add corrected sources for primary secondary simulation
dccowan May 7, 2025
0b37f27
Add to docstrings
dccowan May 7, 2025
6617cb5
black
dccowan May 8, 2025
f2fa90f
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Jul 9, 2025
ef31f23
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Sep 10, 2025
05bcbd1
Add Dirichlet and Neumann BC option for solution
dccowan Sep 10, 2025
dff739d
Finalize implementation
dccowan Sep 12, 2025
28fd3f0
add 1d magnetic field solution
dccowan Sep 15, 2025
10bb087
formatting
dccowan Sep 15, 2025
6809578
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Sep 16, 2025
5b9fafa
add pytest for new 1d solution
dccowan Sep 17, 2025
35ffdce
Comment out
dccowan Sep 17, 2025
75db936
formatting
dccowan Sep 17, 2025
5b07aa6
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
lheagy Sep 18, 2025
c28c8c4
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 9, 2025
9fd256c
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 10, 2025
4567dde
simpeg-ify the e1d solution
dccowan Oct 10, 2025
9005bc7
Augment and tidy up 1d solutions
dccowan Oct 15, 2025
bbef13a
update project 1d solution to mesh
dccowan Oct 15, 2025
2ee57a1
remove unused imports
dccowan Oct 15, 2025
206707f
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 15, 2025
359b93a
Update simpeg/electromagnetics/natural_source/utils/source_utils.py
dccowan Oct 15, 2025
2b6b432
Fix import error
dccowan Oct 15, 2025
f6dd310
simpeg-ify the h1d solution
dccowan Oct 16, 2025
34b5d01
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 16, 2025
0e50a9d
Update documentation
dccowan Oct 16, 2025
38d3d48
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 16, 2025
cc5c5e9
remove white space
dccowan Oct 16, 2025
2d5d9e7
Merge branch 'dcowan/nsem_sources_primary_secondary' of https://githu…
dccowan Oct 16, 2025
7c1b288
Formatting
dccowan Oct 16, 2025
c49a974
Fix array size test
dccowan Oct 16, 2025
5b913a2
Update simpeg/electromagnetics/natural_source/utils/source_utils.py
dccowan Oct 16, 2025
83b6648
Merge branch 'main' into dcowan/nsem_sources_primary_secondary
dccowan Oct 23, 2025
87466d8
Relegate to using homo1DModelSource to make RHS for Simulation1DPrima…
dccowan Oct 23, 2025
9d9d37b
Remove commented code for earlier implementation
dccowan Oct 23, 2025
89e244c
Fix broken tests
dccowan Oct 23, 2025
c355968
Add absolute tolerance to Jtvec test.
dccowan Oct 27, 2025
74186b9
Test for deprecated approach for generating source terms.
dccowan Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions simpeg/electromagnetics/natural_source/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from ... import maps
from ..frequency_domain.sources import BaseFDEMSrc
from ..utils import omega
from .utils.source_utils import homo1DModelSource
from .utils.source_utils import (
primary_e_1d_solution,
project_1d_fields_to_mesh_edges,
)
import discretize
from discretize.utils import volume_average

Expand All @@ -13,6 +16,7 @@
#################


# Rename to BasePlanewave
class Planewave(BaseFDEMSrc):
"""
Source class for the 1D and pseudo-3D problems.
Expand All @@ -30,7 +34,7 @@ class Planewave(BaseFDEMSrc):


# Need to implement such that it works for all dims.
# Rename to be more descriptive
# Rename to be more descriptive (I suggest PlanewavePrimarySecondary)
class PlanewaveXYPrimary(Planewave):
"""
NSEM planewave source for both polarizations (x and y)
Expand Down Expand Up @@ -106,9 +110,14 @@ def ePrimary(self, simulation):
"""
if self._ePrimary is None:
sigma_1d, _ = self._get_sigmas(simulation)
self._ePrimary = homo1DModelSource(
simulation.mesh, self.frequency, sigma_1d
)
e_1d = primary_e_1d_solution(simulation.mesh, sigma_1d, self.frequency)
e_1d = project_1d_fields_to_mesh_edges(simulation.mesh, e_1d)

# To output X and Y polarization for 1D mesh
if simulation.mesh.dim == 1:
e_1d = np.c_[e_1d, -e_1d]

self._ePrimary = e_1d
return self._ePrimary

def bPrimary(self, simulation):
Expand Down
5 changes: 5 additions & 0 deletions simpeg/electromagnetics/natural_source/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"""

from .solutions_1d import get1DEfields # Add the names of the functions
from .source_utils import (
primary_e_1d_solution,
primary_h_1d_solution,
project_1d_fields_to_mesh_edges,
)
from .analytic_1d import getEHfields, getImpedance
from .data_utils import (
appResPhs,
Expand Down
Loading
Loading