Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs fixes #797

Merged
merged 10 commits into from
Jul 4, 2024
11 changes: 3 additions & 8 deletions docs/source/api/boundary_conditions.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
.. _boundary_conditions_api:

===================
Boundary conditions
===================

.. currentmodule:: festim


Dirichlet
---------

.. autoclass:: DirichletBC
:members:
:show-inheritance:
Expand All @@ -27,10 +26,6 @@ Dirichlet
:members:
:show-inheritance:


Flux
----

.. autoclass:: FluxBC
:members:
:show-inheritance:
Expand Down
2 changes: 2 additions & 0 deletions docs/source/api/materials.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _materials_api:

Materials
=========

Expand Down
2 changes: 2 additions & 0 deletions docs/source/api/sources.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _sources_api:

Sources
=======

Expand Down
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
"sphinxcontrib.images",
]

suppress_warnings = ["autosectionlabel.*"]

napoleon_use_ivar = True # needed to correctly format class attributes

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 0 additions & 2 deletions docs/source/devguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ And/or contribute to the source code by:
* Fixing bugs
* Implementing new features

.. _contributing to the code:

------------------------
Contributing to the code
------------------------
Expand Down
2 changes: 0 additions & 2 deletions docs/source/theory.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _theory:

======
Theory
======
Expand Down
2 changes: 1 addition & 1 deletion docs/source/userguide/beginners_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you're having an issue, the best way to find help is to join the `FESTIM disc
Install FESTIM
--------------

Follow the :ref:`installation instructions<Install>` to install FESTIM on your computer.
Follow the :ref:`installation instructions<Installation>` to install FESTIM on your computer.

------------------------
Your first FESTIM script
Expand Down
3 changes: 2 additions & 1 deletion docs/source/userguide/boundary_conditions.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. _boundary conditions:
.. _boundary_conditions_guide:

===================
Boundary conditions
===================
Expand Down
1 change: 0 additions & 1 deletion docs/source/userguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ User's Guide
============

.. toctree::
:numbered:
:maxdepth: 1

beginners_guide
Expand Down
2 changes: 2 additions & 0 deletions docs/source/userguide/materials.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _materials_guide:

=========
Materials
=========
Expand Down
2 changes: 1 addition & 1 deletion docs/source/userguide/sources.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _sources:
.. _sources_guide:

=======
Sources
Expand Down
7 changes: 3 additions & 4 deletions docs/source/userguide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ This will provide more information during the solving stage.
my_model.log_level = 20

From there, depending on the behaviour of the solver, you can try the following:
- if the solver diverges, try reducing the time step and/or mesh refinement. It is often
helpful to inspect the fields to see if there are any obvious issues (like lack of refinement).
- If the solver converges to a value above the tolerance, try increasing the tolerance.
Sometimes, the absolute tolerance is too low for the problem at hand, especially when dealing with large numbers.

- if the solver diverges, try reducing the time step and/or mesh refinement. It is often helpful to inspect the fields to see if there are any obvious issues (like lack of refinement).
- If the solver converges to a value above the tolerance, try increasing the tolerance. Sometimes, the absolute tolerance is too low for the problem at hand, especially when dealing with large numbers.


^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
8 changes: 4 additions & 4 deletions festim/boundary_conditions/dirichlets/sieverts_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class SievertsBC(DirichletBC):
"""Subclass of DirichletBC for Sievert's law

Args:
surfaces (list or int): the surfaces of the BC
S_0 (float): Sievert's constant pre-exponential factor (m-3/Pa0.5)
E_S (float): Sievert's constant activation energy (eV)
pressure (float or sp.Expr): hydrogen partial pressure (Pa)
surfaces (list or int): the surfaces of the BC
S_0 (float): Sievert's constant pre-exponential factor (m-3/Pa0.5)
E_S (float): Sievert's constant activation energy (eV)
pressure (float or sp.Expr): hydrogen partial pressure (Pa)
"""

def __init__(self, surfaces, S_0, E_S, pressure) -> None:
Expand Down
2 changes: 1 addition & 1 deletion festim/concentration/traps/extrinsic_trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def create_form_density(self, dx, dt, T):
T (festim.Temperature): the temperature of the
simulation

Notes:
.. note::
T is an argument, although is not used in the formulation of
extrinsic traps, but potential for subclasses of extrinsic traps
"""
Expand Down
2 changes: 1 addition & 1 deletion festim/concentration/traps/trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Trap(Concentration):
Raises:
ValueError: if duplicates are found in materials

Notes:
.. note::
Should multiple traps in muliple materials be used, to save on
dof's, traps can be conglomerated and described in lists in the
format::
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/average_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AverageSurface(SurfaceQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/average_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AverageVolume(VolumeQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature
"""

Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/hydrogen_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class HydrogenFlux(SurfaceFlux):
function (dolfin.function.function.Function): the solution function of
the hydrogen solute field

Notes:
.. note::
units are in H/m2/s in 1D, H/m/s in 2D and H/s in 3D domains

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/maximum_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MaximumSurface(SurfaceQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/maximum_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MaximumVolume(VolumeQuantity):
function (dolfin.function.function.Function): the solution function for
the field

notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/minimum_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MinimumSurface(SurfaceQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/minimum_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MinimumVolume(VolumeQuantity):
function (dolfin.function.function.Function): the solution function for
the field

notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/point_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PointValue(DerivedQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Units are in H/m3 for hydrogen concentration and K for temperature

"""
Expand Down
8 changes: 5 additions & 3 deletions festim/exports/derived_quantities/surface_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SurfaceFlux(SurfaceQuantity):
function (dolfin.function.function.Function): the solution function of
the field

Notes:
.. note::
Object to compute the flux J of a field u through a surface
J = integral(+prop * grad(u) . n ds)
where prop is the property of the field (D, thermal conductivity, etc)
Expand Down Expand Up @@ -96,7 +96,8 @@ class SurfaceFluxCylindrical(SurfaceFlux):
ds is the surface measure in cylindrical coordinates.
ds = r dr dtheta or ds = r dz dtheta

Note: for particle fluxes J is given in H/s, for heat fluxes J is given in W
.. note::
For particle fluxes J is given in H/s, for heat fluxes J is given in W

Args:
field (str, int): the field ("solute", 0, 1, "T", "retention")
Expand Down Expand Up @@ -172,7 +173,8 @@ class SurfaceFluxSpherical(SurfaceFlux):
ds is the surface measure in spherical coordinates.
ds = r^2 sin(theta) dtheta dphi

Note: for particle fluxes J is given in H/s, for heat fluxes J is given in W
.. note::
For particle fluxes J is given in H/s, for heat fluxes J is given in W

Args:
field (str, int): the field ("solute", 0, 1, "T", "retention")
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/thermal_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ThermalFlux(SurfaceFlux):
function (dolfin.function.function.Function): the solution function of
the temperature field

Notes:
.. note::
units are in W/m2 in 1D, W/m in 2D and W in 3D domains

"""
Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/total_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TotalSurface(SurfaceQuantity):
function (dolfin.function.function.Function): the solution function of
the hydrogen solute field

Notes:
.. note::
units are in H/m2 in 1D, H/m in 2D and H in 3D domains for hydrogen
concentration and K in 1D, K m in 2D and K m2 in 3D domains for temperature

Expand Down
2 changes: 1 addition & 1 deletion festim/exports/derived_quantities/total_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TotalVolume(VolumeQuantity):
function (dolfin.function.function.Function): the solution function of
the hydrogen solute field

Notes:
.. note::
units are in H/m2 in 1D, H/m in 2D and H in 3D domains for hydrogen
concentration and K m in 1D, K m2 in 2D and K m3 in 3D domains for temperature

Expand Down
Loading