Documentation for v0.1 version (#199)
* Adding Equations, solving typos * improve _code.rst * the team rst and restuctore index.rst * fixing errors --------- Co-authored-by: Dario Coscia <dariocoscia@dhcp-015.eduroam.sissa.it>
This commit is contained in:
committed by
Nicola Demo
parent
3f9305d475
commit
8b7b61b3bd
@@ -4,7 +4,7 @@ from ..operators import grad, div, laplacian
|
||||
|
||||
|
||||
class FixedValue(Equation):
|
||||
|
||||
|
||||
def __init__(self, value, components=None):
|
||||
"""
|
||||
Fixed Value Equation class. This class can be
|
||||
@@ -18,10 +18,12 @@ class FixedValue(Equation):
|
||||
all the output variables are considered.
|
||||
Default is ``None``.
|
||||
"""
|
||||
|
||||
def equation(input_, output_):
|
||||
if components is None:
|
||||
return output_ - value
|
||||
return output_.extract(components) - value
|
||||
return output_.extract(components) - value
|
||||
|
||||
super().__init__(equation)
|
||||
|
||||
|
||||
@@ -43,9 +45,11 @@ class FixedGradient(Equation):
|
||||
which the gradient is calculated. d should be a subset
|
||||
of the input labels. If ``None``, all the input variables
|
||||
are considered. Default is ``None``.
|
||||
"""
|
||||
"""
|
||||
|
||||
def equation(input_, output_):
|
||||
return grad(output_, input_, components=components, d=d) - value
|
||||
|
||||
super().__init__(equation)
|
||||
|
||||
|
||||
@@ -67,9 +71,11 @@ class FixedFlux(Equation):
|
||||
which the flux is calculated. d should be a subset
|
||||
of the input labels. If ``None``, all the input variables
|
||||
are considered. Default is ``None``.
|
||||
"""
|
||||
"""
|
||||
|
||||
def equation(input_, output_):
|
||||
return div(output_, input_, components=components, d=d) - value
|
||||
|
||||
super().__init__(equation)
|
||||
|
||||
|
||||
@@ -90,7 +96,9 @@ class Laplace(Equation):
|
||||
which the flux is calculated. d should be a subset
|
||||
of the input labels. If ``None``, all the input variables
|
||||
are considered. Default is ``None``.
|
||||
"""
|
||||
"""
|
||||
|
||||
def equation(input_, output_):
|
||||
return laplacian(output_, input_, components=components, d=d)
|
||||
|
||||
super().__init__(equation)
|
||||
|
||||
Reference in New Issue
Block a user