Skip to content

Commit

Permalink
add init and package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
adajel committed Mar 18, 2024
1 parent 5aa6e99 commit 07c333b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "KNP-EMI-DG"
name = "knpemidg"
version = "0.0.1"
requires-python = ">=3.8"

Expand All @@ -15,5 +15,5 @@ dependencies = [
'numpy',
'numba',
'matplotlib',
'git+https://github.com/MiroK/ulfy.git'
'ulfy@git+https://github.com/MiroK/ulfy.git'
]
16 changes: 16 additions & 0 deletions src/knpemidg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from knpemidg.dlt_dof_extraction import get_indices
from knpemidg.dlt_dof_extraction import is_dlt_scalar
from knpemidg.dlt_dof_extraction import get_values
from knpemidg.dlt_dof_extraction import set_values
from knpemidg.membrane import MembraneModel
from knpemidg.utils import subdomain_marking_foo
from knpemidg.utils import interface_normal
from knpemidg.utils import plus
from knpemidg.utils import minus
from knpemidg.utils import pcws_constant_project
from knpemidg.utils import CellCenterDistance
from knpemidg.solver import Solver

__all__ = ["Solver", "MembraneModel", "subdomain_marking_foo",
"interface_normal", "plus", "minus", "pcws_constant_project",
"CellCenterDistance"]
File renamed without changes.
2 changes: 1 addition & 1 deletion src/KNP-EMI-DG/membrane.py → src/knpemidg/membrane.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dlt_dof_extraction as dlt
import knpemidg.dlt_dof_extraction as dlt
import dolfin as df
import numpy as np

Expand Down
9 changes: 4 additions & 5 deletions src/KNP-EMI-DG/solver.py → src/knpemidg/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import time
from petsc4py import PETSc

from utils import pcws_constant_project
from utils import interface_normal, plus, minus
from utils import CellCenterDistance

from membrane import MembraneModel
from knpemidg.utils import pcws_constant_project
from knpemidg.utils import interface_normal, plus, minus
from knpemidg.utils import CellCenterDistance
from knpemidg.membrane import MembraneModel

# define jump across the membrane (interface gamma)
JUMP = lambda f, n: minus(f, n) - plus(f, n)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/run_MMS_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

if __name__ == '__main__':
from mms_space import setup_mms
from solver import Solver
from knpemidg import Solver
from collections import namedtuple
from itertools import chain

Expand Down

0 comments on commit 07c333b

Please sign in to comment.