Skip to content

Commit f9b508f

Browse files
authored
Merge pull request #782 from jishnub/trailingwhitespace
trim trailing whitespace
2 parents af037cb + f50f2f4 commit f9b508f

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

src/ApproxFun.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using Base, Reexport,
55

66
import Calculus
77

8-
@reexport using ApproxFunBase
8+
@reexport using ApproxFunBase
99
@reexport using ApproxFunFourier
1010
@reexport using ApproxFunOrthogonalPolynomials
1111
@reexport using ApproxFunSingularities
@@ -14,40 +14,40 @@ import ApproxFunBase: normalize!, flipsign, FiniteRange, Fun, MatrixFun, UnsetSp
1414
UnivariateSpace, AmbiguousSpace, SumSpace, SubSpace, WeightSpace, NoSpace, Space,
1515
HeavisideSpace, PointSpace,
1616
IntervalOrSegment, RaggedMatrix, AlmostBandedMatrix,
17-
AnyDomain, ZeroSpace, ArraySpace, TrivialInterlacer, BlockInterlacer,
17+
AnyDomain, ZeroSpace, ArraySpace, TrivialInterlacer, BlockInterlacer,
1818
AbstractTransformPlan, TransformPlan, ITransformPlan,
1919
ConcreteConversion, ConcreteMultiplication, ConcreteDerivative, ConcreteIntegral, CalculusOperator,
2020
ConcreteVolterra, Volterra, VolterraWrapper,
2121
MultiplicationWrapper, ConversionWrapper, DerivativeWrapper, Evaluation, EvaluationWrapper,
22-
Conversion, defaultConversion, defaultcoefficients, default_Fun, Multiplication, Derivative, Integral, bandwidths,
22+
Conversion, defaultConversion, defaultcoefficients, default_Fun, Multiplication, Derivative, Integral, bandwidths,
2323
ConcreteEvaluation, ConcreteDefiniteLineIntegral, ConcreteDefiniteIntegral, ConcreteIntegral,
2424
DefiniteLineIntegral, DefiniteIntegral, ConcreteDefiniteIntegral, ConcreteDefiniteLineIntegral, IntegralWrapper,
25-
ReverseOrientation, ReverseOrientationWrapper, ReverseWrapper, Reverse, NegateEven,
25+
ReverseOrientation, ReverseOrientationWrapper, ReverseWrapper, Reverse, NegateEven,
2626
Dirichlet, ConcreteDirichlet, DirichletWrapper,
2727
TridiagonalOperator, SubOperator, Space, @containsconstants, spacescompatible,
28-
hasfasttransform, canonicalspace, domain, setdomain, prectype, domainscompatible,
29-
plan_transform, plan_itransform, plan_transform!, plan_itransform!, transform, itransform, hasfasttransform,
28+
hasfasttransform, canonicalspace, domain, setdomain, prectype, domainscompatible,
29+
plan_transform, plan_itransform, plan_transform!, plan_itransform!, transform, itransform, hasfasttransform,
3030
CanonicalTransformPlan, ICanonicalTransformPlan,
31-
Integral,
32-
domainspace, rangespace, boundary,
33-
union_rule, conversion_rule, maxspace_rule, conversion_type, maxspace, hasconversion, points,
34-
rdirichlet, ldirichlet, lneumann, rneumann, ivp, bvp,
35-
linesum, differentiate, integrate, linebilinearform, bilinearform,
31+
Integral,
32+
domainspace, rangespace, boundary,
33+
union_rule, conversion_rule, maxspace_rule, conversion_type, maxspace, hasconversion, points,
34+
rdirichlet, ldirichlet, lneumann, rneumann, ivp, bvp,
35+
linesum, differentiate, integrate, linebilinearform, bilinearform,
3636
UnsetNumber, coefficienttimes, subspace_coefficients, sumspacecoefficients, specialfunctionnormalizationpoint,
3737
Segment, IntervalOrSegmentDomain, PiecewiseSegment, isambiguous, Vec, eps, isperiodic,
3838
arclength, complexlength,
3939
invfromcanonicalD, fromcanonical, tocanonical, fromcanonicalD, tocanonicalD, canonicaldomain, setcanonicaldomain, mappoint,
4040
reverseorientation, checkpoints, evaluate, mul_coefficients, coefficients, coefficientmatrix, isconvertible,
4141
clenshaw, ClenshawPlan, sineshaw,
42-
toeplitz_getindex, toeplitz_axpy!, sym_toeplitz_axpy!, hankel_axpy!, ToeplitzOperator, SymToeplitzOperator, hankel_getindex,
42+
toeplitz_getindex, toeplitz_axpy!, sym_toeplitz_axpy!, hankel_axpy!, ToeplitzOperator, SymToeplitzOperator, hankel_getindex,
4343
SpaceOperator, ZeroOperator, InterlaceOperator,
4444
interlace!, reverseeven!, negateeven!, cfstype, pad!, alternatesign!, mobius,
4545
extremal_args, hesseneigvals, chebyshev_clenshaw, recA, recB, recC, roots,splitatroots,
4646
chebmult_getindex, intpow, alternatingsum,
4747
domaintype, diagindshift, rangetype, weight, isapproxinteger, default_Dirichlet, scal!, dotu,
4848
components, promoterangespace, promotedomainspace, choosedomainspace,
4949
block, blockstart, blockstop, blocklengths, isblockbanded, pointscompatible,
50-
AbstractProductSpace, MultivariateFun, BivariateSpace,
50+
AbstractProductSpace, MultivariateFun, BivariateSpace,
5151
@wrapperstructure, @wrapperspaces, @wrapper, @calculus_operator, resizedata!, slnorm,
5252
sample, chop!, isbanded, colrange, bandwidth
5353

@@ -99,7 +99,7 @@ const Curve{S,T} = Union{IntervalCurve{S,T},PeriodicCurve{S,T}}
9999
Curve(f::Fun{<:Space{<:PeriodicDomain}}) = PeriodicCurve(f)
100100

101101
#TODO: Make type stable
102-
Curve(f::Fun{<:Space{<:ChebyshevInterval}}) = IntervalCurve(f)
102+
Curve(f::Fun{<:Space{<:ChebyshevInterval}}) = IntervalCurve(f)
103103

104104
export Curve
105105

src/Extras/autodifferentiation.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,44 +120,44 @@ end
120120
function newton(N, u0::Array{T,1}; maxiterations=15, tolerance=1E-15) where T <: Fun
121121
u = copy(u0)
122122
err = Inf
123-
123+
124124
numf = length(u0) # number of functions
125125

126126
if numf == 0
127127
error("u0 must contain at least 1 function")
128128
end
129-
129+
130130
Js = Array{Any,2}(undef,1,numf) # jacobians
131-
131+
132132
for k = 1:maxiterations
133133
# ------ calculate Jacobian for each function - O(numf^2) ----
134-
134+
135135
# use the first call to populate the value of the functions
136136
# this saves one call to N()
137137
F = N([ (j == 1 ? DualFun(u[j]) : u[j]) for j = 1:numf ]...)
138138
@inbounds Js[1] = jacobian.(F)
139139
F = map(d -> typeof(d) <: DualFun ? d.f : d, F)
140-
140+
141141
for i = 2:numf
142142
@inbounds Js[i] = jacobian.(N([ (j == i ? DualFun(u[j]) : u[j]) for j = 1:numf ]...))
143143
end
144-
144+
145145
F = N(u...)
146146
J = Base.typed_hcat(Operator, Js...)
147-
147+
148148
# ------- update step ---------
149149
unew = u .- J\F
150150
err = maximum(norm.(unew-u)) # use the max norm error as the overall error
151-
151+
152152
if err 10*tolerance
153153
return unew
154154
else
155155
u = map(q -> chop(q, tolerance), unew)
156156
end
157157
end
158-
158+
159159
@warn "Maximum number of iterations $maxiterations reached, with approximate accuracy of $err."
160-
160+
161161
return u
162162
end
163163

test/ExtrasTest.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ import ApproxFun: eigs
8787
N_dep = (u1,u2) -> [
8888
u1(0)*u1(0)*u1(0) - 0.125;
8989
u2(0) - 1;
90-
u1' - u1*u1;
90+
u1' - u1*u1;
9191
u2' + u1*u1*u2;
92-
]
92+
]
9393
u1,u2 = newton(N_dep, [u1,u2])
9494

9595
u1_exact = -1 / (x - 2)
@@ -104,12 +104,12 @@ import ApproxFun: eigs
104104
N_ind = (u1,u2) -> [
105105
u1(0)*u1(0)*u1(0) - 0.125;
106106
u2(0)*u2(0)*u2(0) + 0.125;
107-
u1' - u1*u1;
107+
u1' - u1*u1;
108108
u2' - u2*u2;
109-
]
109+
]
110110

111111
# note takes a few more iterations to converge to accuracy
112-
u1,u2 = newton(N_ind, [u1,u2], maxiterations=25)
112+
u1,u2 = newton(N_ind, [u1,u2], maxiterations=25)
113113

114114
u1_exact = -1 / (x - 2)
115115
u2_exact = -1 / (x + 2)

test/FractionalTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using ApproxFun, Test
22
import ApproxFunBase: testfunctional, testbandedoperator
3-
3+
44
@testset "Fractional" begin
55
@testset "Jupyer example" begin
66
S = Legendre() JacobiWeight(0.5,0.,Ultraspherical(1))

0 commit comments

Comments
 (0)