source: issm/trunk-jpl/src/m/classes/bamggeom.js

Last change on this file was 22906, checked in by dlcheng, 7 years ago

BUG (JS): Now setting NULL pointer correctly for emtpy BAMG array arguments. Fixing bamggeom/bamgmesh copy constructor for js.

File size: 1.2 KB
Line 
1//BAMGGEOM class definition
2//
3// Usage:
4// bamggeom(varargin)
5
6function bamggeom(){
7 //methods
8 this.constructor = function(args) {// {{{
9 //BAMGGEOM - constructor for bamggeom object
10 //
11 // Usage:
12 // bamggeom = bamggeom(varargin)
13
14 //initialize list
15 switch (args.length) {
16 case 0:
17 //if no input arguments, create a default object
18 break;
19 case 1:
20 var object = args[0];
21 for (var field in object) {
22 if (object.hasOwnProperty(field)) {
23 this[field] = object[field];
24 }
25 }
26 break;
27 default:
28 throw Error('bamggeom constructor error message: unknown type of constructor call');
29 }
30 }// }}}
31 this.disp= function(){// {{{
32 disp(sprintf('\n%s = \n', 'bamggeom'));
33 disp(this);
34 }// }}}
35
36 //properties
37 // {{{
38 this.Vertices = [];
39 this.Edges = [];
40 this.TangentAtEdges = [];
41 this.Corners = [];
42 this.RequiredVertices = [];
43 this.RequiredEdges = [];
44 this.CrackedEdges = [];
45 this.SubDomains = [];
46
47 this.constructor(arguments);
48 //}}}
49}
Note: See TracBrowser for help on using the repository browser.