[588] | 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:
|
---|
[812] | 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
|
---|
[588] | 8 | %
|
---|
| 9 | % INPUT:
|
---|
[812] | 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
|
---|
[588] | 13 | %
|
---|
[812] | 14 | % RELATED FUNCTIONS:
|
---|
| 15 | % varname_generator.m: determines the field names to read in the netcdf
|
---|
| 16 | % file, depending on the scalar
|
---|
[769] | 17 |
|
---|
[809] | 18 | %=======================================================================
|
---|
[1126] | 19 | % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
|
---|
[809] | 20 | % http://www.legi.grenoble-inp.fr
|
---|
[1127] | 21 | % Joel.Sommeria - Joel.Sommeria (A) univ-grenoble-alpes.fr
|
---|
[809] | 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 |
|
---|
[1162] | 36 | function [FieldList,VecColorList]=set_field_list(UName,VName,CName,WName)
|
---|
| 37 | if exist('WName','var')% 3D civ case
|
---|
| 38 | FieldList={['vec(' UName ',' VName ')'];...
|
---|
| 39 | ['norm(' UName ',' VName ')'];...
|
---|
| 40 | UName;...
|
---|
| 41 | VName;...
|
---|
| 42 | WName};
|
---|
| 43 | VecColorList={['norm(' UName ',' VName ')'];...
|
---|
| 44 | WName;...
|
---|
| 45 | VName};
|
---|
| 46 | else
|
---|
[588] | 47 | FieldList={['vec(' UName ',' VName ')'];...
|
---|
| 48 | ['norm(' UName ',' VName ')'];...
|
---|
| 49 | ['curl(' UName ',' VName ')'];...
|
---|
| 50 | ['div(' UName ',' VName ')'];...
|
---|
| 51 | ['strain(' UName ',' VName ')'];...
|
---|
[1090] | 52 | ['DUDX(' UName ',' VName ')'];...
|
---|
| 53 | ['DUDY(' UName ',' VName ')'];...
|
---|
| 54 | ['DVDX(' UName ',' VName ')'];...
|
---|
| 55 | ['DVDY(' UName ',' VName ')'];...
|
---|
[588] | 56 | UName;...
|
---|
| 57 | VName};
|
---|
| 58 | VecColorList={['norm(' UName ',' VName ')'];...
|
---|
| 59 | UName;...
|
---|
| 60 | VName};...
|
---|
[1162] | 61 | end
|
---|
[769] | 62 | if exist('CName','var') && ~isempty(CName)
|
---|
[588] | 63 | VecColorList=[{CName};VecColorList];
|
---|
[769] | 64 | end
|
---|
[588] | 65 |
|
---|
| 66 |
|
---|