Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 117 additions & 99 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -17747,15 +17747,15 @@
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 24,
"endColumn": 60,
"endColumn": 64,
"lineCount": 3
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 23,
"endColumn": 45,
"startColumn": 27,
"endColumn": 49,
"lineCount": 1
}
},
Expand Down Expand Up @@ -33793,46 +33793,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 21,
"endColumn": 36,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 51,
"endColumn": 66,
"lineCount": 1
}
},
{
"code": "reportOperatorIssue",
"range": {
"startColumn": 16,
"endColumn": 63,
"lineCount": 1
}
},
{
"code": "reportOperatorIssue",
"range": {
"startColumn": 42,
"endColumn": 63,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 26,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportOperatorIssue",
"range": {
Expand Down Expand Up @@ -34001,14 +33961,6 @@
"lineCount": 1
}
},
{
"code": "reportAssignmentType",
"range": {
"startColumn": 40,
"endColumn": 66,
"lineCount": 1
}
},
{
"code": "reportUnannotatedClassAttribute",
"range": {
Expand Down Expand Up @@ -38081,14 +38033,6 @@
"lineCount": 1
}
},
{
"code": "reportUnusedParameter",
"range": {
"startColumn": 29,
"endColumn": 33,
"lineCount": 1
}
},
{
"code": "reportUnknownParameterType",
"range": {
Expand Down Expand Up @@ -38161,14 +38105,6 @@
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 36,
"endColumn": 57,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand All @@ -38185,14 +38121,6 @@
"lineCount": 3
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 67,
"endColumn": 68,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -38225,6 +38153,30 @@
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 36,
"endColumn": 43,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 62,
"endColumn": 66,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 68,
"endColumn": 74,
"lineCount": 1
}
},
{
"code": "reportUnknownParameterType",
"range": {
Expand Down Expand Up @@ -39569,30 +39521,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 12,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 21,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 28,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -41719,6 +41647,14 @@
}
],
"./sumpy/test/geometries.py": [
{
"code": "reportAny",
"range": {
"startColumn": 4,
"endColumn": 8,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -52176,6 +52112,88 @@
}
}
],
"./sumpy/test/test_target_deriv.py": [
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 35,
"endColumn": 45,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 35,
"endColumn": 45,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 36,
"endColumn": 47,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 36,
"endColumn": 47,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 8,
"endColumn": 15,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 8,
"endColumn": 16,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 8,
"endColumn": 18,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 28,
"endColumn": 50,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 37,
"endColumn": 55,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 44,
"endColumn": 54,
"lineCount": 1
}
}
],
"./sumpy/test/test_tools.py": [
{
"code": "reportUnusedImport",
Expand Down
4 changes: 0 additions & 4 deletions examples/curve-pot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ def process_kernel(knl, what_operator):
elif what_operator == "D":
from sumpy.kernel import DirectionalSourceDerivative
source_knl = DirectionalSourceDerivative(knl)
# DirectionalTargetDerivative (temporarily?) removed
# elif what_operator == "S'":
# from sumpy.kernel import DirectionalTargetDerivative
# knl = DirectionalTargetDerivative(knl)
else:
raise RuntimeError(f"unrecognized operator '{what_operator}'")

Expand Down
7 changes: 5 additions & 2 deletions sumpy/expansion/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ def coefficients_from_source(self, kernel, avec, bvec, rscale, sac=None):

def evaluate(self, tgt_kernel, coeffs, bvec, rscale, sac=None):
# no point in heeding rscale here--just ignore it

# NOTE: We can't meaningfully apply target derivatives here.
# Instead, this is handled in LayerPotentialBase._evaluate.
return sym.Add(*(
coeffs[self.get_storage_index(i)] / math.factorial(i)
for i in self.get_coefficient_identifiers()))
coeffs[self.get_storage_index(i)] / math.factorial(i)
for i in self.get_coefficient_identifiers()))

def translate_from(self, src_expansion, src_coeff_exprs, src_rscale,
dvec, tgt_rscale, sac=None, m2l_translation_classes_dependent_data=None):
Expand Down
7 changes: 3 additions & 4 deletions sumpy/expansion/multipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ def evaluate(self, kernel, coeffs, bvec, rscale, sac=None):
rscale = 1

base_taker = kernel.get_derivative_taker(bvec, rscale, sac)
# Following is a no-op, but AxisTargetDerivative.postprocess_at_target and
# DirectionalTargetDerivative.postprocess_at_target only handles
# DifferentiatedExprDerivativeTaker and sympy expressions, so we need to
# make the taker a DifferentitatedExprDerivativeTaker instance.
# Following is a no-op, but AxisTargetDerivative.postprocess_at_target
# only handles DifferentiatedExprDerivativeTaker and sympy expressions,
# so we need to make the taker a DifferentitatedExprDerivativeTaker instance.
base_taker = DifferentiatedExprDerivativeTaker(base_taker,
{tuple([0]*self.dim): 1})
taker = kernel.postprocess_at_target(base_taker, bvec)
Expand Down
Loading
Loading