From 99157a89c82dfcabac1995f7621797823573ed13 Mon Sep 17 00:00:00 2001 From: Dave Marchant Date: Wed, 12 Feb 2014 14:07:44 -0800 Subject: [PATCH] Beginnings of some documentation. --- docs/api_TDEM.rst | 15 +++++++++++++++ simpegEM/TDEM/TDEM_b.py | 14 +++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/api_TDEM.rst b/docs/api_TDEM.rst index 4827a43b..5d7f9a65 100644 --- a/docs/api_TDEM.rst +++ b/docs/api_TDEM.rst @@ -1,6 +1,21 @@ .. _api_TDEM: +.. math:: + + \newcommand{\dcurl}{{\mathbf C}} + \renewcommand {\b} { {\vec b} } + \newcommand {\e} { {\vec e} } + \renewcommand {\j} { {\vec j} } + + \newcommand{\M}{{\mathbf M}} + \newcommand{\MfMui}{{\M^f_{\mu^{-1}}}} + \newcommand{\MeSig}{{\M^e_\sigma}} + \newcommand{\Me}{{\M^e}} + + + + Base Classes ************ diff --git a/simpegEM/TDEM/TDEM_b.py b/simpegEM/TDEM/TDEM_b.py index 3ddefb1d..154c8c45 100644 --- a/simpegEM/TDEM/TDEM_b.py +++ b/simpegEM/TDEM/TDEM_b.py @@ -4,7 +4,13 @@ import numpy as np class ProblemTDEM_b(ProblemBaseTDEM): """ - docstring for ProblemTDEM_b + Time-Domain EM problem - B-formulation + + + .. math:: + + \dcurl \e^{(t+1)} + \\frac{\\b^{(t+1)} - \\b^{(t)}}{\delta t} = 0 \\\\ + \dcurl^\\top \MfMui \\b^{(t+1)} - \MeSig \e^{(t+1)} = \Me \j_s^{(t+1)} """ def __init__(self, mesh, model, **kwargs): ProblemBaseTDEM.__init__(self, mesh, model, **kwargs) @@ -16,6 +22,12 @@ class ProblemTDEM_b(ProblemBaseTDEM): #################################################### def getA(self, tInd): + """ + :param int tInd: Time index + :rtype: scipy.sparse.csr_matrix + :return: A + """ + dt = self.getDt(tInd) return self.MfMui*self.mesh.edgeCurl*self.MeSigmaI*self.mesh.edgeCurl.T*self.MfMui + (1/dt)*self.MfMui