Skip to content

Commit 572f086

Browse files
fix codacy on partial
1 parent e892009 commit 572f086

File tree

5 files changed

+52
-13
lines changed

5 files changed

+52
-13
lines changed

pina/domain/base_operation.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,6 @@ def update(self, domain):
113113

114114
return updated
115115

116-
def partial(self):
117-
"""
118-
Return the boundary of the domain resulting from the operation.
119-
120-
:raises NotImplementedError: The :meth:`partial` method is not
121-
implemented for operation domains. Please operate on the individual
122-
domains instead.
123-
"""
124-
raise NotImplementedError(
125-
"The partial method is not implemented for operation domains. "
126-
"Please operate on the individual domains instead."
127-
)
128-
129116
@property
130117
def sample_modes(self):
131118
"""

pina/domain/difference.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,16 @@ def sample(self, n, mode="random", variables="all"):
105105
break
106106

107107
return LabelTensor.cat(samples, dim=0)
108+
109+
def partial(self):
110+
"""
111+
Return the boundary of the domain resulting from the operation.
112+
113+
:raises NotImplementedError: The :meth:`partial` method is not
114+
implemented for difference domains. Please operate on the individual
115+
domains instead.
116+
"""
117+
raise NotImplementedError(
118+
"The partial method is not implemented for difference domains. "
119+
"Please operate on the individual domains instead."
120+
)

pina/domain/exclusion.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,16 @@ def sample(self, n, mode="random", variables="all"):
129129
samples.append(LabelTensor.cat(sampled_points, dim=0))
130130

131131
return LabelTensor.cat(samples, dim=0)
132+
133+
def partial(self):
134+
"""
135+
Return the boundary of the domain resulting from the operation.
136+
137+
:raises NotImplementedError: The :meth:`partial` method is not
138+
implemented for exclusion domains. Please operate on the individual
139+
domains instead.
140+
"""
141+
raise NotImplementedError(
142+
"The partial method is not implemented for exclusion domains. "
143+
"Please operate on the individual domains instead."
144+
)

pina/domain/intersection.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,16 @@ def sample(self, n, mode="random", variables="all"):
119119
samples.append(LabelTensor.cat(sampled_points, dim=0))
120120

121121
return LabelTensor.cat(samples, dim=0)
122+
123+
def partial(self):
124+
"""
125+
Return the boundary of the domain resulting from the operation.
126+
127+
:raises NotImplementedError: The :meth:`partial` method is not
128+
implemented for intersection domains. Please operate on the
129+
individual domains instead.
130+
"""
131+
raise NotImplementedError(
132+
"The partial method is not implemented for intersection domains. "
133+
"Please operate on the individual domains instead."
134+
)

pina/domain/union.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,16 @@ def sample(self, n, mode="random", variables="all"):
9090
samples.append(pts)
9191

9292
return LabelTensor.cat(samples, dim=0)
93+
94+
def partial(self):
95+
"""
96+
Return the boundary of the domain resulting from the operation.
97+
98+
:raises NotImplementedError: The :meth:`partial` method is not
99+
implemented for union domains. Please operate on the individual
100+
domains instead.
101+
"""
102+
raise NotImplementedError(
103+
"The partial method is not implemented for union domains. "
104+
"Please operate on the individual domains instead."
105+
)

0 commit comments

Comments
 (0)