|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjabble.Evolver
jabble.Multigrid
jabble.FullMultigrid
public abstract class FullMultigrid
Adds the linear Multigrid V-Cycle to implement FullMultigrid.
Given Lu=f, where L is a linear differential operator, u the unknown field and f a given field, the V-Cycle algorithm is defined as:
uh = VCycle(uh, h, N, f h, v1, v2):
where:
In the Jabble framework, this class will take care of this algorithm and rely on a first Evolver to implement the Relax for steps 2 and 8, and a second Evolver (possibly the same as the first) for the exact solution at step 1. Therefore, to use an object of this class, one will need to specify:
Other details:
The following is a sample code for a FullMultigrid class that solves the Poisson equation d2phi / dx2 = rho :
public class PoissonCartesianFMG extends FullMultigrid {
// Creates FullMultigrid using PoissonCartesianGS as both the
// relaxationEvolver and the exactSolutionEvolver.
// "phi" is the field to be solved and "rho" is the
// source field.
public PoissonCartesianFMG() {
super(new PoissonCartesianGS(), "phi", "rho");
}
// Fields used while computing residual and correction
Field phi;
// Calculates the L operator from phi
public double l(Point point) {
return laplacianBulk(phi);
}
}
Reference:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jabble.Multigrid |
|---|
Multigrid.VCycle |
| Field Summary |
|---|
| Fields inherited from class jabble.Multigrid |
|---|
f, u, vCycleProlongOperator, vCycleRestrictOperator |
| Fields inherited from class jabble.Evolver |
|---|
constantsMap, dDirs, fieldArrayMap, fieldMap, grid, stopTrigger |
| Constructor Summary | |
|---|---|
FullMultigrid(Evolver evolver,
java.lang.String u,
java.lang.String f)
Creates a new MultiGrid evolver on top of the given evolver. |
|
| Method Summary | |
|---|---|
abstract double |
l(Point point)
|
java.lang.String |
toString()
The String representation of the MultiGrid evolver, which include the toString() of the wrapped evolver. |
protected void |
vCycleProlong(java.util.List<Slice> coarseSlices,
java.util.List<Slice> fineSlices)
|
protected void |
vCycleRestrict(java.util.List<Slice> coarseSlices,
java.util.List<Slice> fineSlices)
|
| Methods inherited from class jabble.Evolver |
|---|
evolve, initializeFieldArray, initializeFieldArray, skipBoundaryPoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FullMultigrid(Evolver evolver,
java.lang.String u,
java.lang.String f)
evolver - this evolver will be used by MultiGrid to actually solve the equations| Method Detail |
|---|
public abstract double l(Point point)
protected void vCycleRestrict(java.util.List<Slice> coarseSlices,
java.util.List<Slice> fineSlices)
vCycleRestrict in class Multigrid
protected void vCycleProlong(java.util.List<Slice> coarseSlices,
java.util.List<Slice> fineSlices)
vCycleProlong in class Multigridpublic java.lang.String toString()
Multigrid
toString in class Multigrid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||