Home > atmlab > gformat > atmdata_scalar.m

atmdata_scalar

PURPOSE ^

ATMDATA_SCALAR Ccreates an atmdata structure with a scalar value

SYNOPSIS ^

function G = atmdata_scalar( value )

DESCRIPTION ^

 ATMDATA_SCALAR   Ccreates an atmdata structure with a scalar value

   This function can be used for either when the atmdata is a true scalar,
   or if the field is constant in all dimensions.

   atmdata_scalar( 0 ) generates
           TYPE: 'atmdata'
           NAME: []
         SOURCE: []
            DIM: 0
           DATA: 0
      DATA_NAME: []
      DATA_UNIT: []

 FORMAT   G = atmdata_empty( [ dim ] )
        
 OUT   G     Created atmlab structure.
 OPT   dim   Dimensionality. Default is 0. Max is 5.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

atmdata_scalar.m

SOURCE CODE ^

0001 % ATMDATA_SCALAR   Ccreates an atmdata structure with a scalar value
0002 %
0003 %   This function can be used for either when the atmdata is a true scalar,
0004 %   or if the field is constant in all dimensions.
0005 %
0006 %   atmdata_scalar( 0 ) generates
0007 %           TYPE: 'atmdata'
0008 %           NAME: []
0009 %         SOURCE: []
0010 %            DIM: 0
0011 %           DATA: 0
0012 %      DATA_NAME: []
0013 %      DATA_UNIT: []
0014 %
0015 % FORMAT   G = atmdata_empty( [ dim ] )
0016 %
0017 % OUT   G     Created atmlab structure.
0018 % OPT   dim   Dimensionality. Default is 0. Max is 5.
0019 
0020 % 2010-01-06   Created by Patrick Eriksson.
0021 
0022 function G = atmdata_scalar( value )
0023 
0024 if atmlab('STRICT_ASSERT'), 
0025   rqre_datatype( value, @istensor0 );
0026 end
0027   
0028 G = atmdata_empty( 0 );
0029 
0030 G.DATA = value;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005