Export Group
ExportDX
WriteDataFile
WriteMPSOrientations
ExportDX
ExportDX
- Write a DX field in DX native format.
Usage
header = ExportDX(fname, mesh, Ndata, Edata)
Interactive Documentation
ExportDX - Write a DX field in DX native format.
USAGE:
header = ExportDX(fname, mesh)
header = ExportDX(fname, mesh, Ndata)
header = ExportDX(fname, mesh, Ndata, Edata)
INPUT:
fname is a string,
the basename of the DX header file, as well as the
basename of the various ASCII output files, and also
the name of the resulting DX field
mesh is a MeshStructure
Ndata is a cell array,
it contains position-dependent data; it has the form
{name1, array1, name2, array2, ...}, where the names
are strings with no spaces and the arrays are real-valued
data arrays; Ndata can be empty.
Edata is a cell array,
it contains connection-dependent data and has the same
form as Ndata
OUTPUT:
header is a cell array of strings,
it contains the DX header file content
NOTES:
* ExportDX writes the DX field to fname.dx, and the field
object is named fname. Each array in Ndata or Edata is
written to a separate file (fname-arayname.dat) and is
added as a component of the DX field.
* Currently, this routine can only handle element types
of 'lines', 'triangles', 'tetrahedra' or 'cubes'.
WriteDataFile
WriteDataFile
- Write data to a file with a text header.
Usage
WriteDataFile(fname, text, data, basefmt, append)
Interactive Documentation
WriteDataFile - Write data to a file with a text header.
USAGE:
WriteDataFile(fname, text, data)
WriteDataFile(fname, text, data, basefmt)
WriteDataFile(fname, text, data, basefmt, append)
INPUT:
fname is a string,
the name of the file
text is a cell array of strings,
the text header to write at the beginning of the file;
it can be empty
data is m x n, (numeric)
the data to write; the data is written as passed,
m rows of n columns each
basefmt is a string, (optional, default = '%25.16e')
the printf-style format to use on each value; if this
argument is left out or is the empty string '', the default
value for reals is used; if the argument is
the string 'integer', the format used is '%10d';
other values are used without change
append is a scalar, (optional, default = 0)
if nonzero, the output file is appended to instead of
overwritten
OUTPUT: none
WriteMPSOrientations
WriteMPSOrientations
- Write orientations in MPS format.
Usage
header = WriteMPSOrientations(filename,orient, hinfo)
Interactive Documentation
WriteMPSOrientations - Write orientations in MPS format.
USAGE:
header = WriteMPSOrientations(filename,orient, hinfo)
INPUT:
filename is a string,
the name of the output file
orient is m x n,
the array of orientations to write
hinfo is a cell array,
it contains header information; options are:
'Weights', array
'Hardnesses', array
'Parameterization', string [required]
'Angles', string ('degrees'|'radians')
OUTPUT:
header is a cell array of strings,
it contains the MPS (material point simulator)
header information; the header and data are
written to the requested file