sfepy.terms.terms_dot module

class sfepy.terms.terms_dot.BCNewtonTerm(name, arg_str, integral, region, **kwargs)[source]

Newton boundary condition term.

Definition:

\int_{\Gamma} \alpha q (p - p_{\rm outer})

Call signature:
dw_bc_newton (material_1, material_2, virtual, state)
Arguments:
  • material_1 : \alpha
  • material_2 : p_{\rm outer}
  • virtual : q
  • state : p
arg_shapes = {‘material_1’: ‘1, 1’, ‘material_2’: ‘1, 1’, ‘state’: 1, ‘virtual’: (1, ‘state’)}
arg_types = (‘material_1’, ‘material_2’, ‘virtual’, ‘state’)
get_fargs(alpha, p_outer, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
mode = ‘weak’
name = ‘dw_bc_newton’
class sfepy.terms.terms_dot.DotProductSurfaceTerm(name, arg_str, integral, region, **kwargs)[source]

Surface L^2(\Gamma) dot product for both scalar and vector fields.

Definition:

\int_\Gamma q p \mbox{ , } \int_\Gamma \ul{v} \cdot \ul{u}
\mbox{ , }
\int_\Gamma \ul{v} \cdot \ul{n} p \mbox{ , }
\int_\Gamma q \ul{n} \cdot \ul{u} \mbox{ , }
\int_\Gamma p r \mbox{ , } \int_\Gamma \ul{u} \cdot \ul{w}
\mbox{ , } \int_\Gamma \ul{w} \cdot \ul{n} p \\
\int_\Gamma c q p \mbox{ , } \int_\Gamma c \ul{v} \cdot \ul{u}
\mbox{ , }
\int_\Gamma c p r \mbox{ , } \int_\Gamma c \ul{u} \cdot \ul{w} \\
\int_\Gamma \ul{v} \cdot \ull{M} \cdot \ul{u}
\mbox{ , }
\int_\Gamma \ul{u} \cdot \ull{M} \cdot \ul{w}

Call signature:
dw_surface_dot (opt_material, virtual, state)
(opt_material, parameter_1, parameter_2)
Arguments 1:
  • material : c or \ull{M} (optional)
  • virtual : q or \ul{v}
  • state : p or \ul{u}
Arguments 2:
  • material : c or \ull{M} (optional)
  • parameter_1 : p or \ul{u}
  • parameter_2 : r or \ul{w}
arg_shapes = [{‘opt_material’: ‘1, 1’, ‘state’: 1, ‘parameter_1’: 1, ‘virtual’: (1, ‘state’), ‘parameter_2’: 1}, {‘opt_material’: None}, {‘opt_material’: ‘1, 1’, ‘state’: ‘D’, ‘virtual’: (1, None)}, {‘opt_material’: None}, {‘opt_material’: ‘1, 1’, ‘state’: 1, ‘virtual’: (‘D’, None)}, {‘opt_material’: None}, {‘opt_material’: ‘1, 1’, ‘state’: ‘D’, ‘parameter_1’: ‘D’, ‘virtual’: (‘D’, ‘state’), ‘parameter_2’: ‘D’}, {‘opt_material’: ‘D, D’}, {‘opt_material’: None}]
arg_types = ((‘opt_material’, ‘virtual’, ‘state’), (‘opt_material’, ‘parameter_1’, ‘parameter_2’))
integration = ‘surface’
modes = (‘weak’, ‘eval’)
name = ‘dw_surface_dot’
class sfepy.terms.terms_dot.DotProductVolumeTerm(name, arg_str, integral, region, **kwargs)[source]

Volume L^2(\Omega) weighted dot product for both scalar and vector fields. Can be evaluated. Can use derivatives.

Definition:

\int_\Omega q p \mbox{ , } \int_\Omega \ul{v} \cdot \ul{u}
\mbox{ , }
\int_\Omega p r \mbox{ , } \int_\Omega \ul{u} \cdot \ul{w} \\
\int_\Omega c q p \mbox{ , } \int_\Omega c \ul{v} \cdot \ul{u}
\mbox{ , }
\int_\Omega c p r \mbox{ , } \int_\Omega c \ul{u} \cdot \ul{w} \\
\int_\Omega \ul{v} \cdot (\ull{M} \ul{u})
\mbox{ , }
\int_\Omega \ul{u} \cdot (\ull{M} \ul{w})

Call signature:
dw_volume_dot (opt_material, virtual, state)
(opt_material, parameter_1, parameter_2)
Arguments 1:
  • material : c or \ull{M} (optional)
  • virtual : q or \ul{v}
  • state : p or \ul{u}
Arguments 2:
  • material : c or \ull{M} (optional)
  • parameter_1 : p or \ul{u}
  • parameter_2 : r or \ul{w}
arg_shapes = [{‘opt_material’: ‘1, 1’, ‘state’: 1, ‘parameter_1’: 1, ‘virtual’: (1, ‘state’), ‘parameter_2’: 1}, {‘opt_material’: None}, {‘opt_material’: ‘1, 1’, ‘state’: ‘D’, ‘parameter_1’: ‘D’, ‘virtual’: (‘D’, ‘state’), ‘parameter_2’: ‘D’}, {‘opt_material’: ‘D, D’}, {‘opt_material’: None}]
arg_types = ((‘opt_material’, ‘virtual’, ‘state’), (‘opt_material’, ‘parameter_1’, ‘parameter_2’))
static d_dot(out, mat, val1_qp, val2_qp, geo)[source]
static dw_dot(out, mat, val_qp, vgeo, sgeo, fun, fmode)[source]
get_eval_shape(mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = (‘weak’, ‘eval’)
name = ‘dw_volume_dot’
set_arg_types()[source]
class sfepy.terms.terms_dot.DotSProductVolumeOperatorWETHTerm(name, arg_str, integral, region, **kwargs)[source]

Fading memory volume L^2(\Omega) weighted dot product for scalar fields. This term has the same definition as dw_volume_dot_w_scalar_th, but assumes an exponential approximation of the convolution kernel resulting in much higher efficiency. Can use derivatives.

Definition:

\int_\Omega \left [\int_0^t \Gcal(t-\tau) p(\tau) \difd{\tau} \right] q

Call signature:
dw_volume_dot_w_scalar_eth (ts, material_0, material_1, virtual, state)
Arguments:
  • ts : TimeStepper instance
  • material_0 : \Gcal(0)
  • material_1 : \exp(-\lambda \Delta t) (decay at t_1)
  • virtual : q
  • state : p
arg_shapes = {‘material_0’: ‘1, 1’, ‘material_1’: ‘1, 1’, ‘state’: 1, ‘virtual’: (1, ‘state’)}
arg_types = (‘ts’, ‘material_0’, ‘material_1’, ‘virtual’, ‘state’)
static function()
get_fargs(ts, mat0, mat1, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = ‘dw_volume_dot_w_scalar_eth’
class sfepy.terms.terms_dot.DotSProductVolumeOperatorWTHTerm(name, arg_str, integral, region, **kwargs)[source]

Fading memory volume L^2(\Omega) weighted dot product for scalar fields. Can use derivatives.

Definition:

\int_\Omega \left [\int_0^t \Gcal(t-\tau) p(\tau) \difd{\tau} \right] q

Call signature:
dw_volume_dot_w_scalar_th (ts, material, virtual, state)
Arguments:
  • ts : TimeStepper instance
  • material : \Gcal(\tau)
  • virtual : q
  • state : p
arg_shapes = {‘state’: 1, ‘material’: ‘.: N, 1, 1’, ‘virtual’: (1, ‘state’)}
arg_types = (‘ts’, ‘material’, ‘virtual’, ‘state’)
static function()
get_fargs(ts, mats, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = ‘dw_volume_dot_w_scalar_th’
class sfepy.terms.terms_dot.ScalarDotGradIScalarTerm(name, arg_str, integral, region, **kwargs)[source]

Dot product of a scalar and the i-th component of gradient of a scalar. The index should be given as a ‘special_constant’ material parameter.

Definition:

Z^i = \int_{\Omega} q \nabla_i p

Call signature:
dw_s_dot_grad_i_s (material, virtual, state)
Arguments:
  • material : i
  • virtual : q
  • state : p
arg_shapes = {‘state’: 1, ‘material’: ‘.: 1, 1’, ‘virtual’: (1, ‘state’)}
arg_types = (‘material’, ‘virtual’, ‘state’)
static dw_fun(out, bf, vg, grad, idx, fmode)[source]
get_fargs(material, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = ‘dw_s_dot_grad_i_s’
set_arg_types()[source]
class sfepy.terms.terms_dot.ScalarDotMGradScalarTerm(name, arg_str, integral, region, **kwargs)[source]

Volume dot product of a scalar gradient dotted with a material vector with a scalar.

Definition:

\int_{\Omega} q \ul{y} \cdot \nabla p \mbox{ , }
\int_{\Omega} p \ul{y} \cdot \nabla q

Call signature:
dw_s_dot_mgrad_s (material, virtual, state)
(material, state, virtual)
Arguments 1:
  • material : \ul{y}
  • virtual : q
  • state : p
Arguments 2:
  • material : \ul{y}
  • state : p
  • virtual : q
arg_shapes = [{‘state/grad_virtual’: 1, ‘state/grad_state’: 1, ‘material’: ‘D, 1’, ‘virtual/grad_state’: (1, None), ‘virtual/grad_virtual’: (1, None)}]
arg_types = ((‘material’, ‘virtual’, ‘state’), (‘material’, ‘state’, ‘virtual’))
static function(out, out_qp, geo, fmode)[source]
get_fargs(mat, var1, var2, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = (‘grad_state’, ‘grad_virtual’)
name = ‘dw_s_dot_mgrad_s’
class sfepy.terms.terms_dot.VectorDotGradScalarTerm(name, arg_str, integral, region, **kwargs)[source]

Volume dot product of a vector and a gradient of scalar. Can be evaluated.

Definition:

\int_{\Omega} \ul{v} \cdot \nabla p \mbox{ , }
\int_{\Omega} \ul{u} \cdot \nabla q \\
\int_{\Omega} c \ul{v} \cdot \nabla p \mbox{ , }
\int_{\Omega} c \ul{u} \cdot \nabla q \\
\int_{\Omega} \ul{v} \cdot (\ull{M} \nabla p) \mbox{ , }
\int_{\Omega} \ul{u} \cdot (\ull{M} \nabla q)

Call signature:
dw_v_dot_grad_s (opt_material, virtual, state)
(opt_material, state, virtual)
(opt_material, parameter_v, parameter_s)
Arguments 1:
  • material : c or \ull{M} (optional)
  • virtual : \ul{v}
  • state : p
Arguments 2:
  • material : c or \ull{M} (optional)
  • state : \ul{u}
  • virtual : q
Arguments 3:
  • material : c or \ull{M} (optional)
  • parameter_v : \ul{u}
  • parameter_s : p
arg_shapes = [{‘opt_material’: ‘1, 1’, ‘state/s_weak’: ‘D’, ‘parameter_s’: 1, ‘virtual/v_weak’: (‘D’, None), ‘virtual/s_weak’: (1, None), ‘parameter_v’: ‘D’, ‘state/v_weak’: 1}, {‘opt_material’: ‘D, D’}, {‘opt_material’: None}]
arg_types = ((‘opt_material’, ‘virtual’, ‘state’), (‘opt_material’, ‘state’, ‘virtual’), (‘opt_material’, ‘parameter_v’, ‘parameter_s’))
get_eval_shape(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = (‘v_weak’, ‘s_weak’, ‘eval’)
name = ‘dw_v_dot_grad_s’
set_arg_types()[source]
class sfepy.terms.terms_dot.VectorDotScalarTerm(name, arg_str, integral, region, **kwargs)[source]

Volume dot product of a vector and a scalar. Can be evaluated.

Definition:

\int_{\Omega} \ul{v} \cdot \ul{m} p \mbox{ , }
\int_{\Omega} \ul{u} \cdot \ul{m} q\\

Call signature:
dw_vm_dot_s (material, virtual, state)
(material, state, virtual)
(material, parameter_v, parameter_s)
Arguments 1:
  • material : \ul{m}
  • virtual : \ul{v}
  • state : p
Arguments 2:
  • material : \ul{m}
  • state : \ul{u}
  • virtual : q
Arguments 3:
  • material : \ul{m}
  • parameter_v : \ul{u}
  • parameter_s : p
arg_shapes = [{‘state/s_weak’: ‘D’, ‘material’: ‘D, 1’, ‘parameter_s’: 1, ‘virtual/v_weak’: (‘D’, None), ‘virtual/s_weak’: (1, None), ‘parameter_v’: ‘D’, ‘state/v_weak’: 1}]
arg_types = ((‘material’, ‘virtual’, ‘state’), (‘material’, ‘state’, ‘virtual’), (‘material’, ‘parameter_v’, ‘parameter_s’))
static d_dot(out, mat, val1_qp, val2_qp, geo)[source]
static dw_dot(out, mat, val_qp, bfve, bfsc, geo, fmode)[source]
get_eval_shape(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = (‘v_weak’, ‘s_weak’, ‘eval’)
name = ‘dw_vm_dot_s’
set_arg_types()[source]