source: trunk/src/set_field_list.m @ 1116

Last change on this file since 1116 was 1107, checked in by g7moreau, 3 years ago

Update Copyright to 2022

File size: 2.2 KB
Line 
1%'set_field_list': defines variables needed for the diff fields(velocity, vort, div...)
2%---------------------------------------------------------------------
3% [FieldList,VecColorList]=set_field_list(UName,VName,CName)
4%
5% OUTPUT:
6%  FieldList: list (cell column) of the fields to propose in the menu FieldName
7%  VecColorList: list (cell column) of the fields to propose in the menu for vector color
8%
9% INPUT:
10%  UName: name of the x vector component
11%  VName: name of the y vector component
12%  CName: name of an additional scalar for color
13%
14% RELATED FUNCTIONS:
15%  varname_generator.m: determines the field names to read in the netcdf
16%  file, depending on the scalar
17
18%=======================================================================
19% Copyright 2008-2022, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
20%   http://www.legi.grenoble-inp.fr
21%   Joel.Sommeria - Joel.Sommeria (A) legi.cnrs.fr
22%
23%     This file is part of the toolbox UVMAT.
24%
25%     UVMAT is free software; you can redistribute it and/or modify
26%     it under the terms of the GNU General Public License as published
27%     by the Free Software Foundation; either version 2 of the license,
28%     or (at your option) any later version.
29%
30%     UVMAT is distributed in the hope that it will be useful,
31%     but WITHOUT ANY WARRANTY; without even the implied warranty of
32%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33%     GNU General Public License (see LICENSE.txt) for more details.
34%=======================================================================
35
36function [FieldList,VecColorList]=set_field_list(UName,VName,CName)
37
38FieldList={['vec(' UName ',' VName ')'];...
39    ['norm(' UName ',' VName ')'];...
40    ['curl(' UName ',' VName ')'];...
41    ['div(' UName ',' VName ')'];...
42    ['strain(' UName ',' VName ')'];...
43    ['DUDX(' UName ',' VName ')'];...
44    ['DUDY(' UName ',' VName ')'];...
45    ['DVDX(' UName ',' VName ')'];...
46    ['DVDY(' UName ',' VName ')'];...
47    UName;...
48    VName};
49VecColorList={['norm(' UName ',' VName ')'];...
50    UName;...
51    VName};...
52if exist('CName','var') && ~isempty(CName)
53    VecColorList=[{CName};VecColorList];
54end
55
56
Note: See TracBrowser for help on using the repository browser.