-
Numerical Integration of a Function in a Two-Dimensional Space, and Its Solution with Conjugate Gradient
The purpose of this piece is to document the numerical integration of a function in a two-dimensional space using the conjugate gradient method.
Basic Problem Statement and Closed Form Solution
The boundary value problem is as follows:
where
A plot of the right hand side of this is shown below.
To solve this in closed form, we need to consider our solution method. Given the form of Poisson’s Equation above, it is tempting to use a double Fourier series (or alternatively a complex exponential solution with constant coefficients) with only a few (1-2) terms in the solution. Complicating this is the presence of the first order term for
. One way to deal with this is to consider including the linear term in an assumed solution, as follows:
Transforming this into sines and cosines with a more general solution, we can write
Applying the operator to this yields
The idea now is to eliminate terms of sine and cosine combinations that do not appear in the second partial derivatives.
The simplest place to start is to state the following, based on the structure of same partial derivatives:
This harmonizes the sine and cosine functions. By inspection, we can also state that
since these terms do not appear in the problem statement. The values of
and
are not as obvious, but based on the previous statement our assumed solution (equated to the problem statement) reduces to
This can be reduced to a linear system as follows:
In matrix form, the equation becomes
Inverting the matrix and multiplying it by the right hand side yields
This yields our solution,
A plot is shown below.
Solution by Conjugate Gradient
The residual norm history is shown below for n=9, 19 and 39, where n is the number of nodes on each axis to produce a grid. The plot shows the decrease in the 2-norm of the residual as the iterations progress. The iterations are stopped when they either exceed 2000 or if the 2-norm falls below
.
All of the discretisations converged within 40 steps. In any event the conjugate gradient method will converge in no more steps than the row/column number of the matrix, and in this case the performance of the method far exceeded that, doubtless in part to the fact that we employed a preconditioner to accelerate the solution.
As mentioned in the code comments, the method used is conjugate gradient as outlined in Gourdin and Boumahrat (2003). The method begins by computing the original residual:
We then solve the following equation
At this point we need to consider the conditioning matrix
. It is defined as follows:
where
is the lower diagonal portion of
. As an aside, this is an incomplete Cholesky factorization. Obviously
is the upper diagonal,
being symmetric. Since we have an upper diagonal solver, it would make sense to compute and invert
using
.
To accomplish this, we invert this to yield
We can accomplish the first term of the right hand side with the information at hand. For the second term, considering
we transpose both sides to yield
and substituting
We can use the factoring method to invert
, then take its transpose, then multiply
by its transpose to yield
, which is in essence our conditioning matrix and which can be used to solve for the vector
.
Returning to the algorithm, to save calculations later we define the
vectorand solving
we equate
We now begin our iteration for
. We first compute
for which purpose we developed a special subroutine. We then update our step as follows:
Using the conditioning matrix we developed, we compute the following
and (using a similar routine we used for
)
and
From here we index
and repeat the cycle until either we reach
or our convergence criterion. It should be noted that the efficiency of conjugate gradient was such that, particularly at the finer discretizations, the routine spent more time generating the preconditioning matrices than it did in actually going through the cycles!
Solution Code
The solution codes were written in FORTRAN 77, and is presented below. The traditional FORTRAN column spacing got messed up in the cut and paste. Also presented is some of the code which was incorporated using the INCLUDE statement of Open WATCOM FORTRAN. The size of the grid was varied using the parameter statement at the beginning of the problem,and is generally set to 39 for the codes presented. It was varied to 9 and 19 as needed.
We should also note that the routine was run in single precision.
c Solution of Two-Dimensional Grid Using c Conjugate Gradient Iteration c Implementation of conjugate gradient method c as per Gourdin and Boumahrat (2003) c Includes preconditioning by construction of matrix C c Matrix size changed via parameter statement include 'mpar.for' parameter(pi=3.141592654,istep=2000) c Define arrays for main array, diagonal block, off-diagonal block, c and solution and rhs vectors dimension a(nn,nn),d(n,n),c(n,n),u(nn),b(nn) c Define conditioning and related matrices dimension cond(nn,nn),t(nn,nn),tt(nn,nn) c Define residual vectors and norm for residual dimension r(nn),rold(nn),p(nn),s(nn),sold(nn),xnorm(istep) c Coordinate Arrays dimension x(n,n),y(n,n) c Error Vector for Final Iterate dimension uerr(nn) c Statement function to define rhs f(x1,y1)=-5*y1*sin(x1)*sin(2*y1)+4*sin(x1)*cos(2*y1) c Statement function to define closed form solution fexact(x1,y1)=y1*sin(x1)*sin(2*y1) c Write Header for Output write(*,*)'Math 5610 Spring 2012 Project 1d' write(*,*)'Conjugate Gradient Iteration to solve', &' two-dimensional grid' write(*,*)'Grid Size = ',n,' x ',n write(*,*)'Matrix Size ',nn,' x ',nn call tstamp c Initialise diagonal block array do 20 i=1,n,1 do 20 j=1,n,1 if(i.eq.j) then d(i,j)=4. elseif(abs(i-j).eq.1) then d(i,j)=-1. else d(i,j)=0. endif 20 continue c Initialise off-diagonal block array do 30 i=1,n,1 do 30 j=1,n,1 if(i.eq.j) then c(i,j)=-1. else c(i,j)=0. endif 30 continue c Compute grid spacing h xh=pi/float(n+1) c Initialise rhs do 60 j=1,n,1 do 60 i=1,n,1 x(i,j)=float(i)*xh y(i,j)=float(j)*xh ii=(j-1)*n+i b(ii)=-f(x(i,j),y(i,j))*xh**2 write(*,61)i,j,ii,x(i,j),y(i,j),b(ii) 61 format(3i5,3f10.3) 60 continue c Insert block matrices into main matrix call blkadd(d,c,a) c Initialise result vector do 70 ii=1,nn,1 70 u(ii)=1.0 c Compute first residual vector, using residual vector as temporary storage call xmvmat(a,u,r) do 75 ii=1,nn,1 r(ii)=b(ii)-r(ii) 75 continue c Construct upper triangular matrix tt by stripping lower diagonal portion of c matrix a do 76 ii=1,nn,1 do 76 jj=1,nn,1 if(jj-ii)78,77,77 77 tt(ii,jj)=a(ii,jj) goto 76 78 tt(ii,jj)=0.0 76 continue c Invert upper triangular matrix tt by factorisation method call uminv(tt) c Construct inverted matrix t by transposing inverted matrix tt call trnspz(tt,t) c Multiply t by tt to obtain preconditioning matrix c (which is actually c c**(-1)) call xmvmul(tt,t,cond) c Compute initial vector p by multiplying cond (inverse of c) by residual call xmvmat(cond,r,p) c Set initial vector s to p do 79 ii=1,nn,1 79 s(ii)=p(ii) do 80 kk=1,istep,1 c set old values of vectors r and s do 190 ii=1,nn,1 rold(ii)=r(ii) 190 sold(ii)=s(ii) c Compute alpha for each step alpha1=alpha(a,p,r,s) c Update value of u do 181 ii=1,nn,1 181 u(ii)=u(ii)+alpha1*p(ii) c Update residual for each step r = b-Au call xmvmat(a,u,r) do 82 ii=1,nn,1 r(ii)=b(ii)-r(ii) 82 continue c Update vector s call xmvmat(cond,r,s) c Compute value of beta for each step beta1=beta(r,rold,s,sold) c Update value of p vector do 195 ii=1,nn,1 195 p(ii)=s(ii)+beta1*p(ii) c Invoke function to compute Euclidean norm of residual c Kicks the iteration out once tolerance is reached xnorm(kk)=vnorm(r,nn) if(xnorm(kk).lt.1.0e-04)goto 83 write(*,*)kk,xnorm(kk) 80 continue 83 continue do 90 j=1,n,1 do 90 i=1,n,1 ii=(j-1)*n+i uerr(ii)=fexact(x(i,j),y(i,j))-u(ii) 90 continue uerrf=vnorm(uerr,nn) write(*,*)'Number of iterations = ',kk write(*,*)'Euclidean norm for final error =',uerrf open(2,file='m5610p1d.csv') if(kk.gt.istep)kk=istep do 40 ii=1,kk,1 write(2,50)ii,xnorm(ii) 50 format(i5,1h,,e15.5) 40 continue close(2) stop end
c Subroutine to insert nxn blocks into n**2xn**2 array c Assumes all diagonal blocks are the same c Assumes all off-diagonal blocks (upper and lower) are the same c Assigns zero values elsewhere in the array subroutine blkadd(d,c,a) include 'm5610par.for' dimension a(nn,nn),d(n,n),c(n,n) c Insert blocks into array do 20 ii=1,n,1 do 20 jj=1,n,1 c Determine row and column index in master array for corner of block ic=(ii-1)*n+1 jc=(jj-1)*n+1 do 30 i=1,n,1 do 30 j=1,n,1 iii=ic+i-1 jjj=jc+j-1 if(ii.eq.jj)then a(iii,jjj)=d(i,j) elseif(abs(ii-jj).eq.1)then a(iii,jjj)=c(i,j) else a(iii,jjj)=0. endif 30 continue 20 continue return end
c Subroutine to multiply a nn x nn matrix with an nn vector c a is the nn x nn square matrix c b is the nn vector c c is the result c nn is the matrix and vector size c Result is obviously an nn vector c Routine loosely based on Gennaro (1965) subroutine xmvmat(a,b,c) include 'm5610par.for' dimension a(nn,nn),b(nn),c(nn) do 20 i=1,nn,1 c(i)=0.0 do 20 l=1,nn,1 20 c(i)=c(i)+a(i,l)*b(l) return end
c Subroutine to multiply a nn x nn matrix with another nn x nn matrix c a is the first nn x nn square matrix c b is the second nn x nn matrix c c is the result c nn is the matrix size c Result is obviously an nn x nn matrix c Routine based on Gennaro (1965) subroutine xmvmul(a,b,c) include 'm5610par.for' dimension a(nn,nn),b(nn,nn),c(nn,nn) do 20 i=1,nn,1 write(*,*)'Multiplying Row ',i do 20 j=1,nn,1 c(i,j)=0.0 do 20 l=1,nn,1 20 c(i,j)=c(i,j)+a(i,l)*b(l,j) return end
c Subroutine to invert a mm x mm upper triangular matrix using factor method c u is input and output matrix c t is result matrix, written back into the output matrix c mm is matrix size c Result overwrites original matrix c Based on Gennaro (1965) subroutine uminv(u) include 'm5610par.for' dimension u(nn,nn),t(nn,nn) c Zero all entries in matrix t except for diagonals, which are the reciprocals c of the diagonals of the orignal matrix do 20 i=1,nn,1 do 20 j=1,nn,1 if(i-j)11,10,11 10 t(i,j)=1.0/u(i,j) goto 20 11 t(i,j)=0.0 20 continue c Compute strictly upper triangular entries of inverted matrix do 40 i=1,nn,1 write(*,*)'Inverting Row ',i do 40 j=1,nn,1 if(j-i)40,40,31 31 l=j-1 do 41 k=i,l,1 t(i,j)=t(i,j)-t(i,k)*u(k,j)/u(j,j) 41 continue 40 continue c Write back result into original input matrix do 50 i=1,nn,1 do 50 j=1,nn,1 50 u(i,j)=t(i,j) return end
c Function to compute Euclidean norms of vector function vnorm(V,no) dimension V(no) znorm=0. do 100 ia=1,no,1 100 znorm=znorm+V(ia)**2 vnorm=sqrt(znorm) return end
c Function to determine scalar multiplier alpha for conjugate gradient method c Function returns a scalar which is multiplied by residual vector c Function uses subroutine xmvmat to multiply matrix A by residual c A is main matrix c r is residual vector c nn is size of matrix/vector c rgrad is scalar multiplier for gradient method function alpha(a,p,r,s) include 'm5610par.for' dimension a(nn,nn),r(nn),pt(nn),p(nn),s(nn) c Compute dot product of r and s for numerator rnumer=0.0 do 10 ii=1,nn,1 rnumer=rnumer+r(ii)*s(ii) 10 continue c Compute matrix product of A * p call xmvmat(a,p,pt) c Premultiply matrix product by transpose of p vector for denominator rdenom=0.0 do 20 ii=1,nn,1 rdenom=rdenom+p(ii)*pt(ii) 20 continue alpha = rnumer/rdenom return end
c Function to determine scalar multiplier beta for conjugate gradient method c Function returns a scalar which is multiplied by p vector c r,s are vectors is residual vector c nn is size of matrix/vector c rgrad is scalar multiplier for gradient method function beta(r,rold,s,sold) include 'm5610par.for' dimension r(nn),rold(nn),s(nn),sold(nn) c Compute dot product for numerator rnumer=0.0 do 10 ii=1,nn,1 rnumer=rnumer+r(ii)*s(ii) 10 continue c Compute dot product for denominator rdenom=0.0 do 20 ii=1,nn,1 rdenom=rdenom+rold(ii)*sold(ii) 20 continue beta = rnumer/rdenom return end
c Subroutine to transpose a matrix c Adapted from Carnahan, Luther and Wilkes (1969) subroutine trnspz(a,at) include 'm5610par.for' dimension a(nn,nn),at(nn,nn) do 14 ii=1,nn,1 do 14 jj=1,nn,1 14 at(jj,ii)=a(ii,jj) return end
include 'tstamp.for'
Included Routines
- tstamp.for calls a OPEN WATCOM function and time stamps the output.
- mpar.for sets the parameter statements and is shown below.
parameter(n=39,nn=n*n)
References
- Carnahan, B., Luther, H.A., and Wilkes, J.O. (1969) Applied Numerical Methods. New York: Wiley.
- Gennaro, J.J. (1965) Computer Methods in Solid Mechanics. New York: Macmillan.
- Gourdin, A., and Boumahrat, M. (2003) Applied Numerical Methods. New Delhi: Prentice-Hall India.
-
When Evangelicals Were Cool: He Doesn't Know the Half of It, Musically at Least
It was a pleasant surprise to see Philip Jenkins article When Evangelicals Were Cool about what many of us refer to as the “Jesus Music Era”. Given the protracted trashing that Evangelicals have gotten since (done, in part, because they’re perceived as a threat) it’s nice to see someone bring up an era–the late 1960’s and 1970’s–when, in the midst of all the social upheaval, people frequently got saved and Evangelical Christianity flourished.
Jenkins is correct in putting his finger on the music revolution–and Christianity’s adaptation to it–as a critical moment in introducing a new generation to Jesus Christ. He keys his emphasis on one group–the Byrds–and one genre of music–“country rock”–as the key to the breakout that took place.But the Jesus Music Era was far more complex, and reflected a situation which was not as one-dimensional as either Jenkins (probably for brevity) paint it, or as it later became. A few things that Jenkins and other researchers would do well to dig into would be the following:
- Roman Catholic and Episcopal Folk. Although Jenkins emphasises the Evangelicals, the Roman Catholics and Episcopalians were very much using the liturgical changes taking place in their own churches to pioneer some interesting types of music, ranging from the college folk of God Unlimited and Who Shall Spread the Good News to the community music of Emmanuel (before it was flattened by covenant community authoritarianism) to classically influenced works like Sons of the Morning and more pop style groups like the Kairosingers.
- Coffee-house Folk. The coffee-house was that hippie-Christian institution par excellence; many lives were changed there. Few institutions met the culture as successfully. The Calvary Chapel groups such as Love Song, The Way and the Maranatha series of albums and artists propagated that very successfully, but works such as He Loves You and Me take the art form higher in many ways.
- Progressive Rock. Although “prog” isn’t as well represented as one would like, especially on the other side of the Atlantic with British groups such as Reflection. But these shores saw some too, such as Outpouring.
- Hard Christian Rock. The bane of many a preacher in those days and now, groups such as Petra and Cookin’ Mama showed that Christians could rock on as well as their secular counterparts.
With this illustrious legacy, the obvious dumb question is “What Happened”? There’s a short and a long-term answer to this.
The vinyl/cassette/8-track legacy of the era has been around ever since (and yes, I can remember when it was new)! But in the later years of the last decade sites such as the Ancient Star-Song have digitised the music for a new generation (and for the one that heard it in the first place). Unfortunately the copyright issue, especially this year with the Megaupload fiasco, has largely derailed the effort, although (especially with the indie albums) the artists who discovered their work was “out there” again were generally pleased that anyone still cared and that their work was still enjoyed and ministered to people. Some have even been inspired to put it back into distribution.
The longer term problem started towards the end of the 1970’s, and it revolves around the simple fact that Christian music shifted from being a ministry to being a business. Rachel Held Evans’ piece on Christian bookstores documents a process of the homogenisation and “sanitisation” effect of Christian retail, and that was part of the problem. The music labels did their part too. Christian music may have increased its commercial viability, but it sacrificed its diversity of style and ministry impact in the process.
And Jenkins’ focus on Christian country rock underscores another transition that has come back to bite Evangelical Christianity: the “Dixiefication” of Evangelical Christianity, the Christian music industry and the church itself. The Baby Boomer generation is essentially bifurcated by those who were deeply influenced by the 1960’s and those who were not. Much of the “Jesus Music Era” attempted to reach both sides of the bifurcation. But the money and numbers tended to crowd out alternate expressions of the faith, even when those expressions reached “beyond the gates” more effectively. The upshot of this process is an Evangelicalism which is too narrowly focused in the US even when elsewhere–and within non-white groups here–it is burgeoning.
But Jenkins has opened up a long-needed conversation on what he rightly describes as the “Fourth Awakening” in this country, one that stalled its secularisation for a generation and perhaps more. It’s time also to learn some lessons about how to break out of a “cultural ghetto”, lessons that are sorely needed now and for the foreseeable future.
-
Why I've Never Been Sold on "Christian Social Activism"
There were two things I was hoping to escape when I joined a Pentecostal church: social-climbing Christianity and social justice Christianity. Silly me: I’ve achieved neither of these. I deal with the former on an irregular basis. I think my church people and pastor are aware of my rants on the subject but up to now the one point of blow-back has come from South Africa.
It took longer for me to realise I had a problem, but the latter has stuck to me like flypaper. There are people out there in my church and churches like it who are very big on this subject. I’m tempted to say that they’ve not gone as far as their, say, Episcopal counterparts, but the more I read the less I’m inclined to make that sweeping generalisation.
I’m as aware as anyone–and more than most–that the New Testament doesn’t support the middle class model that passes itself off as God’s plan for the normal Christian life. But after all of these years I still don’t believe that the Christian’s first aim is to, say, meet the Millennial Development Goals, as the Episcopal Presiding Bishop does. This piece is my attempt to explain my rationale on this subject, and perhaps to help others who wrestle with it.
As with many other problems, I look at things from a multi-faceted view, so some of the rationale will come as a surprise to my conservative readers as well as my liberal ones.
MarxismStarting with Karl and Fred’s ideology might seem to be a strange way of beginning this diatribe, but in the 1960’s and 1970’s it was very relevant. The Cold War’s ending wasn’t as obvious as it is now, and could have turned out differently if a few things and people had changed here and there. And had the peace movement–Christian and otherwise–succeeded in its goal of unilateral disarmament, Marxism in one or more of its flavours would have been the only “social justice” game in town, and Christian social activism would have been at an end.
It’s easy to forget now, but Marxism’s great claim to fame has traditionally been that it is “scientific socialism” as opposed to the “utopian socialism” that was its counterpart. Put another way, Marx and Engels trumpeted their brand of left-wing ideology as based on science, which when coupled with their materialistic and deterministic assumptions, meant that history would always end up going their way. (That, boys and girls, is the origin of the “wrong side of history” or the “ash heap of history”, as Leon Trotsky put it). In any case, Christian social activism was and is a utopian proposition, buttressed at various times by post-millennialism or simple naïve moralism (more about that later).
Helping Marxism’s case was a better understanding of economics than almost anyone in the Christian left then and now, especially as it regards the business of the surplus value of labour. Friedrich Engels managed a subsidiary of his family business in Manchester, England, from whence my great-great-grandfather came to the US to start our family business. In both cases contact with the actual workings of business, irrespective of whether one thought it was good or bad, made it quickly clear that many on the left–and this was and is certainly true of the Christian left–were complete babes in the woods about economics, how it worked, the problems it caused, and how these problems might be solved. To say that this trashed any credibility of Christian social activists is an understatement.
Hand in hand with that is Marxism’s emphasis on economic equality and the solution of the class struggle. Conservatives decry attempts at class warfare on the left, but the core difference between American liberalism and Marxism is the former’s obsession with “justice” of just about every kind except economic: racial, gender, environmental and now of course the LGBT crusade. The Christian left followed its secular counterpart on this. The result now is that, after fifty years of activism, the income and wealth spread between top and bottom in our society keeps growing, with liberals stupidly wondering why. It was Marxism’s strongest critique against American liberalism then and it certainly is now; even that quintessential Christian leftist, Jim Wallis, gives evidence that he’s figured that out.
The upshot of this was that, if offered a choice of Marxism or the Christian left as the only two choices out there, I would have picked Marxism in a heartbeat. Why? Well, Christian leftists are in the habit of denying the basic truths of the faith, so the eternal destiny of both looked to be the same. If you’re going to commit your life to such an enterprise, commit it to one where you can use force to get your way and one that at least built industrial powerhouses and not trying to turn the world back to the Stone Age. Happily there were other choices.
The Issue of Morality
One of Marxism’s tenets is that morality has no objective existence; any system of thought that depends upon it is doomed to failure. That is a logical outcome of atheism’s purely materialistic and naturalistic view. The fact that New Atheists have tried to hide this fact doesn’t change it.
It’s still a frequent article of faith among liberal Christians (and Unitarians) that Jesus was simply a good moral teacher and not really divine as the New Testament claims that he is. That view has been relentlessly attacked by conservative Evangelicals, and rightfully so. It was an important attraction to a portion of Christianity for which I had little regard.
Ultimately, however, this is the strongest point Evangelicals make whether they follow-up on it or not: Christianity is not, at its heart, a moral system. If it were so, our salvation would depend upon our adherence to a legal code of a rule system, and it does not. It depends upon Jesus’ finished work on the Cross and the blood shed therein, and our acceptance of same.
Christian social activists were and are intensely moralistic people, as are many of their secular counterparts. The problem with that is that it often leads to self-righteousness, something the New Testament both anticipates and condemns. We see this in superabundance these days amongst activists of all kinds, religious or secular; they are blindly self-righteous ad nauseam. Why would I want to join up with such a group of people with this kind of result?
The New Testament
Now we come to the really problematic part of Christian social activism: the New Testament doesn’t support it. At all. Nowhere. Zip. Nada. There is no place where Our Lord exhorts us to petition the government to alter the structure of society for a more just result, which is the heart of Christian social activism. The church must do what it can do to relieve the suffering of those around it: that more than anything else transformed Christianity from the religion of the Upper Room to the official religion of the Roman Empire. But petitioning the government for a redress of grievances did not get the job done in ante-Nicene times.
Faced with this obvious fact, the Christian left turned to the “prophetic witness” of the Old Testament, only to shortly find that the Religious Right had done the same thing. Both are operating under the implicit assumption that this country is a de facto new Israel, something else that doesn’t have Biblical support.
Putting a Wrap
Given all of this, we’re back to Lenin’s favourite question: what is to be done? For me, the more straightforward response was to head to the church where the poor were at, with the rear view mirror response. But, as noted at the top of this piece, that hasn’t worked out according to plan.
Some of the problem is perception. Social activists in Pentecostal churches look at their North American denominations and see what looks to be a middle class church. Although it may look that way from the view of the “Global South” wealth is a relative term. Most Evangelicals in general are on the wrong side of the “equality divide”; the sooner they figure that out and get past the shame-honour reaction, the better for everyone.
Today our elites bawl incessantly about democracy and the rule of law, both of which are necessary prerequisites to proper Christian social activism (especially when it comes to making the results stick). But we live in a system where the moneyed at the top increasingly dominate the proceedings, short-circuiting the process in various ways. One of them is to fund social activist causes, partly to assuage their own guilt and partly to control the process and take the focus away from themselves.
It’s hard to know how long the Lord will let any of us stay on the earth. I would like to think I will live long enough to see the day when Christians will stop letting the secular left lead them by the nose and develop a social consciousness that gets beyond the “make the government do it” mentality and focus on what we are supposed to do ourselves. It’s gratifying to see the rapid growth in Evangelical churches in disaster response and other direct action; it’s certainly made the difference for many people waiting for the government to make a move.
But whether I do or don’t, I have no regrets about not getting caught up in the Christian left. The New Testament presents to us a new way of living which is better than any kind of legalism or moralism out there, and we are ill-advised to do it differently:
Therefore, Brothers, since we may enter the Sanctuary with confidence, in virtue of the blood of Jesus, by the way which he inaugurated for us–a new and living way, a way through the Sanctuary Curtain (that is, his human nature); and, since we have in him ‘a great priest set over the House of God,’ let us draw near to God in all sincerity of heart and in perfect faith, with our hearts purified by the sprinkled blood from all consciousness of wrong, and with our bodies washed with pure water. Let us maintain the confession of our hope unshaken, for he who has given us his promise will not fail us. (Hebrews 10:19-23)
-
The Episcopal Church: Getting Out While the Getting Out Was Good
This exchange of correspondence about someone who wanted to transfer their membership to one of the “seceding” dioceses’ parishes would be hilarious if it wasn’t so tragic.
Basically, the parish of the Diocese of Dallas (whose Dean’s parting shot was commented on here) refused to start a “canonical” transfer of membership to one of the parishes of the Diocese of Ft. Worth (which has left TEC over the usual problems). As Fr. Matkin points out:
When parishes and dioceses began leaving the Episcopal Church in the last several years, the mantra we heard from TEC leadership was, “Individuals can leave this church, but parishes and dioceses cannot.” But according to a parish in the Diocese of Dallas, individuals cannot leave either. There is no way out.
As Jean-Paul Sartre would say, it’s “Huis Clos”!
Back in old South Florida, we used to say that those who got out of Cuba before or shortly after Castro took over got out with pretty much everything. The longer they waited, the less they came out with. In TEC’s case, it’s the same. Places like All Saints Pawley’s Island, with its extraordinary charter, got out early and well; most everyone else has had to take a raft, although Ft. Worth has the best shot out there to reverse the trend. (And, yes, the comparison between KJS and Fidel is unfair. To Fidel).
When I left the Episcopal Church forty years ago, I just swam the Tiber and that was it. I didn’t care how Bethesda handled it. What I gained after leaving more than compensated for whatever I lost.
There’s also an interesting legal angle to this: TEC is struggling mightily (both internally and externally) to regain the Ft. Worth diocese and its parishes. It does not, in theory, recognise the secession of these parishes. But the Episcopal position re this membership is a de facto acknowledgement of two realities:
- That Fr. Matkin’s parish has made its escape in the eyes of TEC, which undermines their position in court.
- That TEC is no longer in communion with large swaths of the Anglican Communion. From an Episcopal standpoint, there are two Communions, not one.
-
Solving a Third-Order Differential Equation Using Simple Shooting and Regula Falsi
The object of this is to solve the differential equation
for the following boundary conditions and parameters:
Conventional wisdom would indicate that, because of the high order of the derivatives, this problem cannot be solved using a scalar implementation of simple shooting. However, this is not the case.
To see why this is so, let us begin by implementing the following notation:
If we substitute these into the differential equation and solve for the third derivative, we have
Now we can construct a series of first-order differential equations for our Runge-Kutta integration scheme as follows:
Now let us consider things at our first boundary point, namely
Making the appropriate substitutions yields
We thus see that, if we use
as our independent variable for shooting purposes, we also assume a value of
as well. Put another way, since we are given the dependent variable and its first derivative of the ODE at the first boundary, if we guess the second derivative the third derivative automatically follows in
spite of the non-linearity of the problem. So we can use a scalar shooting scheme for this problem as well. The dependent variable for root-finding purposes iswhich goes to zero as the far boundary condition is met.
To implement this we used a same simple shooting routine with a regula falsi root-finding technique. One thing that was varied was the number of integration steps in the interval; we wanted to see how this affected the convergence.
The results of this are summarized below.
The number of shooting iterations is fairly constant with the variation in integration steps; however, the final value of
seems to be refining itself until around 100 integration steps, at which point the accumulation of numerical error begins to affect the precision of the result.
A plot of the results is shown below.
FORTRAN 77 code is below. Some of the “includes”, subroutines and functions are as follows:
- matsize.for is a brief snippet of code which includes a parameter statement which sizes the variable size arrays.
- tstamp calls an OPEN WATCOM routine that returns the date and time and places it in the output.
- scrsho is a “line plotter” routine, very old school.
c Solution of Third-Order Ordinary Differential Equation c Using Simple Shooting Method and Regula Falsi root-finding technique c Solution based on Carnahan, Luther and Wilkes (1969) include 'matsize.for' parameter(neqs=3,nx=10) character*40 vinput(nmax) character*16 voutpt(nmax) c Plot title character*60 titlep dimension y(neqs),dy(neqs),xyplot(0:nx,2) c Define third derivative function y4(y1,y2,y3,xmu)=xmu*y3-xmu*y3*y1**2-2.*xmu*y1*y2**2-y2 c Define second boundary condition function bfin(y1,y1fin)=y1-y1fin c Enter Boundary Conditions data y1strt/0.0/,y2strt/0.5/,y1fin/1.0/xstrt/0.0/,xend/2.0/ c Enter initial upper and lower bounds for y(3) (Second Derivative) data y3left/2.0/,y3rite/0.0/ c Enter number of shots data n/50/ c Enter friction coefficient data xmu/0.5/ c Enter nomenclature describing initial data as data statements data vinput(1)/'Left Initial Bracket'/ data vinput(2)/'Right Initial Bracket'/ data vinput(4)/'Delta x increment'/ data vinput(5)/'First Boundary Condition'/ data vinput(6)/'Second Boundary Condition'/ data vinput(7)/'mu'/ data vinput(8)/'Number of Shots'/ c Enter nomenclature describing output for individual case data vinput(11)/'Shot Number'/ data vinput(12)/'Value of Guess for Second Derivative'/ data voutpt(1)/'x'/ data voutpt(2)/'y(x)'/ data voutpt(3)/'y`(x)'/ data voutpt(4)/'y``(x)'/ data voutpt(5)/'y```(x)'/ data titlep/'Plot of Final Boundary Condition vs. x'/ c Description of variables below the comment: write(*,*)'Math 5610 Spring 2012 Final Exam' write(*,*)'Simple Shooting Method for Third-Order ODE' call tstamp c Compute value of integration step size for dx dx = (xend-xstrt)/float(nx) write(*,*) c Interval of uncertainty (left) 1 write(*,*)'Initial Parameters for Problem:' write(*,200)vinput(1),y3left c Interval of uncertainty (right) write(*,200)vinput(2),y3rite write(*,200)vinput(4),dx write(*,200)vinput(5),xstrt write(*,200)vinput(6),xend write(*,200)vinput(7),xmu write(*,200)vinput(8),n do 21 iter=1,n,1 c ..... Set and print initial conditions c ..... Since regula falsi isn't "self starting" it is necessary c to compute the left and right values for y(3) (regula c falsi independent variable) and compute the corresponding c result for bfnact (regula falsi dependent variable) c c This is done in the first two iterations c Iteration 1: Right Value c Iteration 2: Left Value c Susequent iterations adjust boundaries according to the c method x = xstrt y(1)=y1strt y(2)=y2strt if(iter.eq.1)then y(3) = y3rite write(*,*)'Iteration for Right Estimate' elseif(iter.eq.2)then y(3) = y3left write(*,*)'Iteration for Left Estimate' else y(3) = (y3left*bfinr-y3rite*bfinl)/(bfinr-bfinl) endif bfnold =bfnact y3zero = y(3) c Set print index to zero; print index changed at the first, middle c and last iteration and printing/plotting takes place write(*,*) write(*,210)iter write(*,200)vinput(1),y3left write(*,200)vinput(12),y3zero write(*,200)vinput(2),y3rite write(*,*) write(*,212)(voutpt(np),np=1,5,1) write(*,*) bfnact=bfin(y(1),y1fin) write(*,202)x,y(1),y(2),y(3),bfnact c ..... Set Selected variable for plot routine xyplot(0,1)=x xyplot(0,2)=bfnact do 17 icycle=1,nx,1 c ..... Call Runge-Kutta Subroutine ..... 8 if(irunge(neqs,y,dy,x,dx).ne.1)goto 10 dy(1)=y(2) dy(2)=y(3) dy(3)=y4(y(1),y(2),y(3),xmu) goto 8 c ..... Print Solutions, Plot bfnact vs. x values ..... 10 bfnact=bfin(y(1),y1fin) write(*,202)x,y(1),y(2),y(3),bfnact c ..... Set Selected variable for plot routine nplot = icycle xyplot(icycle,1)=x xyplot(icycle,2)=bfnact if(icycle.eq.nx)call scrsho(xyplot,nx,titlep) 17 continue c ..... Ending routine if difference between current and past c values of the boundary condition function are small enough if(iter.eq.1)then bfinr=bfnact elseif(iter.eq.2)then bfinl=bfnact else err = abs((bfnold-bfnact)/xmu) if(err.lt.1.0e-06)goto 23 if(bfnact*bfinl.gt.0)then y3left = y3zero bfinl = bfnact else y3rite = y3zero bfinr = bfnact endif endif 21 continue 23 continue 200 format(A40,2h ,g15.7) 202 format(1x,f7.4,2f16.7,2f16.8) 210 format(35hResults for Regula Falsi Iteration ,i2) 212 format(1x,5a16) stop end
function irunge(n,y,f,x,h) c Fourth-order Runge-Kutta integration routine c Taken from Carnahan, Luther and Wilkes (1969) c c The function irunge employs the fourth-order Runge-Kutta method c with Kutta's coefficients to integrate a system of n simultaneous c first-order ordinary differential equations f(j)=dy(j)/dx, c (j=1,2,...,n), across one step of length h in the independent c variable x, subject to initial conditions y(j), (j=1,2,...,n). c Each f(j), the derivative of y(j), must be computed four times c per integration step by the calling program. The function must c be called five times per step (pass(1)...pass(5)) so that the c independent variable value (x) and the solution values (y(1)...y(n)) c can be updated using the Runge-Kutta algorithm. M is the pass c counter. Irunge returns as its value 1 to signal that all derivatives c (the f(j)) be evaluated or 0 to signal that the integration process c for the current step is finished. Savey(j) is used to save the c initial value of y(j) and phi(j) is the increment function for the c j(th) equation. c c The size of the savey and phi arrays depends upon the value of the parameter c which is included. include 'matsize.for' dimension phi(nmax),savey(nmax),y(n),f(n) data m/0/ m=m+1 goto(1,2,3,4,5), m c ..... Pass 1 ..... 1 irunge=1 return c ..... Pass 2 ..... 2 do 22 j=1,n,1 savey(j)=y(j) phi(j)=f(j) 22 y(j)=savey(j)+h*f(j)/2.0 x=x+h/2.0 irunge=1 return c ..... Pass 3 ..... 3 do 33 j=1,n,1 phi(j)=phi(j)+2.0*f(j) 33 y(j) = savey(j)+0.5*h*f(j) irunge=1 return c ..... Pass 4 ..... 4 do 44 j=1,n,1 phi(j)=phi(j)+2.0*f(j) 44 y(j)=savey(j)+h*f(j) x=x+0.5*h irunge=1 return c ..... Pass 5 ..... 5 do 55 j=1,n,1 55 y(j)=savey(j)+(phi(j)+f(j))*h/6.0 m=0 irunge=0 return end
-
A Geologic View of Old Florida and its Coral Reefs
While reading Grabau’s 1913 Principles of Stratigraphy, I came across this fascinating description of the geology of Florida and its coral reefs. This is for the most part a summary of expeditions in the early 1850’s by two of this country’s pioneering geologists: Louis Agassiz and Joseph LeConte. In addition to the outline of the geology of the reefs (a life form where geology and biology run together) it’s an interesting early description of a sparsely populated area before its dramatic transformation during the last century.
The reefs of the Florida coast form an interesting example of the fringing type on a shallow continental platform. The southern coast of Florida rises from 12 to 15 feet above the sea-level, in the form of a curving ridge, which encloses an extensive fresh-water swamp, the Everglades. The surface of this lies only two or three feet above sea-level, and is dotted over with small islands, the so-called hummocks. Some distance outside of the southern border of the land lies a row of small islands or “keys” of dead coral rock and sand, ranging from 5 to 30 miles distant from shore and continued westward in a curved line far beyond the western coast of the peninsula. The islands are low and of limited extent, that of Key West near the western end of the line being less than 4 miles long, while the longest of the islands is only 15 miles in length. The keys slope toward their northern shore, and present a steep face to the south, where they are separated from the living reefs by an open channel. Between the keys and the southern coast of the mainland the water is very shallow and navigable only to the smallest boats. This lagoon is, moreover, dotted with small, low mangrove islands. The mangrove trees growing here extend their aerial roots in all directions, forming at angle, which becomes efficient in checking sediment-laden currents and causes them to deposit their load. Hence the inner lagoon will gradually silt up, and this has already progressed so far that a considerable portion of the area forms mud flats at low tide. (Figs.81, 82.) Here, then, a clastic mud sediment rich in organic matter rests directly up on the ancient coral reef now represented by the keys, a relationship expressed in the rocks of the older geological periods by the superposition of a black carbonaceous shale above an earlier coral limestone.
Outside of the line of key sand from 3 to 15 miles distant from it is a line of living coral reefs, consisting of mounds made up of branching madrepores, Porites,etc., besides many smaller genera such as Manicina, Agaricia, etc.Corallina and Lithothamnion also add a large percentage of calcareous material to the reef.
These reefs are for the most part submerged, rising only here and there to the surface. Between them and the keys lies the outer lagoon, along a narrow channel five to six fathoms deep and navigable for small vessels. Here the sedimentation consists of coral sand and of the shells of marine organisms, thus producing a normal marine limestone, which is either in the form of a coral breccia or a more or less oolitic calcarenyte. Outside the living reef, the bottom rapidly descends to the abyssal depths of the Florida Straits (2,916feet). While nullipores, or the stony algae, luxuriate in the outer zone of the reef, where they form a distinct Nullipore zone in the face of the strong surf, the more delicate branching and brittle coral lines are confined to the channels and lagoons within the reef, where they often form thick carpets in the quiet water. Thus the shallow parts of the bottom of the ship channel between the living Florida reefs and the old reefs or keys are covered with the so-called “country grass,” one of these calcareous algae. This is especially noticeable between Fowey Rocks, Triumph Reef and Long Reef on the one side, and Soldier Key and Ragged Keys on the inside (Agassiz-2:126,127). The floor of Hawk Channel, which has a depth of from 6 to 7 fathoms, is covered with disintegrated corals and coral-lines (Pourtales; Dana-20:211), while some of the keys in the Dry Tortugas and Marquesas are wholly composed of fragments of coral lines bound together into a solid mass. Among these coral-lines a large species of Opuntia is especially noticeable.
It has been shown by Agassiz that the keys, the southern rim of the mainland, and a strip including the north shore of the Everglades and extending as far north on the eastern shore as St. Augustine, are of coral-reef origin. When this last strip was the living reef, the platform in front was being built out into the sea by the accumulations of the shells of organisms which lived in abundance in the genial waters of the Gulf Stream border. When the platform was sufficiently extended a new line of reefs came into existence, forming a barrier reef at a distance from shore where now lies the outer rim of the Florida mainland. The lagoon behind this new reef was of the character of the present outer lagoon, and received normal marine sediments, until with progressive upbuilding the outer reef was converted into a series of dead keys and a new line of reefs came into existence up on the meanwhile extended submarine platform. This new line was subsequently converted in to the present line of keys, the preceding row became the southern coastal rim, and the old lagoon behind it was converted by successive steps in to the present Everglades. The present inner lagoon channel between the mainland and the keys is gradually approaching the same fate, and it and the line of keys will in turn be added to the mainland, while the present living reef will gradually emerge as a line of island sand the lagoon behind it suffer filling up. It is not likely that a new line of reefs will form outside of the present one, as the force of the Gulf Stream will prevent further extension on the Pourtales Plateau of the submarine platform which serves as the foundation of the reef. (LeConte-59; 60.)
-
A Tough (but Realistic) Assessment of a "Double-Minded Man", Rowan Williams
From Gerald Bray at the Churchman, the best wrap on the man and his role I have seen yet:
The shipwreck of the Covenant brings us to the heart of Dr. Williams’ long-term failure as archbishop. He sincerely wanted to keep the Anglican Communion together but believed that he could do this by political compromises that ignored the fundamental truths of the Christian faith. We are back to what Sir Humphrey said twenty-five years ago in “Yes, Prime Minister”-‘the Church of England likes to keep the balance between those who believe in God and those who do not.’ Sir Humphrey knew what he was talking about-in real life, he too was a gay activist.
Alas, Christian truth is not decided by balancing acts or majority votes but by the teaching of divine revelation. As Dr. Williams knows only too well, Arius had the majority of the church on his side, but he lost out to Athanasius and the orthodox because he was wrong and his opponents were prepared to suffer for the truth. That was a long time ago, but the basic principle still holds good. Church councils can vote for whatever they like, but if they are wrong, the people of God will rise up in protest, as the emergence of GAFCON has shown.
It’s good to hear someone other than on the left see the Anglican Covenant for what it is, the worst thing to hit the religion of Cranmer and Laud since the Contract on the Episcopalians. But Bray’s whole piece deserves a read, it’s well written and insightful.
There is one thing, however, that Bray is too optimistic about:
His successor’s first task will be to steady it by tossing the Americans and their ungodly allies overboard, and by setting its course firmly towards the Morning Star that is Christ, who alone can give us light. Whether that will happen only time will tell, but the agenda for the next Archbishop of Canterbury is clear. the spiritual renewal of the church will come at a price, but without it the Anglican Communion is doomed. We must pray that those charged with making the appointment will be aware of this and be prepared to do what is necessary to ensure that there is at least some hope for what is bound to be a turbulent future.
His call to prayer is appropriate but the most likely outcome of the nomination and election process for Archbishop of Canterbury will be a leftie who will ally himself with the Episcopalians and their ilk. I just can’t see the present government allowing otherwise, given its insistence, for example, that same-sex civil marriage be a prerequisite for UK foreign aid. Both the government and the new Archbishop, however, will find that alternatives abound. The Chinese, who are very active in economic aid and activity, don’t care what the Africans do with civil marriage. For their part, if Anglicans everywhere will finally get with the idea that Canterbury is portable, the course will be towards the Light indeed.
-
An American Story for the Fourth of July
Generally speaking I stop this time of year and commemorate an event of which you, the reader of this blog, are the beneficiary (?). On 1 July 1997 I uploaded the pages of my first website, called then The Wave Equation Page for Piling and now vulcanhammer.net. I duly editorialised the tenth anniversary of that here. Two months later the predecessor of this site was launched and I was off in what was then called cyberspace.
But this time I want to put that event together with another holiday, namely the Fourth of July. It’s the time of year when we celebrate all things American. From time to time I’ve mentioned that fact that my family was involved in one business–the Vulcan Iron Works–for 144 years. Since that still covers most of the history of this Republic, I think it’s fair to say that this alone makes it an interesting “American Story”.Since most people outside of the heavy construction industry are unfamiliar with Vulcan equipment, some history is in order. The Vulcan Foundry was founded in Chicago by my great-great-grandfather, Henry Warrington, in 1852, the same year Marshall Fields was started. He kept it up for only 12 years, selling it to other Chicago businessmen during the Civil War. While they had it Vulcan produced its first steam pile driver, a technology first developed in the UK a few years earlier.
Neither of the concerns/people who operated the business did well with it, so in 1881 Henry’s three sons George, William and James bought the company. By the end of the decade they had improved the design of the pile driving equipment to the point where they launched the “Warrington-Vulcan” line of pile drivers.That improvement was the key to the company’s success for the next century. A good example of that is shown at the left: a hammer produced in 1905 still operating in 2008 (and that’s not the only one like it)! Even the History Channel was interested in a product with such a rugged application and simultaneous longevity.
Vulcan and its signature product line (which became pretty much its only product line by World War II) were there for most of the last century’s great construction projects (like the Panama Canal and the Interstate Highway System). It was also there for its two great destruction projects: the two World Wars, where the company’s projects helped to build what the U.S. military needed to win them, people (including the owning family members) to fight and support at home to support all of it.
Below: a war bond billboard in Chicago during World War II.
Major changes were afoot for both the company and the country during the 1960’s and 1970’s. On the one hand, marine contractors took Vulcan’s product offshore for conventional oil platform installation, which pushed Vulcan’s (and everyone else’s) capabilities to the limit in the single greatest adventure the company ever undertook. That came as Vulcan, having been in Chicago for 108 years and celebrated its centennial there, moved the operation to Chattanooga, TN.
But this time in American history was also a challenge for Vulcan. The Luddite 1960’s trashed manufacturing and those who engaged in it. The environmental movement set back all of Vulcan’s markets by setting back construction of both infrastructure onshore and oil exploration offshore. And the growth of regulation had its impact on small business, although not so much with Vulcan as with many others.
By the 1980’s there was need for major restructuring of Vulcan and its business. By that time, however, many of Vulcan’s “stakeholders”: trade union, distribution network, and others–were resistant to such changes. To accumulate many stakeholders with veto power is an occupational hazard of institutions of long life and apparent success, something that bears on our current situation as a nation. Vulcan’s attempt to break out in the early 1990’s had initial success but suffered from overextension, and in 1996 our family divested itself of the company.
Much of the debate in this country today is about what is needful for success, and by extension who is needful to carry out that success. Companies such as Vulcan are pointed to as a “traditional” example of American success, but Vulcan’s story is, in many ways, atypical, especially when compared to what urban legends say today.
To begin with, the ideal of a family business, lovingly passed down from generation to generation, is just that. One big reason Vulcan passed through five generations of my family was the desultory nature of the succession. The first generation sold it after only a short time; it was left to the second to buy it back and set it on its way. Of the three brothers, one was more interested in yachts on Lake Michigan and later government service, and was effectively out of Vulcan by the turn of the last century. Another suffered from poor health and lived in Hawaii and Los Angeles, coming back to Chicago occasionally. The eldest was the most diligent but died in the early 1920’s. But only the brother than went to Washington had a child, who, in the midst of an aviation career, found himself at the helm of a business in Illinois. He eventually moved back, but found being Commodore of the Chicago Yacht Club at least as interesting as the iron works.Another American myth is the Horatio Alger story, underpinned by the fact that many of these upwardly mobile types came from rural poverty. The Warringtons were urbanite businesspeople from the day Henry stepped off the boat from England; he did the same thing in Chicago he did in Manchester, England, albeit with a more booming market and more freedom to pursue other things. Technically educated club denizens from generation to generation, the family was out of touch with much of what Americans associated with success. This came home to roost with Vulcan’s move to Chattanooga. Tennessee was and is certainly a better business climate than the “Chicago Way” but in a region where rural poverty defines the culture the result was an experience that was decidedly mixed.
One place where our family was right in the mainstream of current conservative thought was its belief in our free enterprise system. My grandfather’s speech at our centennial in 1952 is a concise summary of that belief (and a mention of its opposition). But Vulcan was atypical in that much of its output ended up either being sold to the government (civilian and military) or used on public works projects. Vulcan’s attitude to the government was more nuanced that we have now: the government can and certainly should do its part to build up the infrastructure, but it was and is dangerous for same government to have either unfettered control or complete provision for such building.
Finally Vulcan, small as it was, did a great deal of international business in an era when American companies were not strong outside of the home market. Although hammers were exported from the early years of their manufacture, from the 1960’s onward it was routine for Vulcan to export a third of its output, in an era when the country consistently ran balance of trade deficits. That led to expeditions such as our sales to the Chinese in the early 1980’s, and gave our business profile an exotic cast.Today the Vulcan product line, which has outlived the company (and many others) is serviced by Pile Hammer Equipment, for whom I continue to do design work. Planned obsolescence was never in our game plan then or now, which is another of Vulcan’s anomalies.
People wonder why I went to all the trouble putting together the website of my family business’ history. There’s a good business reason for it, and it has helped to keep the product line alive, but one thing I wanted to do is to tell a success story that wouldn’t get told otherwise, and perhaps inspire someone else to do something like it. The thing that bothers me is this: I have no doubt that this inspiration will take place and be acted upon. But that leaves the obvious question: will it happen here? Will we continue to encourage people to take risks and be successful? Or will we, obsessed with creating a safe and perfect environment for ourselves and especially for those who rule us, stifle such innovation and allow our economy–and ultimately our country–to deteriorate?
That’s a question that we need to be asking ourselves as Americans as we face yet another Fourth of July.








