source: issm/trunk/src/m/classes/model/planet.m@ 12706

Last change on this file since 12706 was 12706, checked in by Mathieu Morlighem, 13 years ago

merged trunk-jpl and trunk for revision 12703

File size: 1.2 KB
Line 
1%PLANET class definition
2%
3% Usage:
4% md = planet(varargin)
5
6classdef planet < model
7 properties (SetAccess=public) %Planet fields
8 % {{{
9 %Planet specific fields
10 r=NaN;
11 theta=NaN;
12 phi=NaN;
13 %}}}
14 end
15 methods
16 function md=planetmesh(md,varargin) % {{{
17 %PLANETMESH: build 2d shell mesh
18 %
19 % Usage: md=planetmesh(md,'method','mixed','radius',6378000,'angleresol',1);
20 % md=planetmesh(md,'method','tria','shape','iso','radius',6378000,'refinement',5);
21 %
22
23 %recover options
24 options=pairoptions(varargin{:});
25
26 method=getfieldvalue(options,'method','mixed');
27
28 if strcmpi(method,'mixed'),
29 %recover radius and angleresol:
30 radius=getfieldvalue(options,'radius',6378000); %earth radius as default
31 angleresol=getfieldvalue(options,'angleresol',10); %10 degree resolution
32
33 %call mixed mesh
34 md=planetmixedmesh(md,radius,angleresol);
35 else
36 %recover radius, shape and level of refinmenet
37 radius=getfieldvalue(options,'radius',6378000); %earth radius as default
38 refinement=getfieldvalue(options,'refinement',5); %refine 5 times
39 shape=getfieldvalue(options,'shape','ico');
40
41 %call triangular mesh
42 md=planettrimesh(md,shape,radius,refinement);
43 end
44
45 end
46 % }}}
47 end
48 end
Note: See TracBrowser for help on using the repository browser.