Skip to content

Commit 9579a27

Browse files
committed
Add enums and remove python implementation of transfer meshtags in factor of the scifem implementation
1 parent c5e3fdb commit 9579a27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+334
-322
lines changed

docs/source/api/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ API reference
3131
:members:
3232
:show-inheritance:
3333

34-
.. automodule:: festim.helpers_discontinuity
35-
:members:
36-
:show-inheritance:
37-
3834
.. automodule:: festim.helpers
3935
:members:
4036
:show-inheritance:

docs/source/map.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import json
2-
from folium.plugins import MarkerCluster
3-
import folium
42

5-
import requests
3+
import folium
4+
from folium.plugins import MarkerCluster
65
from PIL import Image
7-
from io import BytesIO
86

97
LOGO_HEIGHT = 60
108

docs/source/userguide/subdomains.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Additional parameters are required for specific simulations. When considering ch
107107
* :code:`name`: Name for the material.
108108
* :code:`S_0`: The solubility pre-exponential factor (units depend on the solubility law: Sievert's or Henry's).
109109
* :code:`E_S`: The solubility activation energy (eV).
110-
* :code:`solubility_law`: The solubility law, either :code:`"henry"` or :code:`"sievert"`.
110+
* :code:`solubility_law`: The solubility law, either :code:`"festim.SolubilityLaw.HENRY"` or :code:`festim.SolubilityLaw.SIEVERT`.
111111

112112
For transient heat transfer simulations, thermal conductivity, heat capacity, and density must be defined:
113113

examples/advection_diffusion_multi_material.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from mpi4py import MPI
22

3+
import basix
34
import dolfinx
45
import dolfinx.fem.petsc
56
import numpy as np
6-
import basix
7+
78
import festim as F
89

910

examples/surface_reaction_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import festim as F
2-
import numpy as np
3-
41
import dolfinx.fem as fem
2+
import numpy as np
53
import ufl
64

5+
import festim as F
6+
77

88
class FluxFromSurfaceReaction(F.SurfaceFlux):
99
def __init__(self, reaction: F.SurfaceReactionBC):

src/festim/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from .exports.total_surface import TotalSurface
3636
from .exports.total_volume import TotalVolume
3737
from .exports.volume_quantity import VolumeQuantity
38-
from .exports.vtx import VTXSpeciesExport, VTXTemperatureExport, ExportBaseClass
38+
from .exports.vtx import ExportBaseClass, VTXSpeciesExport, VTXTemperatureExport
3939
from .exports.xdmf import XDMFExport
4040
from .heat_transfer_problem import HeatTransferProblem
4141
from .helpers import (
@@ -49,14 +49,15 @@
4949
HydrogenTransportProblem,
5050
HydrogenTransportProblemDiscontinuous,
5151
HydrogenTransportProblemDiscontinuousChangeVar,
52+
InterfaceMethod,
5253
)
5354
from .initial_condition import (
54-
InitialConditionBase,
5555
InitialConcentration,
56+
InitialConditionBase,
5657
InitialTemperature,
5758
read_function_from_file,
5859
)
59-
from .material import Material
60+
from .material import Material, SolubilityLaw
6061
from .mesh.mesh import Mesh
6162
from .mesh.mesh_1d import Mesh1D
6263
from .mesh.mesh_from_xdmf import MeshFromXDMF

src/festim/advection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from collections.abc import Callable
2-
from typing import Optional
32

43
import basix
54
import ufl
@@ -123,7 +122,7 @@ class VelocityField(Value):
123122
def convert_input_value(
124123
self,
125124
function_space: fem.FunctionSpace,
126-
t: Optional[fem.Constant] = None,
125+
t: fem.Constant | None = None,
127126
):
128127
"""Converts a user given value to a relevent fenics object
129128

src/festim/boundary_conditions/dirichlet_bc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def create_value(
253253
helpers.get_interpolation_points(function_space.element),
254254
)
255255
self.value_fenics.interpolate(self.bc_expr)
256-
except RuntimeError as e:
256+
except RuntimeError:
257257
# if this fails, it is probably because the temperature is a Function
258258
# from the parent mesh and this is used in a mixed domain problem.
259259
# In this case, we need to interpolate the temperature on the submesh

src/festim/boundary_conditions/surface_reaction.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from festim.boundary_conditions import ParticleFluxBC
2-
from festim import k_B
3-
from dolfinx import fem
41
import ufl
2+
from dolfinx import fem
3+
4+
from festim import k_B
5+
from festim.boundary_conditions import ParticleFluxBC
56

67

78
class SurfaceReactionBCpartial(ParticleFluxBC):

src/festim/exports/maximum_surface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from mpi4py import MPI
2+
23
import dolfinx
34
import numpy as np
45

0 commit comments

Comments
 (0)