oommf

package
v3.5.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2014 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

package oommf provides the OVF data format as used by OOMMF.

Index

Constants

View Source
const (
	X = 0
	Y = 1
	Z = 2
)
View Source
const (
	OMMF_CONTROL_NUMBER = 1234567.0 // The omf format requires the first encoded number in the binary data section to be this control number
)
View Source
const OVF_CONTROL_NUMBER_4 = 1234567.0 // The omf format requires the first encoded number in the binary data section to be this control number

Variables

This section is empty.

Functions

func MustReadFile

func MustReadFile(fname string) (*data.Slice, data.Meta)

func Read

func Read(in_ io.Reader) (s *data.Slice, meta data.Meta, err error)

Read any OOMMF file, autodetect OVF1/OVF2 format

func ReadFile

func ReadFile(fname string) (*data.Slice, data.Meta, error)

func WriteOVF1

func WriteOVF1(out io.Writer, q *data.Slice, meta data.Meta, dataformat string)

func WriteOVF2

func WriteOVF2(out io.Writer, q *data.Slice, meta data.Meta, dataformat string)

Types

type Info

type Info struct {
	Desc            map[string]interface{}
	NComp           int
	Size            [3]int
	ValueMultiplier float32
	ValueUnit       string
	Format          string // binary or text
	OVF             int
	TotalTime       float64
	StageTime       float64
	SizeofFloat     int // 4/8
	StepSize        [3]float64
	MeshUnit        string
}

omf.Info represents the header part of an omf file. TODO: add Err to return error status Perhaps CheckErr() func

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL