Package pulse.io.readers
Class ButcherTableauReader
- java.lang.Object
-
- pulse.io.readers.ButcherTableauReader
-
- All Implemented Interfaces:
AbstractHandler,AbstractReader<ButcherTableau>,Reflexive
public class ButcherTableauReader extends Object implements AbstractReader<ButcherTableau>
Provides a reader class for Butcher tableaux. This is invoked at program start to read the available files in the resource folder (contained in thejar). The coefficients are used by an explicit Runge-Kutta solver.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ButcherTableauReadergetInstance()StringgetSupportedExtension()Retrieves the supported extension of files, which thisAbstractHandleris able to process.ButcherTableauread(File file)Reads the Butcher tableau stored infile.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pulse.io.readers.AbstractHandler
isExtensionSupported
-
-
-
-
Method Detail
-
read
public ButcherTableau read(File file) throws IOException
Reads the Butcher tableau stored infile. The file contents should be arranged as follows: first row contains specific keywords (e.g. FSAL), second and subsequent rows contain the matrix coefficients (the matrix is assumed to be quadratic), so the number of columns should be equal to the number of rows; the three final rows correspond toc,bandb^vectors. Consistency should be maintained between the corresponding dimensions.- Specified by:
readin interfaceAbstractReader<ButcherTableau>- Parameters:
file- a file which has readable content- Returns:
- a
Tobject created by reading all information fromf. - Throws:
IOException
-
getSupportedExtension
public String getSupportedExtension()
Description copied from interface:AbstractHandlerRetrieves the supported extension of files, which thisAbstractHandleris able to process.- Specified by:
getSupportedExtensionin interfaceAbstractHandler- Returns:
- a
String(usually, lower-case) containing the supported extension.
-
getInstance
public static ButcherTableauReader getInstance()
-
-