GithubHelp home page GithubHelp logo

nekmatlab's Introduction

Build Status

NEK5000 utilities for MATLAB

Jacopo Canton and Nicolò Fabbiane (in alphabetical order)
January, 2016

Functions

readnek.m

This function reads binary data from the nek5000 file format

[data,lr1,elmap,time,istep,fields,emode,wdsz,etag,header,status] = readnek(fname)

input

  • fname: name of the file

output

  • data: nek5000 data ordered as {iel,inode,[x|y|(z)|u|v|(w)|p|T|s_i]}
  • lr1: element-size vector [lx1,ly1,lz1]
  • elmap: reading/writing map of the elements in the file
  • time: simulation time
  • istep: simulation step
  • fields: fields saved in the file
  • emode: endian mode 'le' = little-endian, 'be' = big-endian
  • wdsz: single (4) or double (8) precision
  • etag: tag for endian indentification
  • header: header of the file (string)
  • status: status (< 0 something went wrong)

writenek.m

This function writes binary data in the nek5000 new file format

status = writenek(fname,data,lr1,elmap,time,istep,fields,emode,wdsz,etag)

input

  • fname: name of the file
  • data: nek5000 data ordered as {iel,inode,[x|y|(z)|u|v|(w)|p|T|s_i]}
  • lr1: element-size vector [lx1,ly1,lz1]
  • elmap: reading/writing map of the elements in the file
  • time: simulation time
  • istep: simulation step
  • fields: fields saved in the file
  • emode: endian mode 'le' = little-endian, 'be' = big-endian
  • wdsz: single (4) or double (8) precision
  • etag: tag for endian indentification

output

  • status: status (< 0 something went wrong)

reshapenek.m

Reshape data from nekread to a meshgrid

[mesh1,mesh2,...] = reshapenek(data,nelx,nely)

input

  • data: nek5000 data ordered as {iel,inode,[x|y|(z)|u|v|(w)|p|T|s_i]}
  • nelx: number of element in the first direction (second index)
  • nely: number of element in the second direction (first index)

output

  • meshn: meshgrid of the n-th field in data

demeshnek.m

Demesh a meshgrid to data

[data] = reshapenek(mesh,lr1)

input

  • mesh: meshgrid (fields along third index)
  • lr1: element-size vector [lx1,ly1,lz1]

output

  • data: nek5000 data ordered as {iel,inode,[x|y|(z)|u|v|(w)|p|T|s_i]}

This package has been also tested with Octave.

nekmatlab's People

Contributors

nfabbiane avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.