Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
BamgOpts Class Reference

#include <BamgOpts.h>

Public Member Functions

 BamgOpts ()
 
 ~BamgOpts ()
 
void Check (void)
 

Data Fields

double anisomax
 
double cutoff
 
double coeff
 
double errg
 
double gradation
 
int Hessiantype
 
int maxnbv
 
double maxsubdiv
 
int Metrictype
 
int nbjacobi
 
int nbsmooth
 
double omega
 
double power
 
int verbose
 
int Crack
 
int KeepVertices
 
int splitcorners
 
double hmin
 
double hmax
 
int hminVerticesSize [2]
 
double * hminVertices
 
int hmaxVerticesSize [2]
 
double * hmaxVertices
 
int hVerticesLength
 
double * hVertices
 
int metricSize [2]
 
double * metric
 
int fieldSize [2]
 
double * field
 
int errSize [2]
 
double * err
 

Detailed Description

Definition at line 8 of file BamgOpts.h.

Constructor & Destructor Documentation

◆ BamgOpts()

BamgOpts::BamgOpts ( )

Definition at line 5 of file BamgOpts.cpp.

5  {/*{{{*/
6 
7  this->anisomax = 0;
8  this->cutoff = 0;
9  this->coeff = 0;
10  this->errg = 0;
11  this->gradation = 0;
12  this->Hessiantype = 0;
13  this->maxnbv = 0;
14  this->maxsubdiv = 0;
15  this->Metrictype = 0;
16  this->nbjacobi = 0;
17  this->nbsmooth = 0;
18  this->omega = 0;
19  this->power = 0;
20  this->verbose = 0;
21 
22  this->Crack = 0;
23  this->KeepVertices = 0;
24  this->splitcorners = 0;
25 
26  this->hmin = 0;
27  this->hmax = 0;
28  this->hminVertices=NULL; this->hminVerticesSize[0]=this->hminVerticesSize[1]=0;
29  this->hmaxVertices=NULL; this->hmaxVerticesSize[0]=this->hmaxVerticesSize[1]=0;
30  this->hVertices=NULL; this->hVerticesLength=0;
31  this->metric=NULL; this->metricSize[0]=this->metricSize[1]=0;
32  this->field=NULL; this->fieldSize[0]=this->fieldSize[1]=0;
33  this->err=NULL; this->errSize[0]=this->errSize[1]=0;
34 
35 }

◆ ~BamgOpts()

BamgOpts::~BamgOpts ( )

Definition at line 37 of file BamgOpts.cpp.

37  {/*{{{*/
38 
39  xDelete<double>(this->hminVertices);
40  xDelete<double>(this->hmaxVertices);
41  xDelete<double>(this->hVertices);
42  xDelete<double>(this->metric);
43  xDelete<double>(this->field);
44  xDelete<double>(this->err);
45 
46 }

Member Function Documentation

◆ Check()

void BamgOpts::Check ( void  )

Definition at line 50 of file BamgOpts.cpp.

50  {/*{{{*/
51 
52  int i;
53 
54  if (this->anisomax<1) _error_("'anisomax' option should be >=1");
55  if (this->coeff==0) _error_("'coeff' should be positive");
56  if (this->errg<0) _error_("'errg' option should be >0");
57  if (this->gradation<1) _error_("'gradation' option should be >=1");
58  if (this->Hessiantype!=0 && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1");
59  if (this->maxnbv<3) _error_("'maxnbv' option should be >3");
60  if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1");
61  if (this->Metrictype!=0 && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2");
62  if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0");
63  if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0");
64 
65  if (this->Crack!=0 && this->Crack!=1) _error_("'Crack' supported options are 0 and 1");
66  if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1");
67 
68  if (this->hmin<=0) _error_("'hmin' option should be >0");
69  if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=" << this->hmin);
70  if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column");
71  if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column");
72  if (this->hVertices && this->hVerticesLength<2) _error_("'hVertices' should be a vector");
73  if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
74  if (this->field){
75  if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size " << 1 << " x " << this->fieldSize[1]);
76  for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");};
77  }
78 
79 }

Field Documentation

◆ anisomax

double BamgOpts::anisomax

Definition at line 13 of file BamgOpts.h.

◆ cutoff

double BamgOpts::cutoff

Definition at line 14 of file BamgOpts.h.

◆ coeff

double BamgOpts::coeff

Definition at line 15 of file BamgOpts.h.

◆ errg

double BamgOpts::errg

Definition at line 16 of file BamgOpts.h.

◆ gradation

double BamgOpts::gradation

Definition at line 17 of file BamgOpts.h.

◆ Hessiantype

int BamgOpts::Hessiantype

Definition at line 18 of file BamgOpts.h.

◆ maxnbv

int BamgOpts::maxnbv

Definition at line 19 of file BamgOpts.h.

◆ maxsubdiv

double BamgOpts::maxsubdiv

Definition at line 20 of file BamgOpts.h.

◆ Metrictype

int BamgOpts::Metrictype

Definition at line 21 of file BamgOpts.h.

◆ nbjacobi

int BamgOpts::nbjacobi

Definition at line 22 of file BamgOpts.h.

◆ nbsmooth

int BamgOpts::nbsmooth

Definition at line 23 of file BamgOpts.h.

◆ omega

double BamgOpts::omega

Definition at line 24 of file BamgOpts.h.

◆ power

double BamgOpts::power

Definition at line 25 of file BamgOpts.h.

◆ verbose

int BamgOpts::verbose

Definition at line 26 of file BamgOpts.h.

◆ Crack

int BamgOpts::Crack

Definition at line 29 of file BamgOpts.h.

◆ KeepVertices

int BamgOpts::KeepVertices

Definition at line 30 of file BamgOpts.h.

◆ splitcorners

int BamgOpts::splitcorners

Definition at line 31 of file BamgOpts.h.

◆ hmin

double BamgOpts::hmin

Definition at line 34 of file BamgOpts.h.

◆ hmax

double BamgOpts::hmax

Definition at line 35 of file BamgOpts.h.

◆ hminVerticesSize

int BamgOpts::hminVerticesSize[2]

Definition at line 36 of file BamgOpts.h.

◆ hminVertices

double* BamgOpts::hminVertices

Definition at line 37 of file BamgOpts.h.

◆ hmaxVerticesSize

int BamgOpts::hmaxVerticesSize[2]

Definition at line 38 of file BamgOpts.h.

◆ hmaxVertices

double* BamgOpts::hmaxVertices

Definition at line 39 of file BamgOpts.h.

◆ hVerticesLength

int BamgOpts::hVerticesLength

Definition at line 40 of file BamgOpts.h.

◆ hVertices

double* BamgOpts::hVertices

Definition at line 41 of file BamgOpts.h.

◆ metricSize

int BamgOpts::metricSize[2]

Definition at line 42 of file BamgOpts.h.

◆ metric

double* BamgOpts::metric

Definition at line 43 of file BamgOpts.h.

◆ fieldSize

int BamgOpts::fieldSize[2]

Definition at line 44 of file BamgOpts.h.

◆ field

double* BamgOpts::field

Definition at line 45 of file BamgOpts.h.

◆ errSize

int BamgOpts::errSize[2]

Definition at line 46 of file BamgOpts.h.

◆ err

double* BamgOpts::err

Definition at line 47 of file BamgOpts.h.


The documentation for this class was generated from the following files:
BamgOpts::cutoff
double cutoff
Definition: BamgOpts.h:14
BamgOpts::power
double power
Definition: BamgOpts.h:25
BamgOpts::err
double * err
Definition: BamgOpts.h:47
BamgOpts::maxsubdiv
double maxsubdiv
Definition: BamgOpts.h:20
BamgOpts::verbose
int verbose
Definition: BamgOpts.h:26
BamgOpts::Crack
int Crack
Definition: BamgOpts.h:29
BamgOpts::field
double * field
Definition: BamgOpts.h:45
BamgOpts::Hessiantype
int Hessiantype
Definition: BamgOpts.h:18
BamgOpts::coeff
double coeff
Definition: BamgOpts.h:15
BamgOpts::nbjacobi
int nbjacobi
Definition: BamgOpts.h:22
BamgOpts::omega
double omega
Definition: BamgOpts.h:24
BamgOpts::metricSize
int metricSize[2]
Definition: BamgOpts.h:42
BamgOpts::hVertices
double * hVertices
Definition: BamgOpts.h:41
BamgOpts::KeepVertices
int KeepVertices
Definition: BamgOpts.h:30
BamgOpts::gradation
double gradation
Definition: BamgOpts.h:17
BamgOpts::nbsmooth
int nbsmooth
Definition: BamgOpts.h:23
BamgOpts::fieldSize
int fieldSize[2]
Definition: BamgOpts.h:44
BamgOpts::hmaxVerticesSize
int hmaxVerticesSize[2]
Definition: BamgOpts.h:38
BamgOpts::hmaxVertices
double * hmaxVertices
Definition: BamgOpts.h:39
BamgOpts::hmax
double hmax
Definition: BamgOpts.h:35
BamgOpts::errSize
int errSize[2]
Definition: BamgOpts.h:46
BamgOpts::splitcorners
int splitcorners
Definition: BamgOpts.h:31
BamgOpts::maxnbv
int maxnbv
Definition: BamgOpts.h:19
BamgOpts::metric
double * metric
Definition: BamgOpts.h:43
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
BamgOpts::hmin
double hmin
Definition: BamgOpts.h:34
BamgOpts::errg
double errg
Definition: BamgOpts.h:16
BamgOpts::hVerticesLength
int hVerticesLength
Definition: BamgOpts.h:40
BamgOpts::anisomax
double anisomax
Definition: BamgOpts.h:13
BamgOpts::Metrictype
int Metrictype
Definition: BamgOpts.h:21
BamgOpts::hminVerticesSize
int hminVerticesSize[2]
Definition: BamgOpts.h:36
BamgOpts::hminVertices
double * hminVertices
Definition: BamgOpts.h:37