Skip to content

Commit ccf0270

Browse files
committed
fix loss and dirichlect BC point generation
1 parent 289f9c0 commit ccf0270

File tree

4 files changed

+5
-182
lines changed

4 files changed

+5
-182
lines changed

examples/burgers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
Domain.generate_collocation_points(N_f)
1818

1919

20-
def func_ic(x, y):
20+
def func_ic(x):
2121
return -np.sin(x * math.pi)
2222

23-
init = IC(Domain, [func_ic], var=[['x']])
2423

24+
init = IC(Domain, [func_ic], var=[['x']])
2525

26-
upper_x = dirichlectBC(Domain, val=0.0, var='x',target="upper")
26+
upper_x = dirichlectBC(Domain, val=0.0, var='x', target="upper")
2727

2828
lower_x = dirichlectBC(Domain, val=0.0, var='x', target="lower")
2929

tensordiffeq/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from . import networks
55
from . import plotting
66
from . import utils
7-
from .models import CollocationSolver1D, DiscoveryModel
7+
from .models import CollocationSolverND, DiscoveryModel
88
from .utils import constant, LatinHypercubeSample, tensor
99
from .plotting import newfig, get_griddata
1010
from .helpers import find_L2_error

tensordiffeq/boundaries.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(self, domain, val, var, target):
5858
super().__init__()
5959
self.dicts_ = [item for item in self.domain.domaindict if item['identifier'] != self.var]
6060
self.dict_ = next(item for item in self.domain.domaindict if item["identifier"] == self.var)
61+
self.target = self.dict_[var+target]
6162
self.compile()
6263

6364
def create_input(self):

tensordiffeq/models.py

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)