mesh

package
v0.0.0-...-0f7942d Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct{ N0, N1, E0, E1 int }

type HSTRAT

type HSTRAT struct {
	Nam              string
	Nn, Ne, Nly, Epl int
	MinThick         float64     // minimum thickness
	Nxyz, Vxyz       [][]float64 // node coordinates, velocities
	Exr, Nxr         [][]int     // element-node & node-element cross-reference
	Nh               []float64   // nodal heads
	Hgeo             []Material  // material properties
}

func ReadHSTRAT

func ReadHSTRAT(fp string, prnt bool) (*HSTRAT, error)

func (*HSTRAT) BuildElementalConnectivity

func (h *HSTRAT) BuildElementalConnectivity(cardinalOnly bool) map[int][]int

func (*HSTRAT) TopSlice

func (h *HSTRAT) TopSlice() *Slice

type Material

type Material struct {
	N, Ss, H0 float32
	K         []float32
}

type MeshQuality

type MeshQuality struct {
	Area, MaxAngle, Skewness, AspectRatio float64
	DelaunayFail, IsRight, IsObtuse       bool
}

type Slice

type Slice struct {
	Nodes          [][]float64
	Elements, NExr [][]int
	Name           string
	// contains filtered or unexported fields
}

Slice struct of a finite element mesh

func NewSlice

func NewSlice(nam string, nds [][]float64, els [][]int, prnt bool) *Slice

NewSlice constructs a basic fem mesh

func ReadAlgomesh

func ReadAlgomesh(fp string, prnt bool) (*Slice, error)

ReadAlgomesh imports a Algomesh grids in .ah2 or .ah3

func (*Slice) ElementPerimeter

func (sl *Slice) ElementPerimeter(eid int) [][]float64

func (*Slice) ElementToTriangle

func (sl *Slice) ElementToTriangle(eid int) *mmaths.Triangle

func (*Slice) Extent

func (sl *Slice) Extent() *mmaths.Extent

func (*Slice) GetEdges

func (sl *Slice) GetEdges() []Edge

func (*Slice) LineToElementIDs

func (sl *Slice) LineToElementIDs(x0, y0, x1, y1 float64) []int

func (*Slice) LineToNodeIDs

func (sl *Slice) LineToNodeIDs(x0, y0, x1, y1 float64) []int

func (*Slice) PointToElementID

func (sl *Slice) PointToElementID(x, y float64) int

func (*Slice) Quality

func (sl *Slice) Quality() []MeshQuality

func (*Slice) SaveAs

func (sl *Slice) SaveAs(fp string) error

func (*Slice) SurroundingElements

func (sl *Slice) SurroundingElements(eid, levels int) []int

Jump to

Keyboard shortcuts

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