fix codacy issues (#40)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import numpy as np
|
|
||||||
import torch
|
import torch
|
||||||
from pina.problem import Problem
|
from pina.problem import Problem
|
||||||
from pina.segment import Segment
|
from pina.segment import Segment
|
||||||
@@ -39,11 +38,8 @@ class EllipticOptimalControl(Problem2D):
|
|||||||
'gamma3': {'location': Segment((xmax, ymax), (xmin, ymax)), 'func': nil_dirichlet},
|
'gamma3': {'location': Segment((xmax, ymax), (xmin, ymax)), 'func': nil_dirichlet},
|
||||||
'gamma4': {'location': Segment((xmin, ymax), (xmin, ymin)), 'func': nil_dirichlet},
|
'gamma4': {'location': Segment((xmin, ymax), (xmin, ymin)), 'func': nil_dirichlet},
|
||||||
'D1': {'location': Cube([[xmin, xmax], [ymin, ymax]]), 'func': [term1, term2, term3]},
|
'D1': {'location': Cube([[xmin, xmax], [ymin, ymax]]), 'func': [term1, term2, term3]},
|
||||||
#'D2': {'location': Cube([[0, 1], [0, 1]]), 'func': term2},
|
|
||||||
#'D3': {'location': Cube([[0, 1], [0, 1]]), 'func': term3}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.input_variables = ['x1', 'x2']
|
self.input_variables = ['x1', 'x2']
|
||||||
self.output_variables = ['u', 'p', 'y']
|
self.output_variables = ['u', 'p', 'y']
|
||||||
self.spatial_domain = Cube([[xmin, xmax], [xmin, xmax]])
|
self.spatial_domain = Cube([[xmin, xmax], [xmin, xmax]])
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
'PINN',
|
'PINN',
|
||||||
'ParametricPINN',
|
|
||||||
'LabelTensor',
|
'LabelTensor',
|
||||||
'Plotter',
|
'Plotter',
|
||||||
'Condition',
|
'Condition',
|
||||||
'Span'
|
'Span',
|
||||||
|
'Location',
|
||||||
]
|
]
|
||||||
|
|
||||||
from .meta import *
|
from .meta import *
|
||||||
from .label_tensor import LabelTensor
|
from .label_tensor import LabelTensor
|
||||||
from .pinn import PINN
|
from .pinn import PINN
|
||||||
#from .ppinn import ParametricPINN
|
|
||||||
from .plotter import Plotter
|
from .plotter import Plotter
|
||||||
from .span import Span
|
from .span import Span
|
||||||
from .condition import Condition
|
from .condition import Condition
|
||||||
|
from .location import Location
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
'FeedForward',
|
'FeedForward',
|
||||||
'MultiFeedForward'
|
'MultiFeedForward',
|
||||||
'DeepONet',
|
'DeepONet',
|
||||||
'Network'
|
'Network',
|
||||||
]
|
]
|
||||||
|
|
||||||
from .feed_forward import FeedForward
|
from .feed_forward import FeedForward
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
from .problem import AbstractProblem
|
""" Module for PINN """
|
||||||
import torch
|
import torch
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
from .problem import AbstractProblem
|
||||||
from pina.label_tensor import LabelTensor
|
from .label_tensor import LabelTensor
|
||||||
|
|
||||||
torch.pi = torch.acos(torch.zeros(1)).item() * 2 # which is 3.1415927410125732
|
torch.pi = torch.acos(torch.zeros(1)).item() * 2 # which is 3.1415927410125732
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user