oommf

package
v3.9.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2016 License: CC-BY-3.0, Freetype, GPL-3.0-or-later Imports: 11 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 OVF_CONTROL_NUMBER_4 = 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_8 = 123456789012345.0

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{}
	Title           string
	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