Class CellularAutonome11

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byCellularAutonome11
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
LomnitzAutonome

public class CellularAutonome11
extends javax.swing.JComponent

Provides the static framework for a cellular autonome, comprised of an array of Cell objects

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static Cell11[] allCells
          Array of Cell objects that make up the cellular autonome
static int[] areaFreqHist
           
static int[] areaFreqHist2
           
static int[] areaFreqHistCum
           
static int[] areaFreqHistInterval
           
static double constantStressIncrement
          Magnitude of the constant stress increment
static java.io.FileWriter fwRuptureNumber
          File writer for rupture number and total loading
static int[] initialRuptureSite
           
static int loadingMechanism
          Case integer used to determine loading method
static double loadingStressOutputIncrement
           
static double logConversionFactor
           
static double maxRelaxStressFactor
           
static double maxStrength
          Maximum rupture strength threshold for lattice
static double minStrength
          Minimum rupture strength threshold for lattice
static int neighbourNumber
           
static boolean newRuptures
          Are there new ruptures to propogate?
static double nextOutputLoadingStress
           
static int[] numberOfRupturesFromSite
           
static double percentageNoise
          Percentage noise to be added
static int runningRuptureCount
           
static int runtimeDuration
          Number of timestep iterations
static int time
          Number of times a loading increment has been added.
static int TotalCellNumber
          Total number of cells in cellular autonome
static double totalLoadingStress
          Total stress load added to each cell from driving plate
static int totalNumberOfRuptures
          Total number of ruptures in a timestep
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CellularAutonome11()
           
 
Method Summary
static void countClusterAreas()
           
 double getBeta()
          returns beta
 double getStressIncrement(int loadingMechanism)
           
 void init()
          Initialises the array of cells with their initial values
 void initStreams()
          Initialise data streams
 void paint(java.awt.Graphics g)
          Draws cellular autonome according to some colour specification
 void pauseAutonome()
          Method to pause cellularAutonome
 void printWorldParameters()
          Print the runtime parameters to file
 void propagateStressToNeighboursOf(int n)
           
 double proximityToFailure()
          Method determines the stress increment to be added when it is used to propogate only one rupture
 void resumeAutonome()
          Method to resume running of cellularAutonome after it has been paused
 void saveData()
          Method to save data safely by closing files before exiting program
 void sendDataToDataStream()
           
 void setAsymmetricFactor(double value)
           
 void setBeta(double value)
          Sets beta
 void setFileNameRoot(java.lang.String value)
           
 void setLoadingMechanism(java.lang.String value)
           
 void setMaxStrength(double value)
          sets maximumStrength
 void setMinStrength(double value)
          sets minimumStrength
 void setNeighbourNumber(int value)
           
 void setNx(int value)
          Set cell dimension
 void setPercentageNoise(double value)
           
 void setPeriodicBC(boolean value)
           
 void setRelaxationStressFactor(double value)
           
 void startAutonome()
           
static void writeAreaFreqHist(int TotalCellNumber, int[] areaFreqHist, java.io.FileWriter fw)
           
static void writeAreaFreqHist(int TotalCellNumber, int[] areaFreqHist, int[] areaFreqHist2, java.io.FileWriter fw)
           
static void writeCSE(int binNumber, int[] connectingSpringEnergyBin, double total, java.io.FileWriter fw)
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logConversionFactor

public static final double logConversionFactor

TotalCellNumber

public static int TotalCellNumber
Total number of cells in cellular autonome


runtimeDuration

public static int runtimeDuration
Number of timestep iterations


loadingMechanism

public static int loadingMechanism
Case integer used to determine loading method


neighbourNumber

public static int neighbourNumber

totalNumberOfRuptures

public static int totalNumberOfRuptures
Total number of ruptures in a timestep


runningRuptureCount

public static int runningRuptureCount

time

public static int time
Number of times a loading increment has been added. This is equivalent to the number of ruptures in the time continuous model and equivalent to the number uniform load additions in the time continuous.


totalLoadingStress

public static double totalLoadingStress
Total stress load added to each cell from driving plate


loadingStressOutputIncrement

public static double loadingStressOutputIncrement

nextOutputLoadingStress

public static double nextOutputLoadingStress

allCells

public static Cell11[] allCells
Array of Cell objects that make up the cellular autonome


newRuptures

public static boolean newRuptures
Are there new ruptures to propogate?


fwRuptureNumber

public static java.io.FileWriter fwRuptureNumber
File writer for rupture number and total loading


maxStrength

public static double maxStrength
Maximum rupture strength threshold for lattice


minStrength

public static double minStrength
Minimum rupture strength threshold for lattice


percentageNoise

public static double percentageNoise
Percentage noise to be added


constantStressIncrement

public static double constantStressIncrement
Magnitude of the constant stress increment


maxRelaxStressFactor

public static double maxRelaxStressFactor

areaFreqHist

public static int[] areaFreqHist

areaFreqHist2

public static int[] areaFreqHist2

areaFreqHistInterval

public static int[] areaFreqHistInterval

areaFreqHistCum

public static int[] areaFreqHistCum

initialRuptureSite

public static int[] initialRuptureSite

numberOfRupturesFromSite

public static int[] numberOfRupturesFromSite
Constructor Detail

CellularAutonome11

public CellularAutonome11()
Method Detail

init

public void init()
Initialises the array of cells with their initial values


initStreams

public void initStreams()
Initialise data streams


printWorldParameters

public void printWorldParameters()
Print the runtime parameters to file


propagateStressToNeighboursOf

public void propagateStressToNeighboursOf(int n)

sendDataToDataStream

public void sendDataToDataStream()

proximityToFailure

public double proximityToFailure()
Method determines the stress increment to be added when it is used to propogate only one rupture

Returns:
minimum stress increment required to initiate next rupture

getBeta

public double getBeta()
returns beta

Returns:
beta

setNx

public void setNx(int value)
Set cell dimension

Parameters:
value - Number of cells along an axis

setNeighbourNumber

public void setNeighbourNumber(int value)

setBeta

public void setBeta(double value)
Sets beta

Parameters:
value - Conservation factor

setAsymmetricFactor

public void setAsymmetricFactor(double value)

setPeriodicBC

public void setPeriodicBC(boolean value)

setMaxStrength

public void setMaxStrength(double value)
sets maximumStrength

Parameters:
value - The maximum cell strength value

setMinStrength

public void setMinStrength(double value)
sets minimumStrength

Parameters:
value - The minimum cell strength value

setFileNameRoot

public void setFileNameRoot(java.lang.String value)

setLoadingMechanism

public void setLoadingMechanism(java.lang.String value)

getStressIncrement

public double getStressIncrement(int loadingMechanism)

setPercentageNoise

public void setPercentageNoise(double value)
Parameters:
value -

setRelaxationStressFactor

public void setRelaxationStressFactor(double value)

startAutonome

public void startAutonome()

pauseAutonome

public void pauseAutonome()
Method to pause cellularAutonome


resumeAutonome

public void resumeAutonome()
Method to resume running of cellularAutonome after it has been paused


saveData

public void saveData()
Method to save data safely by closing files before exiting program


writeAreaFreqHist

public static void writeAreaFreqHist(int TotalCellNumber,
                                     int[] areaFreqHist,
                                     java.io.FileWriter fw)

writeAreaFreqHist

public static void writeAreaFreqHist(int TotalCellNumber,
                                     int[] areaFreqHist,
                                     int[] areaFreqHist2,
                                     java.io.FileWriter fw)

writeCSE

public static void writeCSE(int binNumber,
                            int[] connectingSpringEnergyBin,
                            double total,
                            java.io.FileWriter fw)

paint

public void paint(java.awt.Graphics g)
Draws cellular autonome according to some colour specification

Parameters:
g -

countClusterAreas

public static void countClusterAreas()