-
Frederick Gere and Milton Williams: The Winds of God
Century 27269 (1965)

For those of you who survived the 1960’s folk Mass scene, some questions: did you ever wonder how “Kumbayah” became emblematic of people sitting around, holding hands? Or why Michael had to row the boat ashore when technology of the time had outboard motors (as depicted on the right)? Or why, with so much rich music from the black church, we always fell back on “Were You There”? This “folk Mass” (more about the quotes later) may be the answer to some of these questions; it is certainly a pioneering work in the genre.
It originated in the San Francisco bay area, at St. Paul’s Episcopal Church in Burlingame. Frederick Gere was an Episcopal minister who had worked at the University of California at Berkeley during a very turbulent time. It became obvious to him (and many others) that, to reach the generation coming up, more contemporary sounding music was in order, and The Winds of God was his and Milton Williams’, a music professor at the California State College at Hayward, answer.
“Contemporary” is a relative term, however; there are obviously many concessions to traditional Episcopal/Anglican hymnody, not the least of which is the presence of the pipe organ on many pieces. Given the early date of the album, they didn’t have much folk music to work from. The Mass proper is reasonable, and the rest of the work is cobbled together from black spirituals, one piece in Hebrew, the 1940 Hymnal (including my unfavourite hymn, “They Cast Their Nets”), pop songs such as “Blowin’ in the Wind” and of course “Kum Ba Yah”.
In spite of the disparate origins of the music, the production comes off surprisingly well. That’s due to the professional quality of the music direction and the production, including Milton Williams’ excellent operatic voice. The album cover claims that this performance was at Grace Cathedral in San Francisco; the recording is better than most at minimising the echo that creeps into cathedral-type recordings. It’s clear that this work had a strong influence on many organists and choirmasters in the Episcopal Church as the 1960’s lurched along with crises detonated by the likes of Gere’s bishop, James Pike.
One thing that the albums include is a narrative by Gere about what the folk Mass was all about. This is very much a product of the era, although, restricted to one track, it is much less intrusive than his fellow Episcopalian Ian Mitchell or Catholic Sister Germaine, who larded their works with music and explanation of most tracks.
Unfortunately events were moving faster than Gere and Williams had either anticipated or were allowed to follow. Already Peter Scholtes‘ “Missa Bossa Nova” was pushing styles in a more folk/rock direction with his inner city musicians, and fellow Episcopalian Tom Belt would shortly break out of the “high church” mould entirely with God Unlimited. But this is a nice production that, for all of its conservatism and inconsistency, grows on you, as it did for many back in its day.
The songs:
- Who Has Seen the Wind?
- The Symbolism of the Wind
- Michael, Row Your Boat
- Six-Fold Kyries
- Kum Ba Yah
- The Nicene Creed
- They Cast Their Nets
- Ovinu Malkeinu
- He’s Got the Whole World in His Hands
- Sursum Corda
- Sanctus
- The Lord’s Prayer
- Were You There?
- In Christ There is No East or West
- Amen
- Blowin’ in the Wind
For all of our music click here
-
The Importance of Keeping the Riff-Raff Out
Club memberships have been a part of my family tradition since the Gilded Age. Although it isn’t one of our more prestigious memberships, my business membership in Sam’s Club is doubtless one of the more useful. One of the nice perks with such a membership is the ability to get in and get your shopping done before 1000, when they open up the place to the general membership and the check-out lines assume Wal-Mart proportions. When I’m able to take advantage of this, Palm Beacher that I am, I tell my wife that I’m going to Sam’s “before the riff-raff gets there.”
Such sentiments don’t do anything for my Christian humility (such as it is), but they’re instinctive. (For NT students, this is a “Romans 7” moment). Keeping the riff-raff out is Rule #1 for an exclusive community of any kind, and it certainly drove much of Palm Beach’s life when I grew up there. It drove Bethesda-by-the-Sea Episcopal’s Church’s vestry to eject the ladies’ rummage sale from the church grounds. It also nearly derailed Palm Beach getting its beloved Publix.
Today, of course, our elites assure us that they are the product of a “meritocracy”, as opposed to the old “WASP inherited” deal. They also assure us that the world is “flattening” due to social media, so the stratified social structure of days gone by no longer exist.
Such self-congratulation, however is belied by stuff like this:
As I have argued elsewhere, there are two competing models of successful American cities. One encourages a growing population, fosters a middle-class, family-centered lifestyle, and liberally permits new housing. It used to be the norm nationally, and it still predominates in the South and Southwest. The other favors long-term residents, attracts highly productive, work-driven people, focuses on aesthetic amenities, and makes it difficult to build. It prevails on the West Coast, in the Northeast and in picturesque cities such as Boulder, Colorado and Santa Fe, New Mexico. The first model spurs income convergence, the second spurs economic segregation. Both create cities that people find desirable to live in, but they attract different sorts of residents…
Finally, there’s the never-mentioned possibility: that the best-educated, most-affluent, most politically influential Americans like this result. They may wring their hands over inequality, but in everyday life they see segregation as a feature, not a bug. It keeps out fat people with bad taste. Paul Krugman may wax nostalgic about a childhood spent in the suburbs where plumbers and middle managers lived side by side. But I doubt that many of his fervent fans would really want to live there. If so, they might try Texas.
Keeping out fat people with bad taste…now that’s the Palm Beach way! By using the regulatory process to restrict land use, our “flattened” elites have managed to create exclusive enclaves for themselves from which to rule the rest of us, all the while presiding over a widening gap between themselves and the rest of the country.
Palm Beach itself is a good example of this in action. The Bloomberg article noted the high cost of living in élite places, and that of course starts with housing. We sold our Palm Beach house forty years ago next month. A little figuring and research tells me that, even in the current market, the value of the house and land (mostly the latter) has risen about ten times the rate of inflation in the intervening years. Unlike Paul Krugman, we didn’t live down the street from the plumber, but today I couldn’t even live on my street.
To build anything on the island is next to impossible, although it’s certainly possible to replace a home under the right conditions. (One thing that makes that simpler is the fact that many homes in Palm Beach aren’t visible from the street because of the foliage). The island is larded with places on the National Register of Historical Places, including my home church.
With commercial development things are even more complicated. The aforementioned Publix found the only way to rebuild this island institution was to go around the dreaded Architectural Commission (ARCOM) and come to the Town Council to get the approvals it needed. Testa’s Restaurant, a more ancient institution where my grandparents dined, has flirted with financial disaster in the process of attempting to get its property redeveloped. The rent structure of the place has even driven out long-running (55 years) places like Hamburger Heaven.
The result from the island standpoint is that, while locals wring their hands over the problems of redeveloping places like the Royal Poinciana Plaza (where I used to go to Abercrombie & Fitch before they went mass market) more and more retail leaves the island, forcing the residents (especially those who actually live there and not the pied à terre set) to go off the island and mix with the riff raff. It’s dreadful.
Although Palm Beach is an out-sized example of just about everything, exclusive communities, heavily regulated by land use restrictions and populated by people who can manipulate and outlast such an environment for their own benefit, dot our country and house those who make decisions for everyone. Even with the pervasive influence of social media, once you achieve geographic segregation, all other kinds follow.
The thing that bothers me more than anything else about this is that our elites can develop a “keep the riff-raff out” driven agenda and still proclaim the society that results as the most just and fair society in human history, denigrating all that has gone before it. The capacity of human beings for hypocrisy, self-righteousness and blindness to same never ceases to amaze.
And as for those Evangelical Christians on the outside? One of the big problems Evangelicals face is that their whole life view and structure came up in an open structure. That structure is still very much alive but, short of splitting the country up, I think that the centralisation of power and money will continue apace, progressively shrinking it. But I still believe that, with a little paradigm shift, we can adjust. As I pointed out in the About page:
It used to be, for those of us who happen to live in the United States, that exclusivism and snobbery were the kiss of death in an open and egalitarian society. But times have changed. Today we live in a society where the road to the top is well marked educationally and credentially, and becoming more so all of the time. We even put into the highest office someone who can justifiably be characterised as an elitist snob.
However, for a Palm Beacher such as myself, Jesus’ claims of exclusivity were never a put-off. In fact, in a place where exclusive clubs and other élite organisations (including churches like the one pictured here) were a natural part of the landscape, the thought of God himself proclaiming an eternal exclusive club was a major part of the appeal. And having a very well-defined road to joining that club was a natural too.
But the best news of all was this: the membership of this club is open to all who will follow the Master, and he has already paid the dues.
If you’re interested in joining this club, click here for more information
-
It's Always Something with a House of Worship, and That Includes a Synagogue
Temple Emanu-El and the Town of Palm Beach go to the mat on another absurd “code violation”:
Temple Emanu-El must reduce the number of seats in its auditorium by more than half, or obtain Town Council approval for the 542 seats that it has.
In a July 12 code violation notice, the town informed the synagogue that it must cut the auditorium capacity to 245 permanent seats, the number approved by the council in 1979, to comply with the town code.
Town officials say they recently learned the synagogue, at 190 N. County Road, more than doubled its seating capacity during an expansion in the early 1990s, but apparently didn’t obtain council approval for the additional seating.
Christians like to think that they are the only targets of code and zoning attacks. But this is not always the case, and it doesn’t always involve house meetings, either. Temple Emanu-el isn’t a “new kid on the block” by any stretch of the imagination; they were organised in 1963 (their first service was at Bethesda) and have been in their current location since 1974.
When they expanded, they received a building permit at the start and an occupancy certificate at the end. One would like to think that the Town of Palm Beach could afford a building inspector who could tell a 245 seat auditorium from a 542 seat one. So the Town hasn’t exactly been in the dark about this place. But, as Gilda Radner would say, it’s always something…
I trust that Christians will express their support to the Temple in defending their position. And it is my fervent hope that God’s Chosen People, having retained suitable counsel, will let the Town have it on this one.
-
Error Function for an Hermite Polynomial
Our goal is to demonstrate that, for the Hermite polynomial
where
the error function is given by the equation
where
Let us begin by considering a point
where
, i.e., it is not equal to any of the points on which the interpolant was developed. Since our objective is to determine the error between
and
, because by definition the two are the same at the interpolating points
, it would be pointless (sorry!) to use one of the interpolation points for
.
Now we build a polynomial of degree
to describe the error function
. This function would interpolate at all
and additionally
for
. This function yields zero error to itself at
as an interpolating point. However, by comparing this polynomial at
with
, we can establish the degree of error. Let us write this polynomial as
The constant
is intended to make the interpolant precise at
. Let us now state the error of this new interpolant as
Since
is an interpolating point,
. Substituting this into the above and solving for
, we have
For the other interpolating points, we know that
and, since the Hermite polynomial also interpolates at the first derivative,
and finally, obviously,
we can say
and
It’s also possible to say that
From this we can determine that
has at least
zeroes (all of the points
plus the point
) in
. Likewise we can say that
has at least
(all of the points
) zeroes in
.
At this point we observe the following:
…Rolle’s Theorem states that a continuous curve that intersects the
-axis in two distinct points
and
, and has a slope at every point
for which
, must have slope zero at one or more of these latter points. (Tierney, J.A. Calculus and Analytic Geometry. Boston: Allyn and Bacon, 1972, p. 128.)
There is thus at least one zero for each interval; since there are
intervals, we can say from this that
has at least
zeroes. However,
also has
zeroes as an interpolant, so
has a total of
zeroes.
Successive differentiation will yield the following
zeroes
zeroes
zeroes
zero
From this we can conclude that, for the one zero of the final derivative
where
is the value where the zero exists.
At this derivative, from our previous considerations,
It is fair to say that, because of the degree of the polynomial,
The last term could be quite complex to differentiate, but let us
consider the following:where
is a polynomial. Taking the
derivative,
disappears and we are left with
Substituting,
Solving,
At the point
,
,
and nowRecalling
or
we can substitute and achieve our original goal
-
Preventing the Anglican Revolt in the Church of God: The Obvious Rationale Behind Agenda Item #18
As I mentioned earlier, the Church of God will convene its General Assembly next week in Orlando. The agenda is out and posted.
Most church meeting agendas like this are full of arcane items that may be very weighty to those whom they directly impact but of little relevance to everyone else, even for general interest. However, most agendas have at least one item that breaks that mould. This go around we have Agenda Item #18, which means it will be taken up at the bottom of both General Council and General Assembly (for my Anglican and other visitors, going into the details about how that works is a long business which I’ll skip).
The agenda item reads as follows:
10. Responsible Use of Social Media
Christians are exhorted by Scripture to speak the truth in love (Ephesians 4:15), to provide things honest in the sight of all persons (Romans 12:17), and to do all things for the edification of others (Romans 15:2). The use of social media (such as MySpace, Facebook, Twitter, blogs, websites, and so forth) by believers should conform to these and other biblical standards.
Church of God ministers, as examples of believers in speech, life, faith, and purity (1 Timothy 4:12), shall at all times agree:
a. To write and post only under their own name.
b. To not attack fellow ministers or members of the Church of God. One may disagree with others, provided the tone is respectful and does not become a personal attack.
c. To not disclose any sensitive, confidential, or financial information about the church, its ministers, or its members, other than what is publicly available.
d. To not post any material that is defamatory, libellous, threatening, harassing, abusive, or embarrassing to any person or entity.
e. To uphold the doctrine of the Church of God by not writing or posting anything contrary to the accepted doctrine of the Church of God.
Failure to follow these guidelines on the use of social media shall result in the offending minister being subject to discipline for unbecoming ministerial conduct.Let me first make a couple of purely personal observations.
- This doesn’t apply to me because I am not ministerially credentialled in the Church of God or anywhere else. One of these days my church may get its canful of the “Elitist Snob” bloviating the way he does and turn me out, but that’s not what’s being discussed here.
- Although people often have trouble figuring out who is behind this blog, I’ve never gone “anonymous” in what I have to say on the Internet. That’s not because I object to the concept of anonymous presence on the net; there are situations where it is necessary for a variety of reasons. While going that route wasn’t my choice, I can see why others might justifiably do so. (That’s my response to (a)).
With that out of the way, let me put forth why I think this should not be adopted.
I’ve had the experience of working in two church “blogospheres” over the last decade or so: the Anglican/Episcopal one first, and then my church’s own, especially during the “Missional Revolt” in 2008-10. I’ve always contended that the Anglican/Episcopal drama is the most riveting story in contemporary Christianity, and one thing that made it that way was the demonstration of the power of the Internet via websites, blogs and social media.
The Episcopal Church has had a long-term leftward drift punctuated by severe lurches in that direction. In the 1960’s and 1970’s we ended up with the 1979 BCP and the general dilution of orthodox Christian belief. What resulted was a severe bleeding of the membership and scattered Anglo-Catholic secession, but the church’s control of the situation remained intact, setting us up for the next lurch: the elevation of V.G. Robinson to the status of bishop.
This go around was different. Using the Internet, and with the help of the African provinces, Anglicans were able to spread the word that there was an alternative out there to revisionist church. Although the ACNA and the other Anglican bodies that have come up have their issues, that they exist at all in the strength they have–including old Episcopal congregations and dioceses, with or without the property–is a testament to the power of the Internet and the persistent voices that encamped there.
The Church of God’s situation was entirely different in terms of doctrine and the nature of the dispute, but one result was the same: a direct and effective challenge to the leadership of the church. Without the blogs and websites of those who sought changes in the financial–and by extension the general–direction of the church, the changes that were mandated in 2008 and subsequently implemented would have never taken place.
Whether this is a net benefit or deficit is something that only time will tell. There’s no doubt, however, that our leadership would like to prevent a repeat of that. Much of what’s in the item (especially b-d) sounds very nice. But why should this be spelled out only for online speech when much of it has more general application for Christians? In that respect the agenda item is superfluous.
One of these days the ministers and lay people of our church are going to have to “go to the mat” over more than just where the money goes. In many ways this item is like the Anglican Covenant: it looks great up front, but in the future could be used as a club by revisionists who get control of the apparatus.
I trust that our ordained bishops will see the sense in voting down this item and not force the laity to do it for them.
Note on item (e): That’s another item that many of my Anglican friends probably would take heart in. But many Church of God ministers–even conservative ones–are very leery at enacting explicit “doctrinal tests” like this. Their rationale is rooted in the history of modern Pentecost, but the truth is that discussions figuring out what’s orthodox and what’s not often fall to a low level, which would turn explicit adherence clauses like this into a club to be used by the minister with the biggest mouth. (It’s not that much better elsewhere, if you’re wondering). How we’re planning to handle the coming assault by the LGBT community is the question we need to be spending time on. But we’re not.
-
Stability of Back Substitution for Matrix Systems
The objective is to show that back substitution is backward stable. Consider the system
where
is an upper triangular
matrix and
are
column vectors. For a
matrix system, this would look like:
Now let us consider the perturbation matrix
and a computed solution for
A system is backward stable if, on a computer with standard machine arithmetic, the computed solution satisfies the following:
where
which is more concisely expressed as
Let us begin by considering the third row, which purely mathematically solves as follows:
Let us introduce a machine perturbation at
as follows, which results in a computed solution
The problem with this formulation is that the perturbation introduced does not match our definition for backward stability, which results in a formulation such as this:
We must thus transform the perturbation in
to one in
. A Taylor series for the perturbation in
allows us to move the perturbation from the numerator to the denominator in this way:
where
This means that we can rewrite our equations for
as
or
Thus
Now that we have solved for
, we can proceed up a row and solve for
. We start by solving for
as follows:Note that we have three operations in this step:
- Multiplication in the numerator
- Subtraction in the numerator
- Division between the numerator and the denominator
This introduces three points of machine error, accounted for thus:
where, as always,
Using the Taylor series transformation for two out of the three error expressions,
Again,
We can combine the two error expressions in the denominator by considering the fact that
is beyond our considerations, as has been consistently shown. We thus say that
and substituting
where
Equating, as before,
and
Finally we get to the top row. The value for $\hat{x}_{1}$ is given
byWe have the same possibility for machine error as before, except that we have some additional calculations, each with the possibility of inducing error. Let us rewrite the above as follows:
which more clearly shows the order of machine operations. The error points can be inserted thus:
Performing the Taylor series operation and combining
and
, we have
Multiplying
Factoring out in the numerator and applying two more Taylor series transformations, we can say
Combining error terms and eliminating the squared epsilons yields
Noting as before that
We are now able to construct the perturbation matrix thus:
Now we must use this to satisfy the criterion for the backward stability of back substitution:
Let us write a matrix in accordance with this criterion and factoring
out the machine epsilon:We can factor the machine epsilon out because we have consistently demonstrated that all of the epsilons are smaller than the machine epsilon, thus the matrix on the right hand side is greater than the one on the left. The greatest single coefficient of the machine epsilon is 3, which equals to the matrix size
. So this criterion is achieved for any and all of the quotients, and thus the backward stability of back substitution is achieved.
Concerning the extension of this pattern to larger matrices, the number of errors–and thus the value of the coefficients in the normalized matrix we wrote at the end–depends upon the number of calculations and thus points of error. These can be discussed as follows:
- Division: each calculation has one division. The error resulting from this division appears in the main diagonal because the denominator is always the coefficient in the diagonal, thus one error for each diagonal position is a result of the division.
- Multiplication: each non-diagonal term is associated with a multiplication because we are solving for the
associated with the diagonal. So one additional error is added to each non-diagonal element in the upper portion of the matrix for multiplication.
- Subtraction: there are as many subtractions as there are multiplications, but they end up in the error matrix differently. The situation with subtraction is further complicated by that fact that, in multiplying through the subtractive errors in order to get the error expressions into the denominator, the sum of the subtractive error coefficients ends up to be greater than the total number of error expressions entered into the equations. First, because of the multiplying through to get the Taylor series conversions to the denominator, the number of subtractive errors in the main diagonal (and thus associated with the denominator) is
, where
is the row number. For the rest of the matrix, the number of subtractions is
, where
is the column number.
The sum of any of these errors that apply to a given position in the matrix is the total number of errors in that position, and thus the value of that position in the error matrix.
The critical position is
. In that position there is one error for division and
errors for division. The sum of these is always
, and thus the criterion for stability is maintained as the matrix size increased.
-
A Multicultural Body: The Church of God's Greatest Challenge
Now that the Episcopalians have completed their boffo performance in Indianapolis, we can turn to another large church gathering: the Church of God General Assembly in Orlando, which will be warming up this time next week. There are many issues on the agenda, including the church’s favourite parlour game: who will move up in the Executive Committee and who will end up where–if anywhere–in all the appointments.
Behind all of this, however, is in my opinion our church’s greatest challenge in North America: properly integrating all the various people groups into the leadership of our church, which incorporates the issue of the kind of church we need to be. There is the politically correct version of why we should do this, but what I am about to say is not politically correct, but the product of my study of the Scriptures and years of experience both in the business world and in the church.
It’s axiomatic in business (and politics for that matter) that if you have “markets” which have an affinity for the product or service you offer, you cultivate the “markets” and the people therein. If we look at the patterns of church growth in general and Pentecostal churches in particular, we see that non-white groups, be they Hispanic, black (and that in itself is a very diverse group), Asian or what not, have joined our ranks in great numbers and with great enthusiasm. My experience in the church tells me that they tend to be more denominationally loyal than their Scots-Irish counterparts. (In many ways, the “tithe on tithe” controversy is a Scots-Irish volte-face par excellence.) That being the case, it makes sense that we should do what we can to cultivate this kind of growth, and that in the long run means bringing these people into positions of leadership in the church. That’s underscored if you look at the Church of God on a truly international basis.
That isn’t happening, and the reduction in funding for the states/regions and the International Office is only serving as a vehicle to cut their representation further. I believe that our non-white people groups are getting an especially short end of the deal in the process, which is one reason I felt it was time for me to leave two years ago.
One thing that is driving this–beyond the desire of appointments and patronage, which is drive enough–is that the Scots-Irish in general, in and out of the Church of God, have adopted a siege mentality during the reign of the current Occupant of 1600 Pennsylvania Avenue. From a political standpoint, that’s dangerous. The last time that happened, we had the War Between the States, the bloodiest conflict our continent has seen. From an ecclesiastical standpoint, it has the potential of setting our church back at a time when Evangelical Christianity is under enough attack as it is. The survival of meaningful Christianity of any kind in this country depends upon our ability to attract non-white people.
But will we stand in the way? Christian history is, in many ways, a relay race. One group predominates and then gives way to another. There’s no question that the missional accomplishments of Europeans and their cousins on this continent are considerable. But the time has come to pass the baton to those to whom we have ministered in the past but now have come to fullness in their own right. Will we pass it or will we drop it?
It really isn’t our church; it’s God’s church. How we respond is our choice, but don’t be surprised if God finds someone else to carry forth the work he has sent us to do.
-
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.



This is of special relevance to me because, 


