|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jvx.numeric.PnEnergyMinimizer
Main class to vary a surface to minimize a given energy functional. Minimization runs in a separate thread. For Dirichlet and Area minimization support for hessian and eigenvalues included.
| Field Summary | |
static int |
AREA
|
static int |
CONFORMAL
|
static int |
DIRICHLET
|
static int |
SPRING
|
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS |
| Constructor Summary | |
PnEnergyMinimizer()
|
|
| Method Summary | |
void |
computeEigenvectors()
|
void |
enableUpdateDomain(boolean flag)
Flag whether domain is updated after each CG-minization loop. |
PgElementSet |
getDomain()
|
PnEnergy |
getEnergy()
Get current energy. |
PgElementSet |
getSurface()
|
void |
init()
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances. |
boolean |
isRunning()
Check whether energy minimizer will be stopped. |
boolean |
isStopped()
Check whether energy minimizer is currently NOT running a minimizing thread. |
double |
minimize()
Minimize energy by invoking conjugate gradient method in a loop. |
void |
printEigenvalues()
|
void |
printEigenvectors()
|
void |
printGradient()
|
void |
printHessian()
|
void |
run()
Do energy minimization until m_numLoops are done or until a call of stop(). |
void |
setEnergy(PnEnergy energy)
Set new energy and clear all vector fields. |
void |
setNumLoops(int numLoops)
Set number of calls of conjugate gradient method to be performed during each call to PnEnergyMinimizer#minimize(). |
boolean |
setSurface(PgElementSet domain,
PgElementSet surface)
Set references to domain and image surface. |
void |
setUpdateDomain(boolean flag)
|
void |
showEigenvector(int ind)
|
void |
showGradient()
|
void |
showNone()
|
void |
start()
Start energy minimization in separate thread. |
void |
step()
Move vertices in negative gradient direction a certain amount. |
void |
step(int numSteps)
Move vertices in negative gradient direction a certain amount. |
void |
stop()
Stop energy minimization in separate thread. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DIRICHLET
public static final int AREA
public static final int CONFORMAL
public static final int SPRING
| Constructor Detail |
public PnEnergyMinimizer()
| Method Detail |
public void init()
PsObjectinit in class PsObjectpublic boolean update(java.lang.Object event)
update in class PsObjectjv.object.PsObjectPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public PnEnergy getEnergy()
public void setEnergy(PnEnergy energy)
public void enableUpdateDomain(boolean flag)
public PgElementSet getDomain()
public PgElementSet getSurface()
public boolean setSurface(PgElementSet domain,
PgElementSet surface)
Remark: If the geometries are changed outside this energy minimizer, the user must call setSurface() again to update the energy minimizer. Otherwise, further minimization calls will use the old geometry information.
public void setNumLoops(int numLoops)
This number of loops is independent of the number of iterations used in each single invocation of the CG-method, which depends on the requested accurracy PnEnergyMinimizer#m_cgEps.
minimize()public double minimize()
setNumLoops(int)public void setUpdateDomain(boolean flag)
public void step()
h=0.01. This method is applied
numLoops times.step(int)public void step(int numSteps)
h=0.01. This method is applied
numSteps times.
Method starts a new thread if numSteps>1 which calls step().
step()public void printGradient()
public void showNone()
public void showGradient()
public void printHessian()
public void computeEigenvectors()
public void printEigenvalues()
public void printEigenvectors()
public void showEigenvector(int ind)
public boolean isRunning()
public boolean isStopped()
public void start()
public void stop()
public void run()
m_numLoops are done or until a call of stop().run in interface java.lang.Runnable
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||