def

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BarFromDeserialization

func BarFromDeserialization(
	bar *DeserializeBarDTO,
	data *structure.StructureData,
	readerOptions inkio.ReaderOptions,
) *structure.Element

func BarsFromDeserialization

func BarsFromDeserialization(
	deserializedBars []*DeserializeBarDTO,
	data *structure.StructureData,
	readerOptions inkio.ReaderOptions,
) []*structure.Element

BarsFromDeserialization maps the deserialization data transfer objects to the structure elements given the structure data (nodes, sections, materials and loads).

Using the reader options, the bar can be added loads for its own weight.

func DeserializeMaterial

func DeserializeMaterial(definition string) *structure.Material

func DeserializeNode

func DeserializeNode(definition string) *structure.Node

func DeserializeSection

func DeserializeSection(definition string) *structure.Section

func Read

func Read(reader io.Reader, options inkio.ReaderOptions) *structure.Structure

Read Reads the given .inkfem file and tries to parse a structure from the data defined.

The first line in the file should be as follows: 'inkfem vM.m', where 'M' and 'm' are the major and minor version numbers of inkfem used to produce the file or required to compute the structure.

func Write

func Write(structure *structure.Structure, writer io.Writer)

Write writes the given structure to the passed in writer.

Types

type DeserializeBarDTO

type DeserializeBarDTO struct {
	Id           contracts.StrID
	StartNodeId  contracts.StrID
	StartLink    *structure.Constraint
	EndNodeId    contracts.StrID
	EndLink      *structure.Constraint
	MaterialName string
	SectionName  string
}

func DeserializeBar

func DeserializeBar(line string) (*DeserializeBarDTO, int)

DeserializeBar parses a bar from the definition line. The bar is a deserialization data transfer object containing the data needed to create the bar. It references the ids of the nodes and names of the materials and sections.

If the bar has the preprocess format, it also reads the number of nodes of the sliced bar and returns the number as the second argument.

func (*DeserializeBarDTO) Equals

func (bar *DeserializeBarDTO) Equals(other *DeserializeBarDTO) bool

Jump to

Keyboard shortcuts

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