Changeset 18064
- Timestamp:
- 05/26/14 21:40:16 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 92 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/bamg/AdjacentTriangle.cpp
r16233 r18064 13 13 14 14 /*Methods*/ 15 /*FUNCTION AdjacentTriangle::Locked {{{*/ 16 int AdjacentTriangle::Locked() const { 15 int AdjacentTriangle::Locked() const {/*{{{*/ 17 16 return t->AdjEdgeIndex[a] & 4; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION AdjacentTriangle::GetAllFlag_UnSwap {{{*/ 21 int AdjacentTriangle::GetAllFlag_UnSwap() const { 19 int AdjacentTriangle::GetAllFlag_UnSwap() const {/*{{{*/ 22 20 // take all flag except MarkUnSwap 23 21 return t->AdjEdgeIndex[a] & 1012; 24 22 } 25 23 /*}}}*/ 26 /*FUNCTION AdjacentTriangle::SetLock {{{*/ 27 void AdjacentTriangle::SetLock(){ 24 void AdjacentTriangle::SetLock(){/*{{{*/ 28 25 t->SetLocked(a); 29 26 } 30 27 /*}}}*/ 31 /*FUNCTION AdjacentTriangle::Adj {{{*/ 32 AdjacentTriangle AdjacentTriangle::Adj() const { 28 AdjacentTriangle AdjacentTriangle::Adj() const {/*{{{*/ 33 29 return t->Adj(a); 34 30 } 35 31 /*}}}*/ 36 /*FUNCTION AdjacentTriangle::EdgeVertex {{{*/ 37 BamgVertex* AdjacentTriangle::EdgeVertex(const int & i) const { 32 BamgVertex* AdjacentTriangle::EdgeVertex(const int & i) const {/*{{{*/ 38 33 return t->vertices[VerticesOfTriangularEdge[a][i]]; 39 34 } 40 35 /*}}}*/ 41 /*FUNCTION AdjacentTriangle::det {{{*/ 42 Icoor2 & AdjacentTriangle::det() const { 36 Icoor2 & AdjacentTriangle::det() const {/*{{{*/ 43 37 return t->det; 44 38 } 45 39 /*}}}*/ 46 /*FUNCTION AdjacentTriangle::swap {{{*/ 47 int AdjacentTriangle::swap(){ 40 int AdjacentTriangle::swap(){/*{{{*/ 48 41 return t->swap(a); 49 42 } 50 43 /*}}}*/ 51 /*FUNCTION AdjacentTriangle::SetAdj2 {{{*/ 52 void AdjacentTriangle::SetAdj2(const AdjacentTriangle & ta, int l ){ 44 void AdjacentTriangle::SetAdj2(const AdjacentTriangle & ta, int l ){/*{{{*/ 53 45 //set Adjacent Triangle of a triangle 54 46 if(t) { -
issm/trunk-jpl/src/c/bamg/BamgGeom.cpp
r15066 r18064 3 3 4 4 /*Constructors/Destructors*/ 5 /*FUNCTION BamgGeom::BamgGeom(){{{*/ 6 BamgGeom::BamgGeom(){ 5 BamgGeom::BamgGeom(){/*{{{*/ 7 6 8 7 this->VerticesSize[0]=0, this->VerticesSize[1]=0; this->Vertices=NULL; … … 17 16 } 18 17 /*}}}*/ 19 /*FUNCTION BamgGeom::~BamgGeom(){{{*/ 20 BamgGeom::~BamgGeom(){ 18 BamgGeom::~BamgGeom(){/*{{{*/ 21 19 22 20 xDelete<double>(this->Vertices); -
issm/trunk-jpl/src/c/bamg/BamgMesh.cpp
r15066 r18064 3 3 4 4 /*Constructors/Destructors*/ 5 /*FUNCTION BamgMesh::BamgMesh(){{{*/ 6 BamgMesh::BamgMesh(){ 5 BamgMesh::BamgMesh(){/*{{{*/ 7 6 8 7 this->VerticesSize[0]=0, this->VerticesSize[1]=0; this->Vertices=NULL; … … 28 27 } 29 28 /*}}}*/ 30 /*FUNCTION BamgMesh::~BamgMesh(){{{*/ 31 BamgMesh::~BamgMesh(){ 29 BamgMesh::~BamgMesh(){/*{{{*/ 32 30 33 31 xDelete<double>(this->Vertices); -
issm/trunk-jpl/src/c/bamg/BamgOpts.cpp
r16967 r18064 3 3 4 4 /*Constructors/Destructors*/ 5 /*FUNCTION BamgOpts::BamgOpts() {{{*/ 6 BamgOpts::BamgOpts(){ 5 BamgOpts::BamgOpts(){/*{{{*/ 7 6 8 7 this->anisomax=0; … … 39 38 } 40 39 /*}}}*/ 41 /*FUNCTION BamgOpts::~BamgOpts() {{{*/ 42 BamgOpts::~BamgOpts(){ 40 BamgOpts::~BamgOpts(){/*{{{*/ 43 41 44 42 xDelete<double>(this->hminVertices); … … 53 51 54 52 /*Methods*/ 55 /*FUNCTION BamgOpts::Check{{{*/ 56 void BamgOpts::Check(void){ 53 void BamgOpts::Check(void){/*{{{*/ 57 54 58 55 int i; -
issm/trunk-jpl/src/c/bamg/BamgQuadtree.cpp
r17507 r18064 98 98 99 99 /*Constructors/Destructors*/ 100 /*FUNCTION BamgQuadtree::BamgQuadtree(){{{*/ 101 BamgQuadtree::BamgQuadtree(){ 100 BamgQuadtree::BamgQuadtree(){/*{{{*/ 102 101 103 102 /*Number of boxes and vertices*/ … … 113 112 } 114 113 /*}}}*/ 115 /*FUNCTION BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){{{*/ 116 BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){ 114 BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){ /*{{{*/ 117 115 118 116 /*Number of boxes and vertices*/ … … 135 133 } 136 134 /*}}}*/ 137 /*FUNCTION BamgQuadtree::~BamgQuadtree(){{{*/ 138 BamgQuadtree::~BamgQuadtree() { 135 BamgQuadtree::~BamgQuadtree() {/*{{{*/ 139 136 delete boxcontainer; 140 137 root=NULL; … … 143 140 144 141 /*Methods*/ 145 /*FUNCTION BamgQuadtree::Add{{{*/ 146 void BamgQuadtree::Add(BamgVertex &w){ 142 void BamgQuadtree::Add(BamgVertex &w){/*{{{*/ 147 143 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/Add)*/ 148 144 BamgQuadtreeBox** pb=NULL; … … 232 228 } 233 229 /*}}}*/ 234 /*FUNCTION BamgQuadtree::NearestVertex{{{*/ 235 BamgVertex* BamgQuadtree::NearestVertex(Icoor1 i,Icoor1 j) { 230 BamgVertex* BamgQuadtree::NearestVertex(Icoor1 i,Icoor1 j) {/*{{{*/ 236 231 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertex)*/ 237 232 … … 391 386 } 392 387 /*}}}*/ 393 /*FUNCTION BamgQuadtree::NewBamgQuadtreeBox {{{*/ 394 BamgQuadtree::BamgQuadtreeBox* BamgQuadtree::NewBamgQuadtreeBox(void){ 388 BamgQuadtree::BamgQuadtreeBox* BamgQuadtree::NewBamgQuadtreeBox(void){/*{{{*/ 395 389 396 390 /*Output*/ … … 414 408 return newbox; 415 409 }/*}}}*/ 416 /*FUNCTION BamgQuadtree::ToClose {{{*/ 417 BamgVertex* BamgQuadtree::ToClose(BamgVertex & v,double seuil,Icoor1 hx,Icoor1 hy){ 410 BamgVertex* BamgQuadtree::ToClose(BamgVertex & v,double seuil,Icoor1 hx,Icoor1 hy){/*{{{*/ 418 411 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/ToClose)*/ 419 412 -
issm/trunk-jpl/src/c/bamg/BamgVertex.cpp
r17507 r18064 11 11 12 12 /*Methods*/ 13 /*FUNCTION BamgVertex::Echo {{{*/ 14 15 void BamgVertex::Echo(void){ 13 void BamgVertex::Echo(void){/*{{{*/ 16 14 17 15 _printf_("Vertex:\n"); … … 24 22 } 25 23 /*}}}*/ 26 /*FUNCTION BamgVertex::GetReferenceNumber{{{*/ 27 int BamgVertex::GetReferenceNumber() const { 24 int BamgVertex::GetReferenceNumber() const { /*{{{*/ 28 25 return ReferenceNumber; 29 26 } 30 27 /*}}}*/ 31 /*FUNCTION BamgVertex::MetricFromHessian{{{*/ 32 void BamgVertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){ 28 void BamgVertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){/*{{{*/ 33 29 /*Compute Metric from Hessian*/ 34 30 … … 108 104 } 109 105 /*}}}*/ 110 /*FUNCTION BamgVertex::Optim {{{*/ 111 long BamgVertex::Optim(int i,int koption){ 106 long BamgVertex::Optim(int i,int koption){ /*{{{*/ 112 107 long ret=0; 113 108 if ( t && (IndexInTriangle >= 0 ) && (IndexInTriangle <3) ){ … … 121 116 } 122 117 /*}}}*/ 123 /*FUNCTION BamgVertex::Smoothing{{{*/ 124 double BamgVertex::Smoothing(Mesh &Th,const Mesh &BTh,Triangle* &tstart ,double omega){ 118 double BamgVertex::Smoothing(Mesh &Th,const Mesh &BTh,Triangle* &tstart ,double omega){/*{{{*/ 125 119 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Smoothing)*/ 126 120 … … 227 221 228 222 /*Intermediary*/ 229 /*FUNCTION QuadQuality{{{*/ 230 double QuadQuality(const BamgVertex & a,const BamgVertex &b,const BamgVertex &c,const BamgVertex &d) { 223 double QuadQuality(const BamgVertex & a,const BamgVertex &b,const BamgVertex &c,const BamgVertex &d) {/*{{{*/ 231 224 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/QuadQuality)*/ 232 225 -
issm/trunk-jpl/src/c/bamg/CrackedEdge.cpp
r12821 r18064 9 9 10 10 /*Constructors/Destructors*/ 11 /*FUNCTION CrackedEdge() {{{*/ 12 CrackedEdge::CrackedEdge() { 11 CrackedEdge::CrackedEdge() {/*{{{*/ 13 12 a=NULL; 14 13 b=NULL; -
issm/trunk-jpl/src/c/bamg/Curve.cpp
r16231 r18064 10 10 11 11 /*Constructors/Destructors*/ 12 /*FUNCTION Curve::Curve(){{{*/ 13 Curve::Curve(){ 12 Curve::Curve(){/*{{{*/ 14 13 FirstEdge=NULL; 15 14 LastEdge=NULL; … … 20 19 21 20 /*Methods*/ 22 /*FUNCTION Curve::Set {{{*/ 23 void Curve::Set(const Curve & rec,const Geometry & Gh ,Geometry & GhNew){ 21 void Curve::Set(const Curve & rec,const Geometry & Gh ,Geometry & GhNew){/*{{{*/ 24 22 *this = rec; 25 23 FirstEdge = GhNew.edges + Gh.GetId(FirstEdge); -
issm/trunk-jpl/src/c/bamg/Direction.cpp
r16158 r18064 9 9 10 10 /*Constructors/Destructors*/ 11 /*FUNCTION Direction() {{{*/ 12 Direction::Direction(): 11 Direction::Direction():/*{{{*/ 13 12 dir(MaxICoor){ 14 13 15 14 }/*}}}*/ 16 /*FUNCTION Direction(Icoor1 i,Icoor1 j) {{{*/ 17 Direction::Direction(Icoor1 i,Icoor1 j) { 15 Direction::Direction(Icoor1 i,Icoor1 j) {/*{{{*/ 18 16 Icoor2 n2 = 2*(Abs(i)+Abs(j)); 19 17 Icoor2 r = MaxICoor* (Icoor2) i; … … 23 21 24 22 /*Methods*/ 25 /*FUNCTION Direction::direction{{{*/ 26 int Direction::direction(Icoor1 i,Icoor1 j) { 23 int Direction::direction(Icoor1 i,Icoor1 j) {/*{{{*/ 27 24 int r =1; 28 25 if (dir!= MaxICoor) { -
issm/trunk-jpl/src/c/bamg/Edge.cpp
r15104 r18064 14 14 15 15 /*Methods*/ 16 /*FUNCTION Edge::Set {{{*/ 17 void Edge::Set(const Mesh & Th ,long i,Mesh & ThNew){ 16 void Edge::Set(const Mesh & Th ,long i,Mesh & ThNew){ /*{{{*/ 18 17 *this = Th.edges[i]; 19 18 v[0] = ThNew.vertices + Th.GetId(v[0]); … … 25 24 } 26 25 /*}}}*/ 27 /*FUNCTION Edge::Echo {{{*/ 28 void Edge::Echo(void){ 26 void Edge::Echo(void){ /*{{{*/ 29 27 _printf_("Edge:\n"); 30 28 _printf_(" pointers towards two vertices: " << v[0] << " " << v[1] << "\n"); … … 34 32 } 35 33 /*}}}*/ 36 /*FUNCTION Edge::Renumbering{{{*/ 37 void Edge::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){ 34 void Edge::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){/*{{{*/ 38 35 39 36 if (v[0] >=vb && v[0] <ve) v[0] = vb + renu[v[0]-vb]; … … 42 39 } 43 40 /*}}}*/ 44 /*FUNCTION Edge::Intersection{{{*/ 45 int Edge::Intersection(const Edge & e){ 41 int Edge::Intersection(const Edge & e){ /*{{{*/ 46 42 47 43 /*some shecks*/ -
issm/trunk-jpl/src/c/bamg/EigenMetric.cpp
r16237 r18064 10 10 11 11 /*Constructor*/ 12 /*FUNCTION EigenMetric::EigenMetric(const Metric M){{{*/ 13 EigenMetric::EigenMetric(const Metric& M){ 12 EigenMetric::EigenMetric(const Metric& M){/*{{{*/ 14 13 /*From a metric (a11,a21,a22), get eigen values lambda1 and lambda2 and one eigen vector v*/ 15 14 … … 89 88 } 90 89 /*}}}*/ 91 /*FUNCTION EigenMetric::EigenMetric(double r1,double r2,const D2 vp1){{{*/ 92 EigenMetric::EigenMetric(double r1,double r2,const D2& vp1): lambda1(r1),lambda2(r2),v(vp1){ 90 EigenMetric::EigenMetric(double r1,double r2,const D2& vp1): lambda1(r1),lambda2(r2),v(vp1){/*{{{*/ 93 91 94 92 }/*}}}*/ 95 93 96 94 /*Methods*/ 97 /*FUNCTION EigenMetric::Abs{{{*/ 98 void EigenMetric::Abs(){ 95 void EigenMetric::Abs(){/*{{{*/ 99 96 lambda1=bamg::Abs(lambda1),lambda2=bamg::Abs(lambda2); 100 97 }/*}}}*/ 101 /*FUNCTION EigenMetric::Aniso2{{{*/ 102 double EigenMetric::Aniso2() const { 98 double EigenMetric::Aniso2() const { /*{{{*/ 103 99 return lmax()/lmin(); 104 100 }/*}}}*/ 105 /*FUNCTION EigenMetric::Echo {{{*/ 106 void EigenMetric::Echo(void){ 101 void EigenMetric::Echo(void){/*{{{*/ 107 102 108 103 _printf_("EigenMetric:\n"); … … 115 110 } 116 111 /*}}}*/ 117 /*FUNCTION EigenMetric::hmin{{{*/ 118 double EigenMetric::hmin() const { 112 double EigenMetric::hmin() const {/*{{{*/ 119 113 return sqrt(1/bamg::Max3(lambda1,lambda2,1e-30)); 120 114 }/*}}}*/ 121 /*FUNCTION EigenMetric::hmax{{{*/ 122 double EigenMetric::hmax() const { 115 double EigenMetric::hmax() const {/*{{{*/ 123 116 return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30)); 124 117 }/*}}}*/ 125 /*FUNCTION EigenMetric::lmax{{{*/ 126 double EigenMetric::lmax() const { 118 double EigenMetric::lmax() const {/*{{{*/ 127 119 return bamg::Max3(lambda1,lambda2,1e-30); 128 120 }/*}}}*/ 129 /*FUNCTION EigenMetric::lmin{{{*/ 130 double EigenMetric::lmin() const { 121 double EigenMetric::lmin() const {/*{{{*/ 131 122 return bamg::Max(bamg::Min(lambda1,lambda2),1e-30); 132 123 }/*}}}*/ 133 /*FUNCTION EigenMetric::Min{{{*/ 134 void EigenMetric::Min(double a) { 124 void EigenMetric::Min(double a) { /*{{{*/ 135 125 lambda1=bamg::Min(a,lambda1); lambda2=bamg::Min(a,lambda2) ; 136 126 }/*}}}*/ 137 /*FUNCTION EigenMetric::Max{{{*/ 138 void EigenMetric::Max(double a) { 127 void EigenMetric::Max(double a) { /*{{{*/ 139 128 //change eigen values 140 129 lambda1=bamg::Max(a,lambda1); lambda2=bamg::Max(a,lambda2) ; 141 130 }/*}}}*/ 142 /*FUNCTION EigenMetric::Minh{{{*/ 143 void EigenMetric::Minh(double h) { 131 void EigenMetric::Minh(double h) {/*{{{*/ 144 132 Min(1.0/(h*h)); 145 133 }/*}}}*/ 146 /*FUNCTION EigenMetric::Maxh{{{*/ 147 void EigenMetric::Maxh(double h) { 134 void EigenMetric::Maxh(double h) {/*{{{*/ 148 135 //Call Max function 149 136 Max(1.0/(h*h)); 150 137 }/*}}}*/ 151 /*FUNCTION EigenMetric::pow{{{*/ 152 void EigenMetric::pow(double p){ 138 void EigenMetric::pow(double p){/*{{{*/ 153 139 lambda1=::pow(lambda1,p);lambda2=::pow(lambda2,p); 154 140 }/*}}}*/ -
issm/trunk-jpl/src/c/bamg/GeomEdge.cpp
r16231 r18064 15 15 16 16 /*Methods*/ 17 /*FUNCTION GeomEdge::Cracked{{{*/ 18 int GeomEdge::Cracked() const { 17 int GeomEdge::Cracked() const {/*{{{*/ 19 18 return type &1; 20 19 }/*}}}*/ 21 /*FUNCTION GeomEdge::F{{{*/ 22 R2 GeomEdge::F(double theta) const{ 20 R2 GeomEdge::F(double theta) const{/*{{{*/ 23 21 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/F)*/ 24 22 // parametrization of the curve edge … … 62 60 } 63 61 /*}}}*/ 64 /*FUNCTION GeomEdge::Mark{{{*/ 65 int GeomEdge::Mark() const { 62 int GeomEdge::Mark() const {/*{{{*/ 66 63 return type &16; 67 64 }/*}}}*/ 68 /*FUNCTION GeomEdge::R1tg{{{*/ 69 double GeomEdge::R1tg(double theta,R2 & t) const{ 65 double GeomEdge::R1tg(double theta,R2 & t) const{/*{{{*/ 70 66 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/R1tg)*/ 71 67 // 1/R of radius of cuvature … … 138 134 } 139 135 /*}}}*/ 140 /*FUNCTION GeomEdge::Required{{{*/ 141 int GeomEdge::Required() { 136 int GeomEdge::Required() {/*{{{*/ 142 137 return type &64; 143 138 }/*}}}*/ 144 /*FUNCTION GeomEdge::Set {{{*/ 145 void GeomEdge::Set(const GeomEdge & rec,const Geometry & Gh ,Geometry & GhNew){ 139 void GeomEdge::Set(const GeomEdge & rec,const Geometry & Gh ,Geometry & GhNew){ /*{{{*/ 146 140 *this = rec; 147 141 v[0] = GhNew.vertices + Gh.GetId(v[0]); … … 151 145 } 152 146 /*}}}*/ 153 /*FUNCTION GeomEdge::SetCracked{{{*/ 154 void GeomEdge::SetCracked() { 147 void GeomEdge::SetCracked() { /*{{{*/ 155 148 type |= 1;/*=>1st digit to 1*/ 156 149 }/*}}}*/ 157 /*FUNCTION GeomEdge::SetTgA{{{*/ 158 void GeomEdge::SetTgA() { 150 void GeomEdge::SetTgA() { /*{{{*/ 159 151 type |=4; /*=>2d digit to 1*/ 160 152 }/*}}}*/ 161 /*FUNCTION GeomEdge::SetTgB{{{*/ 162 void GeomEdge::SetTgB() { 153 void GeomEdge::SetTgB() { /*{{{*/ 163 154 type |=8; /*=> 3d digit to 1*/ 164 155 }/*}}}*/ 165 /*FUNCTION GeomEdge::SetMark{{{*/ 166 void GeomEdge::SetMark() { 156 void GeomEdge::SetMark() { /*{{{*/ 167 157 type |=16;/*=> 4th digiy to 1*/ 168 158 }/*}}}*/ 169 /*FUNCTION GeomEdge::SetUnMark{{{*/ 170 void GeomEdge::SetUnMark() { 159 void GeomEdge::SetUnMark() { /*{{{*/ 171 160 type &= 1007 /* 1023-16 = 000111110111 => 4th digit to 0*/; 172 161 }/*}}}*/ 173 /*FUNCTION GeomEdge::SetRequired{{{*/ 174 void GeomEdge::SetRequired() { 162 void GeomEdge::SetRequired() { /*{{{*/ 175 163 type |= 64;/*=>6th digit to 1*/ 176 164 }/*}}}*/ 177 /*FUNCTION GeomEdge::TgA{{{*/ 178 int GeomEdge::TgA() const { 165 int GeomEdge::TgA() const {/*{{{*/ 179 166 return type &4; 180 167 }/*}}}*/ 181 /*FUNCTION GeomEdge::TgB{{{*/ 182 int GeomEdge::TgB() const { 168 int GeomEdge::TgB() const {/*{{{*/ 183 169 return type &8; 184 170 }/*}}}*/ -
issm/trunk-jpl/src/c/bamg/GeomSubDomain.cpp
r12821 r18064 12 12 13 13 /*Methods*/ 14 /*FUNCTION GeomSubDomain::Set {{{*/ 15 void GeomSubDomain::Set(const GeomSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew){ 14 void GeomSubDomain::Set(const GeomSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew){/*{{{*/ 16 15 *this = rec; 17 16 edge = Gh.GetId(edge) + GhNew.edges; -
issm/trunk-jpl/src/c/bamg/GeomVertex.cpp
r15067 r18064 13 13 14 14 /*Methods*/ 15 /*FUNCTION GeomVertex::Corner {{{*/ 16 int GeomVertex::Corner() const { 15 int GeomVertex::Corner() const {/*{{{*/ 17 16 return type & 4; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION GeomVertex::Required {{{*/ 21 int GeomVertex::Required()const { 19 int GeomVertex::Required()const {/*{{{*/ 22 20 // a corner is required 23 21 return type & 6; 24 22 } 25 23 /*}}}*/ 26 /*FUNCTION GeomVertex::SetCorner {{{*/ 27 void GeomVertex::SetCorner(){ 24 void GeomVertex::SetCorner(){/*{{{*/ 28 25 type |= 4; 29 26 } 30 27 /*}}}*/ 31 /*FUNCTION GeomVertex::SetRequired {{{*/ 32 void GeomVertex::SetRequired(){ 28 void GeomVertex::SetRequired(){/*{{{*/ 33 29 type |= 2; 34 30 } -
issm/trunk-jpl/src/c/bamg/Geometry.cpp
r17507 r18064 12 12 13 13 /*Constructors/Destructors*/ 14 /*FUNCTION Geometry::Geometry(){{{*/ 15 Geometry::Geometry(){ 14 Geometry::Geometry(){/*{{{*/ 16 15 Init(); 17 16 } 18 17 /*}}}*/ 19 /*FUNCTION Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){{{*/ 20 Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){ 18 Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){/*{{{*/ 21 19 Init(); 22 20 ReadGeometry(bamggeom,bamgopts); … … 24 22 } 25 23 /*}}}*/ 26 /*FUNCTION Geometry::Geometry(const Geometry & Gh) (COPY operator){{{*/ 27 Geometry::Geometry(const Geometry & Gh) { 24 Geometry::Geometry(const Geometry & Gh) {/*{{{*/ 28 25 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/Geometry)*/ 29 26 … … 44 41 } 45 42 /*}}}*/ 46 /*FUNCTION Geometry::~Geometry(){{{*/ 47 Geometry::~Geometry() { 43 Geometry::~Geometry() {/*{{{*/ 48 44 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/ 49 45 if(NbRef>0){ _printf_("Trying to delete geometry and NbRef>0, probably due to an error"); return;} … … 58 54 59 55 /*IO*/ 60 /*FUNCTION Geometry::ReadGeometry{{{*/ 61 void Geometry::ReadGeometry(BamgGeom* bamggeom,BamgOpts* bamgopts){ 56 void Geometry::ReadGeometry(BamgGeom* bamggeom,BamgOpts* bamgopts){/*{{{*/ 62 57 63 58 int verbose; … … 277 272 } 278 273 /*}}}*/ 279 /*FUNCTION Geometry::WriteGeometry{{{*/ 280 void Geometry::WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts){ 274 void Geometry::WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts){/*{{{*/ 281 275 282 276 int verbose; … … 394 388 395 389 /*Methods*/ 396 /*FUNCTION Geometry::Echo {{{*/ 397 void Geometry::Echo(void){ 390 void Geometry::Echo(void){/*{{{*/ 398 391 399 392 _printf_("Geometry:\n"); … … 415 408 } 416 409 /*}}}*/ 417 /*FUNCTION Geometry::Init{{{*/ 418 void Geometry::Init(void){ 410 void Geometry::Init(void){/*{{{*/ 419 411 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/EmptyGeometry)*/ 420 412 … … 432 424 } 433 425 /*}}}*/ 434 /*FUNCTION Geometry::MinimalHmin{{{*/ 435 double Geometry::MinimalHmin() { 426 double Geometry::MinimalHmin() {/*{{{*/ 436 427 /* coeffIcoor = (2^30-1)/D 437 428 * We cannot go beyond hmin = D/2^30 because of the quadtree … … 439 430 return 2.0/coefIcoor; 440 431 }/*}}}*/ 441 /*FUNCTION Geometry::MaximalHmax{{{*/ 442 double Geometry::MaximalHmax() { 432 double Geometry::MaximalHmax() {/*{{{*/ 443 433 return Max(pmax.x-pmin.x,pmax.y-pmin.y); 444 434 }/*}}}*/ 445 /*FUNCTION Geometry::GetId(const GeomVertex &t){{{*/ 446 long Geometry::GetId(const GeomVertex & t) const { 435 long Geometry::GetId(const GeomVertex & t) const {/*{{{*/ 447 436 return &t - vertices; 448 437 }/*}}}*/ 449 /*FUNCTION Geometry::GetId(const GeomVertex * t){{{*/ 450 long Geometry::GetId(const GeomVertex * t) const { 438 long Geometry::GetId(const GeomVertex * t) const {/*{{{*/ 451 439 return t - vertices; 452 440 }/*}}}*/ 453 /*FUNCTION Geometry::GetId(const GeomEdge & t){{{*/ 454 long Geometry::GetId(const GeomEdge & t) const { 441 long Geometry::GetId(const GeomEdge & t) const {/*{{{*/ 455 442 return &t - edges; 456 443 }/*}}}*/ 457 /*FUNCTION Geometry::GetId(const GeomEdge * t){{{*/ 458 long Geometry::GetId(const GeomEdge * t) const { 444 long Geometry::GetId(const GeomEdge * t) const {/*{{{*/ 459 445 return t - edges; 460 446 }/*}}}*/ 461 /*FUNCTION Geometry::GetId(const Curve * c){{{*/ 462 long Geometry::GetId(const Curve * c) const { 447 long Geometry::GetId(const Curve * c) const {/*{{{*/ 463 448 return c - curves; 464 449 }/*}}}*/ 465 /*FUNCTION Geometry::PostRead{{{*/ 466 void Geometry::PostRead(){ 450 void Geometry::PostRead(){/*{{{*/ 467 451 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/AfterRead)*/ 468 452 … … 785 769 } 786 770 /*}}}*/ 787 /*FUNCTION Geometry::ProjectOnCurve {{{*/ 788 GeomEdge* Geometry::ProjectOnCurve(const Edge &e,double s,BamgVertex &V,VertexOnGeom &GV) const { 771 GeomEdge* Geometry::ProjectOnCurve(const Edge &e,double s,BamgVertex &V,VertexOnGeom &GV) const {/*{{{*/ 789 772 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/ProjectOnCurve)*/ 790 773 /*Add a vertex on an existing geometrical edge according to the metrics of the two vertices constituting the edge*/ … … 918 901 } 919 902 /*}}}*/ 920 /*FUNCTION Geometry::R2ToI2{{{*/ 921 I2 Geometry::R2ToI2(const R2 & P) const { 903 I2 Geometry::R2ToI2(const R2 & P) const {/*{{{*/ 922 904 /*coefIcoor is the coefficient used for integer coordinates: 923 905 * (x-pmin.x) … … 931 913 return I2( (Icoor1) (coefIcoor*(P.x-pmin.x)) ,(Icoor1) (coefIcoor*(P.y-pmin.y)) ); 932 914 }/*}}}*/ 933 /*FUNCTION Geometry::UnMarkEdges{{{*/ 934 void Geometry::UnMarkEdges() { 915 void Geometry::UnMarkEdges() {/*{{{*/ 935 916 for (int i=0;i<nbe;i++) edges[i].SetUnMark(); 936 917 }/*}}}*/ -
issm/trunk-jpl/src/c/bamg/ListofIntersectionTriangles.cpp
r17507 r18064 11 11 12 12 /*Constructors Destructors*/ 13 /*FUNCTION ListofIntersectionTriangles::ListofIntersectionTriangles{{{*/ 14 ListofIntersectionTriangles::ListofIntersectionTriangles(int n,int m) 13 ListofIntersectionTriangles::ListofIntersectionTriangles(int n,int m)/*{{{*/ 15 14 : MaxSize(n), Size(0), len(-1),state(-1),lIntTria(new IntersectionTriangles[n]) , 16 15 NbSeg(0), MaxNbSeg(m), lSegsI(new SegInterpolation[m]){ 17 16 } 18 17 /*}}}*/ 19 /*FUNCTION ListofIntersectionTriangles::~ListofIntersectionTriangles{{{*/ 20 ListofIntersectionTriangles::~ListofIntersectionTriangles(){ 18 ListofIntersectionTriangles::~ListofIntersectionTriangles(){/*{{{*/ 21 19 if (lIntTria) delete [] lIntTria,lIntTria=0; 22 20 if (lSegsI) delete [] lSegsI,lSegsI=0; … … 25 23 26 24 /*Methods*/ 27 /*FUNCTION ListofIntersectionTriangles::Init{{{*/ 28 void ListofIntersectionTriangles::Init(void){ 25 void ListofIntersectionTriangles::Init(void){/*{{{*/ 29 26 state=0; 30 27 len=0; … … 32 29 } 33 30 /*}}}*/ 34 /*FUNCTION ListofIntersectionTriangles::Length{{{*/ 35 double ListofIntersectionTriangles::Length(){ 31 double ListofIntersectionTriangles::Length(){/*{{{*/ 36 32 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Length)*/ 37 33 … … 79 75 } 80 76 /*}}}*/ 81 /*FUNCTION ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) {{{*/ 82 int ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) { 77 int ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) { /*{{{*/ 83 78 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewItem)*/ 84 79 … … 107 102 } 108 103 /*}}}*/ 109 /*FUNCTION ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm){{{*/ 110 int ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm) { 104 int ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm) {/*{{{*/ 111 105 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewItem)*/ 112 106 … … 123 117 } 124 118 /*}}}*/ 125 /*FUNCTION ListofIntersectionTriangles::NewPoints{{{*/ 126 long ListofIntersectionTriangles::NewPoints(BamgVertex* vertices,long &nbv,long maxnbv){ 119 long ListofIntersectionTriangles::NewPoints(BamgVertex* vertices,long &nbv,long maxnbv){/*{{{*/ 127 120 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewPoints)*/ 128 121 … … 180 173 } 181 174 /*}}}*/ 182 /*FUNCTION ListofIntersectionTriangles::ReShape{{{*/ 183 void ListofIntersectionTriangles::ReShape(){ 175 void ListofIntersectionTriangles::ReShape(){ /*{{{*/ 184 176 185 177 int newsize = MaxSize*2; … … 196 188 } 197 189 /*}}}*/ 198 /*FUNCTION ListofIntersectionTriangles::SplitEdge{{{*/ 199 void ListofIntersectionTriangles::SplitEdge(const Mesh & Bh, const R2 &A,const R2 &B,int nbegin) { 190 void ListofIntersectionTriangles::SplitEdge(const Mesh & Bh, const R2 &A,const R2 &B,int nbegin) {/*{{{*/ 200 191 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ListofIntersectionTriangles)*/ 201 192 -
issm/trunk-jpl/src/c/bamg/Mesh.cpp
r17507 r18064 13 13 14 14 /*Constructors/Destructors*/ 15 /*FUNCTION Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts){{{*/ 16 Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts):Gh(*(new Geometry())),BTh(*this){ 15 Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts):Gh(*(new Geometry())),BTh(*this){ /*{{{*/ 17 16 18 17 /*Initialize fields*/ … … 43 42 } 44 43 /*}}}*/ 45 /*FUNCTION Mesh::Mesh(int* index,double* x,double* y,int nods,int nels){{{*/ 46 Mesh::Mesh(int* index,double* x,double* y,int nods,int nels):Gh(*(new Geometry())),BTh(*this){ 44 Mesh::Mesh(int* index,double* x,double* y,int nods,int nels):Gh(*(new Geometry())),BTh(*this){/*{{{*/ 47 45 48 46 Init(0); … … 52 50 } 53 51 /*}}}*/ 54 /*FUNCTION Mesh::Mesh(double* x,double* y,int nods){{{*/ 55 Mesh::Mesh(double* x,double* y,int nods):Gh(*(new Geometry())),BTh(*this){ 52 Mesh::Mesh(double* x,double* y,int nods):Gh(*(new Geometry())),BTh(*this){/*{{{*/ 56 53 Triangulate(x,y,nods); 57 54 } 58 55 /*}}}*/ 59 /*FUNCTION Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb){{{*/ 60 Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb,BamgOpts* bamgopts) : Gh(*(new Geometry())), BTh(*this) { 56 Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb,BamgOpts* bamgopts) : Gh(*(new Geometry())), BTh(*this) {/*{{{*/ 61 57 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/ 62 58 … … 156 152 } 157 153 /*}}}*/ 158 /*FUNCTION Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in) COPY{{{*/ 159 Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in) 154 Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in)/*{{{*/ 160 155 : Gh(*(pGh?pGh:&Th.Gh)), BTh(*(pBth?pBth:this)) { 161 156 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/ … … 219 214 } 220 215 /*}}}*/ 221 /*FUNCTION Mesh::Mesh(long maxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices){{{*/ 222 Mesh::Mesh(long imaxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices) :Gh(BT.Gh),BTh(BT) { 216 Mesh::Mesh(long imaxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices) :Gh(BT.Gh),BTh(BT) {/*{{{*/ 223 217 this->Init(imaxnbv); 224 218 TriangulateFromGeom1(bamgopts,keepBackVertices); 225 219 } 226 220 /*}}}*/ 227 /*FUNCTION Mesh::Mesh(long maxnbv,Geometry & G,BamgOpts* bamgopts){{{*/ 228 Mesh::Mesh(long imaxnbv,Geometry & G,BamgOpts* bamgopts):Gh(G),BTh(*this){ 221 Mesh::Mesh(long imaxnbv,Geometry & G,BamgOpts* bamgopts):Gh(G),BTh(*this){/*{{{*/ 229 222 Init(imaxnbv); 230 223 TriangulateFromGeom0(bamgopts); 231 224 } 232 225 /*}}}*/ 233 /*FUNCTION Mesh::~Mesh(){{{*/ 234 Mesh::~Mesh() { 226 Mesh::~Mesh() {/*{{{*/ 235 227 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/ 236 228 … … 259 251 260 252 /*IO*/ 261 /*FUNCTION Mesh::ReadMesh(int* index,double* x,double* y,int nods,int nels){{{*/ 262 void Mesh::ReadMesh(int* index,double* x,double* y,int nods,int nels){ 253 void Mesh::ReadMesh(int* index,double* x,double* y,int nods,int nels){/*{{{*/ 263 254 264 255 long i1,i2,i3; … … 322 313 } 323 314 /*}}}*/ 324 /*FUNCTION Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){{{*/ 325 void Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){ 315 void Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){/*{{{*/ 326 316 327 317 int verbose; … … 525 515 } 526 516 /*}}}*/ 527 /*FUNCTION Mesh::WriteMesh {{{*/ 528 void Mesh::WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts){ 517 void Mesh::WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts){/*{{{*/ 529 518 530 519 /*Intermediary*/ … … 952 941 } 953 942 /*}}}*/ 954 /*FUNCTION Mesh::ReadMetric{{{*/ 955 void Mesh::ReadMetric(const BamgOpts* bamgopts) { 943 void Mesh::ReadMetric(const BamgOpts* bamgopts) {/*{{{*/ 956 944 957 945 /*Intermediary*/ … … 990 978 } 991 979 /*}}}*/ 992 /*FUNCTION Mesh::WriteMetric{{{*/ 993 void Mesh::WriteMetric(BamgOpts* bamgopts) { 980 void Mesh::WriteMetric(BamgOpts* bamgopts) {/*{{{*/ 994 981 int i; 995 982 xDelete<double>(bamgopts->metric); … … 1002 989 } 1003 990 /*}}}*/ 1004 /*FUNCTION Mesh::WriteIndex{{{*/ 1005 void Mesh::WriteIndex(int** pindex,int* pnels){ 991 void Mesh::WriteIndex(int** pindex,int* pnels){/*{{{*/ 1006 992 1007 993 /*Intermediary*/ … … 1042 1028 1043 1029 /*Methods*/ 1044 /*FUNCTION Mesh::AddGeometryMetric{{{*/ 1045 void Mesh::AddGeometryMetric(BamgOpts* bamgopts){ 1030 void Mesh::AddGeometryMetric(BamgOpts* bamgopts){/*{{{*/ 1046 1031 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectGeomMetric)*/ 1047 1032 … … 1094 1079 } 1095 1080 /*}}}*/ 1096 /*FUNCTION Mesh::AddMetric{{{*/ 1097 void Mesh::AddMetric(BamgOpts* bamgopts){ 1081 void Mesh::AddMetric(BamgOpts* bamgopts){/*{{{*/ 1098 1082 // Hessiantype = 0 => H is computed using double L2 projection 1099 1083 // Hessiantype = 1 => H is computed with green formula … … 1113 1097 } 1114 1098 /*}}}*/ 1115 /*FUNCTION Mesh::AddVertex{{{*/ 1116 void Mesh::AddVertex( BamgVertex &s,Triangle* t, Icoor2* det3) { 1099 void Mesh::AddVertex( BamgVertex &s,Triangle* t, Icoor2* det3) {/*{{{*/ 1117 1100 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Add)*/ 1118 1101 // ------------------------------- … … 1249 1232 } 1250 1233 /*}}}*/ 1251 /*FUNCTION Mesh::BoundAnisotropy{{{*/ 1252 void Mesh::BoundAnisotropy(double anisomax,double hminaniso) { 1234 void Mesh::BoundAnisotropy(double anisomax,double hminaniso) {/*{{{*/ 1253 1235 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/BoundAnisotropy)*/ 1254 1236 … … 1289 1271 } 1290 1272 /*}}}*/ 1291 /*FUNCTION Mesh::BuildGeometryFromMesh{{{*/ 1292 void Mesh::BuildGeometryFromMesh(BamgOpts* bamgopts){ 1273 void Mesh::BuildGeometryFromMesh(BamgOpts* bamgopts){/*{{{*/ 1293 1274 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/ConsGeometry)*/ 1294 1275 … … 1739 1720 } 1740 1721 /*}}}*/ 1741 /*FUNCTION Mesh::BuildMetric0 (double L2 projection){{{*/ 1742 void Mesh::BuildMetric0(BamgOpts* bamgopts){ 1722 void Mesh::BuildMetric0(BamgOpts* bamgopts){/*{{{*/ 1743 1723 1744 1724 /*Options*/ … … 1944 1924 } 1945 1925 /*}}}*/ 1946 /*FUNCTION Mesh::BuildMetric1 (Green formula){{{*/ 1947 void Mesh::BuildMetric1(BamgOpts* bamgopts){ 1926 void Mesh::BuildMetric1(BamgOpts* bamgopts){/*{{{*/ 1948 1927 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectConsMetric)*/ 1949 1928 … … 2237 2216 } 2238 2217 /*}}}*/ 2239 /*FUNCTION Mesh::CrackMesh{{{*/ 2240 void Mesh::CrackMesh(BamgOpts* bamgopts) { 2218 void Mesh::CrackMesh(BamgOpts* bamgopts) {/*{{{*/ 2241 2219 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/CrackMesh)*/ 2242 2220 … … 2385 2363 } 2386 2364 /*}}}*/ 2387 /*FUNCTION Mesh::Echo{{{*/ 2388 void Mesh::Echo(void) { 2365 void Mesh::Echo(void) {/*{{{*/ 2389 2366 2390 2367 int i; … … 2409 2386 } 2410 2387 /*}}}*/ 2411 /*FUNCTION Mesh::ForceBoundary{{{*/ 2412 void Mesh::ForceBoundary() { 2413 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceBoundary)*/ 2414 2415 long int verbose=2; 2416 int k=0; 2417 int nbfe=0,nbswp=0,Nbswap=0; 2418 2419 //display 2420 if (verbose > 2) _printf_(" ForceBoundary nb of edge: " << nbe << "\n"); 2421 2422 //check that there is no triangle with 0 determinant 2423 for (int t = 0; t < nbt; t++){ 2424 if (!triangles[t].det) k++; 2425 } 2426 if (k!=0) { 2427 _error_("there is " << k << " triangles of mes = 0"); 2428 } 2429 2430 //Force Edges 2431 AdjacentTriangle ta(0,0); 2432 for (int i = 0; i < nbe; i++){ 2433 2434 //Force edge i 2435 nbswp = ForceEdge(edges[i][0],edges[i][1],ta); 2436 if (nbswp<0) k++; 2437 else Nbswap += nbswp; 2438 2439 if (nbswp) nbfe++; 2440 if ( nbswp < 0 && k < 5){ 2441 _error_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1])); 2442 } 2443 } 2444 2445 if (k!=0) { 2446 _error_("There are " << k << " lost edges, the boundary might be crossing"); 2447 } 2448 for (int j=0;j<nbv;j++){ 2449 Nbswap += vertices[j].Optim(1,0); 2450 } 2451 if (verbose > 3) _printf_(" number of inforced edge = " << nbfe << ", number of swap= " << Nbswap << "\n"); 2452 } 2453 /*}}}*/ 2454 /*FUNCTION Mesh::FindSubDomain{{{*/ 2455 void Mesh::FindSubDomain(int OutSide) { 2388 void Mesh::ForceBoundary() {/*{{{*/ 2389 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceBoundary)*/ 2390 2391 long int verbose=2; 2392 int k=0; 2393 int nbfe=0,nbswp=0,Nbswap=0; 2394 2395 //display 2396 if (verbose > 2) _printf_(" ForceBoundary nb of edge: " << nbe << "\n"); 2397 2398 //check that there is no triangle with 0 determinant 2399 for (int t = 0; t < nbt; t++){ 2400 if (!triangles[t].det) k++; 2401 } 2402 if (k!=0) { 2403 _error_("there is " << k << " triangles of mes = 0"); 2404 } 2405 2406 //Force Edges 2407 AdjacentTriangle ta(0,0); 2408 for (int i = 0; i < nbe; i++){ 2409 2410 //Force edge i 2411 nbswp = ForceEdge(edges[i][0],edges[i][1],ta); 2412 if (nbswp<0) k++; 2413 else Nbswap += nbswp; 2414 2415 if (nbswp) nbfe++; 2416 if ( nbswp < 0 && k < 5){ 2417 _error_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1])); 2418 } 2419 } 2420 2421 if (k!=0) { 2422 _error_("There are " << k << " lost edges, the boundary might be crossing"); 2423 } 2424 for (int j=0;j<nbv;j++){ 2425 Nbswap += vertices[j].Optim(1,0); 2426 } 2427 if (verbose > 3) _printf_(" number of inforced edge = " << nbfe << ", number of swap= " << Nbswap << "\n"); 2428 } 2429 /*}}}*/ 2430 void Mesh::FindSubDomain(int OutSide) {/*{{{*/ 2456 2431 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindSubDomain)*/ 2457 2432 … … 2695 2670 } 2696 2671 /*}}}*/ 2697 /*FUNCTION Mesh::GetId(const Triangle & t) const{{{*/ 2698 long Mesh::GetId(const Triangle & t) const { 2672 long Mesh::GetId(const Triangle & t) const { /*{{{*/ 2699 2673 return &t - triangles; 2700 2674 } 2701 2675 /*}}}*/ 2702 /*FUNCTION Mesh::GetId(const Triangle * t) const{{{*/ 2703 long Mesh::GetId(const Triangle * t) const { 2676 long Mesh::GetId(const Triangle * t) const { /*{{{*/ 2704 2677 return t - triangles; 2705 2678 } 2706 2679 /*}}}*/ 2707 /*FUNCTION Mesh::GetId(const BamgVertex & t) const{{{*/ 2708 long Mesh::GetId(const BamgVertex & t) const { 2680 long Mesh::GetId(const BamgVertex & t) const { /*{{{*/ 2709 2681 return &t - vertices; 2710 2682 } 2711 2683 /*}}}*/ 2712 /*FUNCTION Mesh::GetId(const BamgVertex * t) const{{{*/ 2713 long Mesh::GetId(const BamgVertex * t) const { 2684 long Mesh::GetId(const BamgVertex * t) const { /*{{{*/ 2714 2685 return t - vertices; 2715 2686 } 2716 2687 /*}}}*/ 2717 /*FUNCTION Mesh::GetId(const Edge & t) const{{{*/ 2718 long Mesh::GetId(const Edge & t) const { 2688 long Mesh::GetId(const Edge & t) const { /*{{{*/ 2719 2689 return &t - edges; 2720 2690 } 2721 2691 /*}}}*/ 2722 /*FUNCTION Mesh::GetId(const Edge * t) const{{{*/ 2723 long Mesh::GetId(const Edge * t) const { 2692 long Mesh::GetId(const Edge * t) const { /*{{{*/ 2724 2693 return t - edges; 2725 2694 } 2726 2695 /*}}}*/ 2727 /*FUNCTION Mesh::Init{{{*/ 2728 void Mesh::Init(long maxnbv_in) { 2696 void Mesh::Init(long maxnbv_in) {/*{{{*/ 2729 2697 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/PreInit)*/ 2730 2698 … … 2774 2742 } 2775 2743 /*}}}*/ 2776 /*FUNCTION Mesh::Insert{{{*/ 2777 void Mesh::Insert(bool random) { 2744 void Mesh::Insert(bool random) {/*{{{*/ 2778 2745 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Insert)*/ 2779 2746 … … 2907 2874 } 2908 2875 /*}}}*/ 2909 /*FUNCTION Mesh::InsertNewPoints{{{*/ 2910 long Mesh::InsertNewPoints(long nbvold,long & NbTSwap,bool random) { 2876 long Mesh::InsertNewPoints(long nbvold,long & NbTSwap,bool random) {/*{{{*/ 2911 2877 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/InsertNewPoints)*/ 2912 2878 … … 2985 2951 } 2986 2952 /*}}}*/ 2987 /*FUNCTION Mesh::MakeGeomEdgeToEdge{{{*/ 2988 Edge** Mesh::MakeGeomEdgeToEdge() { 2953 Edge** Mesh::MakeGeomEdgeToEdge() {/*{{{*/ 2989 2954 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeGeomEdgeToEdge)*/ 2990 2955 … … 3028 2993 } 3029 2994 /*}}}*/ 3030 /*FUNCTION Mesh::MakeQuadrangles{{{*/ 3031 void Mesh::MakeQuadrangles(double costheta){ 2995 void Mesh::MakeQuadrangles(double costheta){/*{{{*/ 3032 2996 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeQuadrangles)*/ 3033 2997 … … 3070 3034 } 3071 3035 /*}}}*/ 3072 /*FUNCTION Mesh::MakeBamgQuadtree{{{*/ 3073 void Mesh::MakeBamgQuadtree() { 3036 void Mesh::MakeBamgQuadtree() { /*{{{*/ 3074 3037 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeBamgQuadtree)*/ 3075 3038 if(!quadtree) quadtree = new BamgQuadtree(this); 3076 3039 } 3077 3040 /*}}}*/ 3078 /*FUNCTION Mesh::MaxinalHmax{{{*/ 3079 double Mesh::MaximalHmax() { 3041 double Mesh::MaximalHmax() {/*{{{*/ 3080 3042 return Max(pmax.x-pmin.x,pmax.y-pmin.y); 3081 3043 } 3082 3044 /*}}}*/ 3083 /*FUNCTION Mesh::MaxSubDivision{{{*/ 3084 void Mesh::MaxSubDivision(double maxsubdiv) { 3045 void Mesh::MaxSubDivision(double maxsubdiv) {/*{{{*/ 3085 3046 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/MaxSubDivision)*/ 3086 3047 … … 3135 3096 } 3136 3097 /*}}}*/ 3137 /*FUNCTION Mesh::MetricAt{{{*/ 3138 Metric Mesh::MetricAt(const R2 & A) const { 3098 Metric Mesh::MetricAt(const R2 & A) const { /*{{{*/ 3139 3099 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MetricAt)*/ 3140 3100 … … 3156 3116 } 3157 3117 /*}}}*/ 3158 /*FUNCTION Mesh::MininalHmin{{{*/ 3159 double Mesh::MinimalHmin() { 3118 double Mesh::MinimalHmin() {/*{{{*/ 3160 3119 return 2.0/coefIcoor; 3161 3120 } 3162 3121 /*}}}*/ 3163 /*FUNCTION Mesh::NearestVertex{{{*/ 3164 BamgVertex* Mesh::NearestVertex(Icoor1 i,Icoor1 j) { 3165 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NearestVertex)*/ 3166 return quadtree->NearestVertex(i,j); 3167 } 3168 /*}}}*/ 3169 /*FUNCTION Mesh::NewPoints{{{*/ 3170 void Mesh::NewPoints(Mesh & Bh,BamgOpts* bamgopts,int KeepVertices){ 3122 BamgVertex* Mesh::NearestVertex(Icoor1 i,Icoor1 j) {/*{{{*/ 3123 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NearestVertex)*/ 3124 return quadtree->NearestVertex(i,j); 3125 } 3126 /*}}}*/ 3127 void Mesh::NewPoints(Mesh & Bh,BamgOpts* bamgopts,int KeepVertices){/*{{{*/ 3171 3128 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewPoints)*/ 3172 3129 … … 3249 3206 lIntTria.SplitEdge(Bh,A,B); 3250 3207 lIntTria.NewPoints(vertices,nbv,maxnbv); 3251 3252 3208 } // end loop for each edge 3209 }// for triangle 3253 3210 3254 3211 if (!InsertNewPoints(nbvold,NbTSwap,bamgopts->random)) break; … … 3281 3238 for(i=0;i<nbv;i++) NbSwapf += vertices[i].Optim(0); 3282 3239 }/*}}}*/ 3283 /*FUNCTION Mesh::ProjectOnCurve{{{*/ 3284 GeomEdge* Mesh::ProjectOnCurve( Edge & BhAB, BamgVertex & vA, BamgVertex & vB, 3240 GeomEdge* Mesh::ProjectOnCurve( Edge & BhAB, BamgVertex & vA, BamgVertex & vB,/*{{{*/ 3285 3241 double theta,BamgVertex & R,VertexOnEdge & BR,VertexOnGeom & GR) { 3286 3242 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/ProjectOnCurve)*/ … … 3343 3299 else{ // do the search by walking 3344 3300 _error_("case not supported yet"); 3345 3301 } 3346 3302 3347 3303 // find the direction of walking with direction of edge and pA,PB; … … 3381 3337 BR = VertexOnEdge(&R,eee,thetab); 3382 3338 return Gh.ProjectOnCurve(*eee,thetab,R,GR); 3383 3384 3339 } 3340 } 3385 3341 // we find the end 3386 3342 if (v1 != pvB){ … … 3402 3358 return Gh.ProjectOnCurve(*eee,thetab,R,GR); 3403 3359 } 3404 3360 } 3405 3361 abscisse = lg*theta; 3406 3362 3407 3363 } 3408 3364 _error_("Big bug..."); 3409 3365 return 0; // just for the compiler 3410 3366 } 3411 3367 /*}}}*/ 3412 /*FUNCTION Mesh::ReconstructExistingMesh{{{*/ 3413 void Mesh::ReconstructExistingMesh(){ 3414 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FillHoleInMesh)*/ 3415 3416 /*This routine reconstruct an existing mesh to make it CONVEX: 3417 * -all the holes are filled 3418 * -concave boundaries are filled 3419 * A convex mesh is required for a lot of operations. This is why every mesh 3420 * goes through this process. 3421 * This routine also generates mesh properties such as adjencies,... 3422 */ 3423 3424 /*Intermediary*/ 3425 int verbose=0; 3426 3427 // generation of the integer coordinate 3428 3429 // find extrema coordinates of vertices pmin,pmax 3430 long i; 3431 if(verbose>2) _printf_(" Reconstruct mesh of " << nbv << " vertices\n"); 3432 3433 //initialize orderedvertices 3434 _assert_(orderedvertices); 3435 for (i=0;i<nbv;i++) orderedvertices[i]=0; 3436 3437 //Initialize nbsubdomains 3438 nbsubdomains =0; 3439 3440 /* generation of triangles adjacency*/ 3441 3442 //First add existing edges 3443 long kk =0; 3444 SetOfEdges4* edge4= new SetOfEdges4(nbt*3,nbv); 3445 for (i=0;i<nbe;i++){ 3446 kk=kk+(i==edge4->SortAndAdd(GetId(edges[i][0]),GetId(edges[i][1]))); 3447 } 3448 if (kk != nbe){ 3449 _error_("There are " << kk-nbe << " double edges in the mesh"); 3450 } 3451 3452 //Add edges of all triangles in existing mesh 3453 long* st = new long[nbt*3]; 3454 for (i=0;i<nbt*3;i++) st[i]=-1; 3455 for (i=0;i<nbt;i++){ 3456 for (int j=0;j<3;j++){ 3457 3458 //Add current triangle edge to edge4 3459 long k =edge4->SortAndAdd(GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]])); 3460 3461 long invisible=triangles[i].Hidden(j); 3462 3463 //If the edge has not been added to st, add it 3464 if(st[k]==-1) st[k]=3*i+j; 3465 3466 //If the edge already exists, add adjacency 3467 else if(st[k]>=0) { 3468 _assert_(!triangles[i].TriangleAdj(j)); 3469 _assert_(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3))); 3470 3471 triangles[i].SetAdj2(j,triangles+st[k]/3,(int)(st[k]%3)); 3472 if (invisible) triangles[i].SetHidden(j); 3473 if (k<nbe) triangles[i].SetLocked(j); 3474 3475 //Make st[k] negative so that it will throw an error message if it is found again 3476 st[k]=-2-st[k]; 3477 } 3478 3479 //An edge belongs to 2 triangles 3480 else { 3481 _error_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles"); 3482 } 3483 } 3484 } 3485 3486 //Display info if required 3487 if(verbose>5) { 3488 _printf_(" info of Mesh:\n"); 3489 _printf_(" - number of vertices = " << nbv << " \n"); 3490 _printf_(" - number of triangles = " << nbt << " \n"); 3491 _printf_(" - number of given edges = " << nbe << " \n"); 3492 _printf_(" - number of all edges = " << edge4->nb() << "\n"); 3493 _printf_(" - Euler number 1 - nb of holes = " << nbt-edge4->nb()+nbv << "\n"); 3494 } 3495 3496 //check the consistency of edge[].adj and the geometrical required vertex 3497 long k=0; 3498 for (i=0;i<edge4->nb();i++){ 3499 if (st[i]>=0){ // edge alone 3500 if (i<nbe){ 3501 long i0=edge4->i(i); 3502 orderedvertices[i0] = vertices+i0; 3503 long i1=edge4->j(i); 3504 orderedvertices[i1] = vertices+i1; 3505 } 3506 else { 3507 k=k+1; 3508 if (k<10) { 3509 //print only 10 edges 3510 _printf_("Lost boundary edges " << i << " : " << edge4->i(i) << " " << edge4->j(i) << "\n"); 3511 } 3512 else if (k==10){ 3513 _printf_("Other lost boundary edges not shown...\n"); 3514 } 3515 } 3516 } 3517 } 3518 if(k) { 3519 _error_(k << " boundary edges (from the geometry) are not defined as mesh edges"); 3520 } 3521 3522 /* mesh generation with boundary points*/ 3523 long nbvb=0; 3524 for (i=0;i<nbv;i++){ 3525 vertices[i].t=0; 3526 vertices[i].IndexInTriangle=0; 3527 if (orderedvertices[i]) orderedvertices[nbvb++]=orderedvertices[i]; 3528 } 3529 3530 Triangle* savetriangles=triangles; 3531 long savenbt=nbt; 3532 long savemaxnbt=maxnbt; 3533 SubDomain* savesubdomains=subdomains; 3534 subdomains=0; 3535 3536 long Nbtriafillhole=2*nbvb; 3537 Triangle* triafillhole=new Triangle[Nbtriafillhole]; 3538 triangles = triafillhole; 3539 3540 nbt=2; 3541 maxnbt= Nbtriafillhole; 3542 3543 //Find a vertex that is not aligned with vertices 0 and 1 3544 for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 3545 if (++i>=nbvb) { 3546 _error_("ReconstructExistingMesh: All the vertices are aligned"); 3547 } 3548 //Move this vertex (i) to the 2d position in orderedvertices 3549 Exchange(orderedvertices[2], orderedvertices[i]); 3550 3551 /*Reconstruct mesh beginning with 2 triangles*/ 3552 BamgVertex * v0=orderedvertices[0], *v1=orderedvertices[1]; 3553 3554 triangles[0](0) = NULL; // Infinite vertex 3555 triangles[0](1) = v0; 3556 triangles[0](2) = v1; 3557 3558 triangles[1](0) = NULL;// Infinite vertex 3559 triangles[1](2) = v0; 3560 triangles[1](1) = v1; 3561 const int e0 = OppositeEdge[0]; 3562 const int e1 = NextEdge[e0]; 3563 const int e2 = PreviousEdge[e0]; 3564 triangles[0].SetAdj2(e0, &triangles[1] ,e0); 3565 triangles[0].SetAdj2(e1, &triangles[1] ,e2); 3566 triangles[0].SetAdj2(e2, &triangles[1] ,e1); 3567 3568 triangles[0].det = -1; // boundary triangles 3569 triangles[1].det = -1; // boundary triangles 3570 3571 triangles[0].SetSingleVertexToTriangleConnectivity(); 3572 triangles[1].SetSingleVertexToTriangleConnectivity(); 3573 3574 triangles[0].link=&triangles[1]; 3575 triangles[1].link=&triangles[0]; 3576 3577 if (!quadtree) delete quadtree; //ReInitialise; 3578 quadtree = new BamgQuadtree(this,0); 3579 quadtree->Add(*v0); 3580 quadtree->Add(*v1); 3581 3582 // vertices are added one by one 3583 long NbSwap=0; 3584 for (int icount=2; icount<nbvb; icount++) { 3585 BamgVertex *vi = orderedvertices[icount]; 3586 Icoor2 det3[3]; 3587 Triangle *tcvi = TriangleFindFromCoord(vi->i,det3); 3588 quadtree->Add(*vi); 3589 AddVertex(*vi,tcvi,det3); 3590 NbSwap += vi->Optim(1,1); 3591 } 3592 3593 //enforce the boundary 3594 AdjacentTriangle ta(0,0); 3595 long nbloss = 0,knbe=0; 3596 for ( i = 0; i < nbe; i++){ 3597 if (st[i] >=0){ //edge alone => on border 3598 BamgVertex &a=edges[i][0], &b=edges[i][1]; 3599 if (a.t && b.t){ 3600 knbe++; 3601 if (ForceEdge(a,b,ta)<0) nbloss++; 3602 } 3603 } 3604 } 3605 if(nbloss) { 3606 _error_("we lost " << nbloss << " existing edges other " << knbe); 3607 } 3608 3609 FindSubDomain(1); 3610 // remove all the hole 3611 // remove all the good sub domain 3612 long krm =0; 3613 for (i=0;i<nbt;i++){ 3614 if (triangles[i].link){ // remove triangles 3615 krm++; 3368 void Mesh::ReconstructExistingMesh(){/*{{{*/ 3369 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FillHoleInMesh)*/ 3370 3371 /*This routine reconstruct an existing mesh to make it CONVEX: 3372 * -all the holes are filled 3373 * -concave boundaries are filled 3374 * A convex mesh is required for a lot of operations. This is why every mesh 3375 * goes through this process. 3376 * This routine also generates mesh properties such as adjencies,... 3377 */ 3378 3379 /*Intermediary*/ 3380 int verbose=0; 3381 3382 // generation of the integer coordinate 3383 3384 // find extrema coordinates of vertices pmin,pmax 3385 long i; 3386 if(verbose>2) _printf_(" Reconstruct mesh of " << nbv << " vertices\n"); 3387 3388 //initialize orderedvertices 3389 _assert_(orderedvertices); 3390 for (i=0;i<nbv;i++) orderedvertices[i]=0; 3391 3392 //Initialize nbsubdomains 3393 nbsubdomains =0; 3394 3395 /* generation of triangles adjacency*/ 3396 3397 //First add existing edges 3398 long kk =0; 3399 SetOfEdges4* edge4= new SetOfEdges4(nbt*3,nbv); 3400 for (i=0;i<nbe;i++){ 3401 kk=kk+(i==edge4->SortAndAdd(GetId(edges[i][0]),GetId(edges[i][1]))); 3402 } 3403 if (kk != nbe){ 3404 _error_("There are " << kk-nbe << " double edges in the mesh"); 3405 } 3406 3407 //Add edges of all triangles in existing mesh 3408 long* st = new long[nbt*3]; 3409 for (i=0;i<nbt*3;i++) st[i]=-1; 3410 for (i=0;i<nbt;i++){ 3616 3411 for (int j=0;j<3;j++){ 3617 AdjacentTriangle ta = triangles[i].Adj(j); 3618 Triangle &tta = *(Triangle*)ta; 3619 //if edge between remove and not remove 3620 if(! tta.link){ 3621 // change the link of ta; 3622 int ja = ta; 3623 BamgVertex *v0= ta.EdgeVertex(0); 3624 BamgVertex *v1= ta.EdgeVertex(1); 3625 long k =edge4->SortAndAdd(v0?GetId(v0):nbv,v1? GetId(v1):nbv); 3626 3627 _assert_(st[k]>=0); 3628 tta.SetAdj2(ja,savetriangles + st[k] / 3,(int) (st[k]%3)); 3629 ta.SetLock(); 3412 3413 //Add current triangle edge to edge4 3414 long k =edge4->SortAndAdd(GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]])); 3415 3416 long invisible=triangles[i].Hidden(j); 3417 3418 //If the edge has not been added to st, add it 3419 if(st[k]==-1) st[k]=3*i+j; 3420 3421 //If the edge already exists, add adjacency 3422 else if(st[k]>=0) { 3423 _assert_(!triangles[i].TriangleAdj(j)); 3424 _assert_(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3))); 3425 3426 triangles[i].SetAdj2(j,triangles+st[k]/3,(int)(st[k]%3)); 3427 if (invisible) triangles[i].SetHidden(j); 3428 if (k<nbe) triangles[i].SetLocked(j); 3429 3430 //Make st[k] negative so that it will throw an error message if it is found again 3630 3431 st[k]=-2-st[k]; 3631 3432 } 3632 } 3633 } 3634 } 3635 long NbTfillHoll =0; 3636 for (i=0;i<nbt;i++){ 3637 if (triangles[i].link) { 3638 triangles[i]=Triangle((BamgVertex *) NULL,(BamgVertex *) NULL,(BamgVertex *) NULL); 3639 triangles[i].color=-1; 3640 } 3641 else{ 3642 triangles[i].color= savenbt+ NbTfillHoll++; 3643 } 3644 } 3645 _assert_(savenbt+NbTfillHoll<=savemaxnbt); 3646 3647 // copy of the outside triangles in saveMesh 3648 for (i=0;i<nbt;i++){ 3649 if(triangles[i].color>=0) { 3650 savetriangles[savenbt]=triangles[i]; 3651 savetriangles[savenbt].link=0; 3652 savenbt++; 3653 } 3654 } 3655 // gestion of the adj 3656 k =0; 3657 Triangle * tmax = triangles + nbt; 3658 for (i=0;i<savenbt;i++) { 3659 Triangle & ti = savetriangles[i]; 3660 for (int j=0;j<3;j++){ 3661 Triangle * ta = ti.TriangleAdj(j); 3662 int aa = ti.NuEdgeTriangleAdj(j); 3663 int lck = ti.Locked(j); 3664 if (!ta) k++; // bug 3665 else if ( ta >= triangles && ta < tmax){ 3666 ta= savetriangles + ta->color; 3667 ti.SetAdj2(j,ta,aa); 3668 if(lck) ti.SetLocked(j); 3669 } 3670 } 3671 } 3672 3673 // restore triangles; 3674 nbt=savenbt; 3675 maxnbt=savemaxnbt; 3676 delete [] triangles; 3677 delete [] subdomains; 3678 triangles = savetriangles; 3679 subdomains = savesubdomains; 3680 if (k) { 3681 _error_("number of triangles edges alone = " << k); 3682 } 3683 FindSubDomain(); 3684 3685 delete edge4; 3686 delete [] st; 3687 for (i=0;i<nbv;i++) quadtree->Add(vertices[i]); 3688 3689 SetVertexFieldOn(); 3690 3691 /*Check requirements consistency*/ 3692 for (i=0;i<nbe;i++){ 3693 /*If the current mesh edge is on Geometry*/ 3694 if(edges[i].GeomEdgeHook){ 3695 for(int j=0;j<2;j++){ 3696 /*Go through the edges adjacent to current edge (if on the same curve)*/ 3697 if (!edges[i].adj[j]){ 3698 /*The edge is on Geometry and does not have 2 adjacent edges... (not on a closed curve)*/ 3699 /*Check that the 2 vertices are on geometry AND required*/ 3700 if(!edges[i][j].GeomEdgeHook->IsRequiredVertex()){ 3701 _printf_("ReconstructExistingMesh error message: problem with the edge number " << i+1 << ": [" << GetId(edges[i][0])+1 << " " << GetId(edges[i][1])+1 << "]\n"); 3702 _printf_("This edge is on geometrical edge number " << Gh.GetId(edges[i].GeomEdgeHook)+1 << "\n"); 3703 if (edges[i][j].GeomEdgeHook->OnGeomVertex()) 3704 _printf_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric BamgVertex number " << Gh.GetId(edges[i][j].GeomEdgeHook->gv)+1 << "\n"); 3705 else if (edges[i][j].GeomEdgeHook->OnGeomEdge()) 3706 _printf_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric Edge number " << Gh.GetId(edges[i][j].GeomEdgeHook->ge)+1 << "\n"); 3707 else 3708 _printf_("Its pointer is " << edges[i][j].GeomEdgeHook << "\n"); 3709 3710 _printf_("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n"); 3711 _error_("See above (might be cryptic...)"); 3433 3434 //An edge belongs to 2 triangles 3435 else { 3436 _error_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles"); 3437 } 3438 } 3439 } 3440 3441 //Display info if required 3442 if(verbose>5) { 3443 _printf_(" info of Mesh:\n"); 3444 _printf_(" - number of vertices = " << nbv << " \n"); 3445 _printf_(" - number of triangles = " << nbt << " \n"); 3446 _printf_(" - number of given edges = " << nbe << " \n"); 3447 _printf_(" - number of all edges = " << edge4->nb() << "\n"); 3448 _printf_(" - Euler number 1 - nb of holes = " << nbt-edge4->nb()+nbv << "\n"); 3449 } 3450 3451 //check the consistency of edge[].adj and the geometrical required vertex 3452 long k=0; 3453 for (i=0;i<edge4->nb();i++){ 3454 if (st[i]>=0){ // edge alone 3455 if (i<nbe){ 3456 long i0=edge4->i(i); 3457 orderedvertices[i0] = vertices+i0; 3458 long i1=edge4->j(i); 3459 orderedvertices[i1] = vertices+i1; 3460 } 3461 else { 3462 k=k+1; 3463 if (k<10) { 3464 //print only 10 edges 3465 _printf_("Lost boundary edges " << i << " : " << edge4->i(i) << " " << edge4->j(i) << "\n"); 3712 3466 } 3713 } 3714 } 3715 } 3716 } 3717 } 3718 /*}}}*/ 3719 /*FUNCTION Mesh::TrianglesRenumberBySubDomain{{{*/ 3720 void Mesh::TrianglesRenumberBySubDomain(bool justcompress){ 3467 else if (k==10){ 3468 _printf_("Other lost boundary edges not shown...\n"); 3469 } 3470 } 3471 } 3472 } 3473 if(k) { 3474 _error_(k << " boundary edges (from the geometry) are not defined as mesh edges"); 3475 } 3476 3477 /* mesh generation with boundary points*/ 3478 long nbvb=0; 3479 for (i=0;i<nbv;i++){ 3480 vertices[i].t=0; 3481 vertices[i].IndexInTriangle=0; 3482 if (orderedvertices[i]) orderedvertices[nbvb++]=orderedvertices[i]; 3483 } 3484 3485 Triangle* savetriangles=triangles; 3486 long savenbt=nbt; 3487 long savemaxnbt=maxnbt; 3488 SubDomain* savesubdomains=subdomains; 3489 subdomains=0; 3490 3491 long Nbtriafillhole=2*nbvb; 3492 Triangle* triafillhole=new Triangle[Nbtriafillhole]; 3493 triangles = triafillhole; 3494 3495 nbt=2; 3496 maxnbt= Nbtriafillhole; 3497 3498 //Find a vertex that is not aligned with vertices 0 and 1 3499 for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 3500 if (++i>=nbvb) { 3501 _error_("ReconstructExistingMesh: All the vertices are aligned"); 3502 } 3503 //Move this vertex (i) to the 2d position in orderedvertices 3504 Exchange(orderedvertices[2], orderedvertices[i]); 3505 3506 /*Reconstruct mesh beginning with 2 triangles*/ 3507 BamgVertex * v0=orderedvertices[0], *v1=orderedvertices[1]; 3508 3509 triangles[0](0) = NULL; // Infinite vertex 3510 triangles[0](1) = v0; 3511 triangles[0](2) = v1; 3512 3513 triangles[1](0) = NULL;// Infinite vertex 3514 triangles[1](2) = v0; 3515 triangles[1](1) = v1; 3516 const int e0 = OppositeEdge[0]; 3517 const int e1 = NextEdge[e0]; 3518 const int e2 = PreviousEdge[e0]; 3519 triangles[0].SetAdj2(e0, &triangles[1] ,e0); 3520 triangles[0].SetAdj2(e1, &triangles[1] ,e2); 3521 triangles[0].SetAdj2(e2, &triangles[1] ,e1); 3522 3523 triangles[0].det = -1; // boundary triangles 3524 triangles[1].det = -1; // boundary triangles 3525 3526 triangles[0].SetSingleVertexToTriangleConnectivity(); 3527 triangles[1].SetSingleVertexToTriangleConnectivity(); 3528 3529 triangles[0].link=&triangles[1]; 3530 triangles[1].link=&triangles[0]; 3531 3532 if (!quadtree) delete quadtree; //ReInitialise; 3533 quadtree = new BamgQuadtree(this,0); 3534 quadtree->Add(*v0); 3535 quadtree->Add(*v1); 3536 3537 // vertices are added one by one 3538 long NbSwap=0; 3539 for (int icount=2; icount<nbvb; icount++) { 3540 BamgVertex *vi = orderedvertices[icount]; 3541 Icoor2 det3[3]; 3542 Triangle *tcvi = TriangleFindFromCoord(vi->i,det3); 3543 quadtree->Add(*vi); 3544 AddVertex(*vi,tcvi,det3); 3545 NbSwap += vi->Optim(1,1); 3546 } 3547 3548 //enforce the boundary 3549 AdjacentTriangle ta(0,0); 3550 long nbloss = 0,knbe=0; 3551 for ( i = 0; i < nbe; i++){ 3552 if (st[i] >=0){ //edge alone => on border 3553 BamgVertex &a=edges[i][0], &b=edges[i][1]; 3554 if (a.t && b.t){ 3555 knbe++; 3556 if (ForceEdge(a,b,ta)<0) nbloss++; 3557 } 3558 } 3559 } 3560 if(nbloss) { 3561 _error_("we lost " << nbloss << " existing edges other " << knbe); 3562 } 3563 3564 FindSubDomain(1); 3565 // remove all the hole 3566 // remove all the good sub domain 3567 long krm =0; 3568 for (i=0;i<nbt;i++){ 3569 if (triangles[i].link){ // remove triangles 3570 krm++; 3571 for (int j=0;j<3;j++){ 3572 AdjacentTriangle ta = triangles[i].Adj(j); 3573 Triangle &tta = *(Triangle*)ta; 3574 //if edge between remove and not remove 3575 if(! tta.link){ 3576 // change the link of ta; 3577 int ja = ta; 3578 BamgVertex *v0= ta.EdgeVertex(0); 3579 BamgVertex *v1= ta.EdgeVertex(1); 3580 long k =edge4->SortAndAdd(v0?GetId(v0):nbv,v1? GetId(v1):nbv); 3581 3582 _assert_(st[k]>=0); 3583 tta.SetAdj2(ja,savetriangles + st[k] / 3,(int) (st[k]%3)); 3584 ta.SetLock(); 3585 st[k]=-2-st[k]; 3586 } 3587 } 3588 } 3589 } 3590 long NbTfillHoll =0; 3591 for (i=0;i<nbt;i++){ 3592 if (triangles[i].link) { 3593 triangles[i]=Triangle((BamgVertex *) NULL,(BamgVertex *) NULL,(BamgVertex *) NULL); 3594 triangles[i].color=-1; 3595 } 3596 else{ 3597 triangles[i].color= savenbt+ NbTfillHoll++; 3598 } 3599 } 3600 _assert_(savenbt+NbTfillHoll<=savemaxnbt); 3601 3602 // copy of the outside triangles in saveMesh 3603 for (i=0;i<nbt;i++){ 3604 if(triangles[i].color>=0) { 3605 savetriangles[savenbt]=triangles[i]; 3606 savetriangles[savenbt].link=0; 3607 savenbt++; 3608 } 3609 } 3610 // gestion of the adj 3611 k =0; 3612 Triangle * tmax = triangles + nbt; 3613 for (i=0;i<savenbt;i++) { 3614 Triangle & ti = savetriangles[i]; 3615 for (int j=0;j<3;j++){ 3616 Triangle * ta = ti.TriangleAdj(j); 3617 int aa = ti.NuEdgeTriangleAdj(j); 3618 int lck = ti.Locked(j); 3619 if (!ta) k++; // bug 3620 else if ( ta >= triangles && ta < tmax){ 3621 ta= savetriangles + ta->color; 3622 ti.SetAdj2(j,ta,aa); 3623 if(lck) ti.SetLocked(j); 3624 } 3625 } 3626 } 3627 3628 // restore triangles; 3629 nbt=savenbt; 3630 maxnbt=savemaxnbt; 3631 delete [] triangles; 3632 delete [] subdomains; 3633 triangles = savetriangles; 3634 subdomains = savesubdomains; 3635 if (k) { 3636 _error_("number of triangles edges alone = " << k); 3637 } 3638 FindSubDomain(); 3639 3640 delete edge4; 3641 delete [] st; 3642 for (i=0;i<nbv;i++) quadtree->Add(vertices[i]); 3643 3644 SetVertexFieldOn(); 3645 3646 /*Check requirements consistency*/ 3647 for (i=0;i<nbe;i++){ 3648 /*If the current mesh edge is on Geometry*/ 3649 if(edges[i].GeomEdgeHook){ 3650 for(int j=0;j<2;j++){ 3651 /*Go through the edges adjacent to current edge (if on the same curve)*/ 3652 if (!edges[i].adj[j]){ 3653 /*The edge is on Geometry and does not have 2 adjacent edges... (not on a closed curve)*/ 3654 /*Check that the 2 vertices are on geometry AND required*/ 3655 if(!edges[i][j].GeomEdgeHook->IsRequiredVertex()){ 3656 _printf_("ReconstructExistingMesh error message: problem with the edge number " << i+1 << ": [" << GetId(edges[i][0])+1 << " " << GetId(edges[i][1])+1 << "]\n"); 3657 _printf_("This edge is on geometrical edge number " << Gh.GetId(edges[i].GeomEdgeHook)+1 << "\n"); 3658 if (edges[i][j].GeomEdgeHook->OnGeomVertex()) 3659 _printf_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric BamgVertex number " << Gh.GetId(edges[i][j].GeomEdgeHook->gv)+1 << "\n"); 3660 else if (edges[i][j].GeomEdgeHook->OnGeomEdge()) 3661 _printf_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric Edge number " << Gh.GetId(edges[i][j].GeomEdgeHook->ge)+1 << "\n"); 3662 else 3663 _printf_("Its pointer is " << edges[i][j].GeomEdgeHook << "\n"); 3664 3665 _printf_("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n"); 3666 _error_("See above (might be cryptic...)"); 3667 } 3668 } 3669 } 3670 } 3671 } 3672 } 3673 /*}}}*/ 3674 void Mesh::TrianglesRenumberBySubDomain(bool justcompress){/*{{{*/ 3721 3675 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ReNumberingTheTriangleBySubDomain)*/ 3722 3676 … … 3785 3739 } 3786 3740 /*}}}*/ 3787 /*FUNCTION Mesh::SetIntCoor{{{*/ 3788 void Mesh::SetIntCoor(const char * strfrom) { 3789 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SetIntCoor)*/ 3790 3791 /*Set integer coordinate for existing vertices*/ 3792 3793 //Get extrema coordinates of the existing vertices 3794 pmin = vertices[0].r; 3795 pmax = vertices[0].r; 3796 long i; 3797 for (i=0;i<nbv;i++) { 3798 pmin.x = Min(pmin.x,vertices[i].r.x); 3799 pmin.y = Min(pmin.y,vertices[i].r.y); 3800 pmax.x = Max(pmax.x,vertices[i].r.x); 3801 pmax.y = Max(pmax.y,vertices[i].r.y); 3802 } 3803 R2 DD = (pmax-pmin)*0.05; 3804 pmin = pmin-DD; 3805 pmax = pmax+DD; 3806 3807 //Compute coefIcoor 3808 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 3809 if (coefIcoor<=0){ 3810 _error_("coefIcoor should be positive, a problem in the geometry is likely"); 3811 } 3812 3813 // generation of integer coord 3814 for (i=0;i<nbv;i++) { 3815 vertices[i].i = R2ToI2(vertices[i].r); 3816 } 3817 3818 // computation of the det 3819 int number_of_errors=0; 3820 for (i=0;i<nbt;i++) { 3821 BamgVertex & v0 = triangles[i][0]; 3822 BamgVertex & v1 = triangles[i][1]; 3823 BamgVertex & v2 = triangles[i][2]; 3824 3825 //If this is not a boundary triangle 3826 if ( &v0 && &v1 && &v2 ){ 3827 3828 /*Compute determinant*/ 3829 triangles[i].det= det(v0,v1,v2); 3830 3831 /*Check that determinant is positive*/ 3832 if (triangles[i].det <=0){ 3833 3834 /*increase number_of_errors and print error only for the first 20 triangles*/ 3835 number_of_errors++; 3836 if (number_of_errors<20){ 3837 _printf_("Area of Triangle " << i+1 << " < 0 (det=" << triangles[i].det << ")\n"); 3838 } 3839 } 3840 } 3841 3842 //else, set as -1 3843 else triangles[i].det=-1; 3844 } 3845 3846 if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above"); 3847 } 3848 /*}}}*/ 3849 /*FUNCTION Mesh::SmoothingVertex{{{*/ 3850 void Mesh::SmoothingVertex(int nbiter,double omega ) { 3851 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SmoothingVertex)*/ 3852 3853 long int verbose=0; 3854 // if quatree exist remove it end reconstruct 3855 if (quadtree) delete quadtree; 3856 quadtree=0; 3857 CreateSingleVertexToTriangleConnectivity(); 3858 Triangle vide; // a triangle to mark the boundary vertex 3859 Triangle ** tstart= new Triangle* [nbv]; 3860 long i,j,k; 3861 // attention si Background == Triangle alors on ne peut pas utiliser la rechech rapide 3862 if ( this == & BTh) 3863 for ( i=0;i<nbv;i++) 3864 tstart[i]=vertices[i].t; 3865 else 3866 for ( i=0;i<nbv;i++) 3867 tstart[i]=0; 3868 for ( j=0;j<NbVerticesOnGeomVertex;j++ ) 3869 tstart[ GetId(VerticesOnGeomVertex[j].meshvertex)]=&vide; 3870 for ( k=0;k<NbVerticesOnGeomEdge;k++ ) 3871 tstart[ GetId(VerticesOnGeomEdge[k].meshvertex)]=&vide; 3872 if(verbose>2) _printf_(" SmoothingVertex: nb Iteration = " << nbiter << ", Omega=" << omega << "\n"); 3873 for (k=0;k<nbiter;k++) 3874 { 3875 long i,NbSwap =0; 3876 double delta =0; 3877 for ( i=0;i<nbv;i++) 3878 if (tstart[i] != &vide) // not a boundary vertex 3879 delta=Max(delta,vertices[i].Smoothing(*this,BTh,tstart[i],omega)); 3880 if (!nbq) 3741 void Mesh::SetIntCoor(const char * strfrom) {/*{{{*/ 3742 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SetIntCoor)*/ 3743 3744 /*Set integer coordinate for existing vertices*/ 3745 3746 //Get extrema coordinates of the existing vertices 3747 pmin = vertices[0].r; 3748 pmax = vertices[0].r; 3749 long i; 3750 for (i=0;i<nbv;i++) { 3751 pmin.x = Min(pmin.x,vertices[i].r.x); 3752 pmin.y = Min(pmin.y,vertices[i].r.y); 3753 pmax.x = Max(pmax.x,vertices[i].r.x); 3754 pmax.y = Max(pmax.y,vertices[i].r.y); 3755 } 3756 R2 DD = (pmax-pmin)*0.05; 3757 pmin = pmin-DD; 3758 pmax = pmax+DD; 3759 3760 //Compute coefIcoor 3761 coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y)); 3762 if (coefIcoor<=0){ 3763 _error_("coefIcoor should be positive, a problem in the geometry is likely"); 3764 } 3765 3766 // generation of integer coord 3767 for (i=0;i<nbv;i++) { 3768 vertices[i].i = R2ToI2(vertices[i].r); 3769 } 3770 3771 // computation of the det 3772 int number_of_errors=0; 3773 for (i=0;i<nbt;i++) { 3774 BamgVertex & v0 = triangles[i][0]; 3775 BamgVertex & v1 = triangles[i][1]; 3776 BamgVertex & v2 = triangles[i][2]; 3777 3778 //If this is not a boundary triangle 3779 if ( &v0 && &v1 && &v2 ){ 3780 3781 /*Compute determinant*/ 3782 triangles[i].det= det(v0,v1,v2); 3783 3784 /*Check that determinant is positive*/ 3785 if (triangles[i].det <=0){ 3786 3787 /*increase number_of_errors and print error only for the first 20 triangles*/ 3788 number_of_errors++; 3789 if (number_of_errors<20){ 3790 _printf_("Area of Triangle " << i+1 << " < 0 (det=" << triangles[i].det << ")\n"); 3791 } 3792 } 3793 } 3794 3795 //else, set as -1 3796 else triangles[i].det=-1; 3797 } 3798 3799 if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above"); 3800 } 3801 /*}}}*/ 3802 void Mesh::SmoothingVertex(int nbiter,double omega ) { /*{{{*/ 3803 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SmoothingVertex)*/ 3804 3805 long int verbose=0; 3806 // if quatree exist remove it end reconstruct 3807 if (quadtree) delete quadtree; 3808 quadtree=0; 3809 CreateSingleVertexToTriangleConnectivity(); 3810 Triangle vide; // a triangle to mark the boundary vertex 3811 Triangle ** tstart= new Triangle* [nbv]; 3812 long i,j,k; 3813 // attention si Background == Triangle alors on ne peut pas utiliser la rechech rapide 3814 if ( this == & BTh) 3881 3815 for ( i=0;i<nbv;i++) 3882 if (tstart[i] != &vide) // not a boundary vertex 3883 NbSwap += vertices[i].Optim(1); 3884 if (verbose>3) _printf_(" move max = " << pow(delta,0.5) << ", iteration = " << k << ", nb of swap = " << NbSwap << "\n"); 3885 } 3886 3887 delete [] tstart; 3888 if (quadtree) quadtree= new BamgQuadtree(this); 3889 } 3890 /*}}}*/ 3891 /*FUNCTION Mesh::SmoothMetric{{{*/ 3892 void Mesh::SmoothMetric(double raisonmax) { 3893 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/SmoothMetric)*/ 3894 3895 long int verbose=0; 3896 3897 if(raisonmax<1.1) return; 3898 if(verbose > 1) _printf_(" Mesh::SmoothMetric raisonmax = " << raisonmax << "\n"); 3899 CreateSingleVertexToTriangleConnectivity(); 3900 long i,j,kch,kk,ip; 3901 long *first_np_or_next_t0 = new long[nbv]; 3902 long *first_np_or_next_t1 = new long[nbv]; 3903 long Head0 =0,Head1=-1; 3904 double logseuil= log(raisonmax); 3905 3906 for(i=0;i<nbv-1;i++) 3907 first_np_or_next_t0[i]=i+1; 3908 first_np_or_next_t0[nbv-1]=-1;// end; 3909 for(i=0;i<nbv;i++) 3910 first_np_or_next_t1[i]=-1; 3911 kk=0; 3912 while(Head0>=0&& kk++<100){ 3913 kch=0; 3914 for(i=Head0;i>=0;i=first_np_or_next_t0[ip=i],first_np_or_next_t0[ip]=-1) { 3915 // pour tous les triangles autour du sommet s 3916 Triangle* t= vertices[i].t; 3917 if (!t){ 3918 _error_("!t"); 3919 } 3920 BamgVertex & vi = vertices[i]; 3921 AdjacentTriangle ta(t,EdgesVertexTriangle[vertices[i].IndexInTriangle][0]); 3922 BamgVertex *pvj0 = ta.EdgeVertex(0); 3923 while (1) { 3924 ta=Previous(Adj(ta)); 3925 if (vertices+i != ta.EdgeVertex(1)){ 3926 _error_("vertices+i != ta.EdgeVertex(1)"); 3927 } 3928 BamgVertex & vj = *(ta.EdgeVertex(0)); 3929 if ( &vj ) { 3930 j= &vj-vertices; 3931 if (j<0 || j >= nbv){ 3932 _error_("j<0 || j >= nbv"); 3816 tstart[i]=vertices[i].t; 3817 else 3818 for ( i=0;i<nbv;i++) 3819 tstart[i]=0; 3820 for ( j=0;j<NbVerticesOnGeomVertex;j++ ) 3821 tstart[ GetId(VerticesOnGeomVertex[j].meshvertex)]=&vide; 3822 for ( k=0;k<NbVerticesOnGeomEdge;k++ ) 3823 tstart[ GetId(VerticesOnGeomEdge[k].meshvertex)]=&vide; 3824 if(verbose>2) _printf_(" SmoothingVertex: nb Iteration = " << nbiter << ", Omega=" << omega << "\n"); 3825 for (k=0;k<nbiter;k++) 3826 { 3827 long i,NbSwap =0; 3828 double delta =0; 3829 for ( i=0;i<nbv;i++) 3830 if (tstart[i] != &vide) // not a boundary vertex 3831 delta=Max(delta,vertices[i].Smoothing(*this,BTh,tstart[i],omega)); 3832 if (!nbq) 3833 for ( i=0;i<nbv;i++) 3834 if (tstart[i] != &vide) // not a boundary vertex 3835 NbSwap += vertices[i].Optim(1); 3836 if (verbose>3) _printf_(" move max = " << pow(delta,0.5) << ", iteration = " << k << ", nb of swap = " << NbSwap << "\n"); 3837 } 3838 3839 delete [] tstart; 3840 if (quadtree) quadtree= new BamgQuadtree(this); 3841 } 3842 /*}}}*/ 3843 void Mesh::SmoothMetric(double raisonmax) { /*{{{*/ 3844 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/SmoothMetric)*/ 3845 3846 long int verbose=0; 3847 3848 if(raisonmax<1.1) return; 3849 if(verbose > 1) _printf_(" Mesh::SmoothMetric raisonmax = " << raisonmax << "\n"); 3850 CreateSingleVertexToTriangleConnectivity(); 3851 long i,j,kch,kk,ip; 3852 long *first_np_or_next_t0 = new long[nbv]; 3853 long *first_np_or_next_t1 = new long[nbv]; 3854 long Head0 =0,Head1=-1; 3855 double logseuil= log(raisonmax); 3856 3857 for(i=0;i<nbv-1;i++) 3858 first_np_or_next_t0[i]=i+1; 3859 first_np_or_next_t0[nbv-1]=-1;// end; 3860 for(i=0;i<nbv;i++) 3861 first_np_or_next_t1[i]=-1; 3862 kk=0; 3863 while(Head0>=0&& kk++<100){ 3864 kch=0; 3865 for(i=Head0;i>=0;i=first_np_or_next_t0[ip=i],first_np_or_next_t0[ip]=-1) { 3866 // pour tous les triangles autour du sommet s 3867 Triangle* t= vertices[i].t; 3868 if (!t){ 3869 _error_("!t"); 3870 } 3871 BamgVertex & vi = vertices[i]; 3872 AdjacentTriangle ta(t,EdgesVertexTriangle[vertices[i].IndexInTriangle][0]); 3873 BamgVertex *pvj0 = ta.EdgeVertex(0); 3874 while (1) { 3875 ta=Previous(Adj(ta)); 3876 if (vertices+i != ta.EdgeVertex(1)){ 3877 _error_("vertices+i != ta.EdgeVertex(1)"); 3933 3878 } 3934 R2 Aij = (R2) vj - (R2) vi; 3935 double ll = Norme2(Aij); 3936 if (0) { 3937 double hi = ll/vi.m(Aij); 3938 double hj = ll/vj.m(Aij); 3939 if(hi < hj) 3879 BamgVertex & vj = *(ta.EdgeVertex(0)); 3880 if ( &vj ) { 3881 j= &vj-vertices; 3882 if (j<0 || j >= nbv){ 3883 _error_("j<0 || j >= nbv"); 3884 } 3885 R2 Aij = (R2) vj - (R2) vi; 3886 double ll = Norme2(Aij); 3887 if (0) { 3888 double hi = ll/vi.m(Aij); 3889 double hj = ll/vj.m(Aij); 3890 if(hi < hj) 3891 { 3892 double dh=(hj-hi)/ll; 3893 if (dh>logseuil) { 3894 vj.m.IntersectWith(vi.m/(1 +logseuil*ll/hi)); 3895 if(first_np_or_next_t1[j]<0) 3896 kch++,first_np_or_next_t1[j]=Head1,Head1=j; 3897 } 3898 } 3899 } 3900 else 3940 3901 { 3941 double dh=(hj-hi)/ll; 3942 if (dh>logseuil) { 3943 vj.m.IntersectWith(vi.m/(1 +logseuil*ll/hi)); 3944 if(first_np_or_next_t1[j]<0) 3945 kch++,first_np_or_next_t1[j]=Head1,Head1=j; 3946 } 3902 double li = vi.m(Aij); 3903 if( vj.m.IntersectWith(vi.m/(1 +logseuil*li)) ) 3904 if(first_np_or_next_t1[j]<0) // if the metrix change 3905 kch++,first_np_or_next_t1[j]=Head1,Head1=j; 3947 3906 } 3948 } 3949 else 3950 { 3951 double li = vi.m(Aij); 3952 if( vj.m.IntersectWith(vi.m/(1 +logseuil*li)) ) 3953 if(first_np_or_next_t1[j]<0) // if the metrix change 3954 kch++,first_np_or_next_t1[j]=Head1,Head1=j; 3907 } 3908 if ( &vj == pvj0 ) break; 3909 } 3910 } 3911 Head0 = Head1; 3912 Head1 = -1; 3913 Exchange(first_np_or_next_t0,first_np_or_next_t1); 3914 } 3915 if(verbose>2) _printf_(" number of iterations = " << kch << "\n"); 3916 delete [] first_np_or_next_t0; 3917 delete [] first_np_or_next_t1; 3918 } 3919 /*}}}*/ 3920 long Mesh::SplitInternalEdgeWithBorderVertices(){/*{{{*/ 3921 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SplitInternalEdgeWithBorderVertices)*/ 3922 3923 long NbSplitEdge=0; 3924 SetVertexFieldOn(); 3925 long it; 3926 long nbvold=nbv; 3927 long int verbose=2; 3928 for (it=0;it<nbt;it++){ 3929 Triangle &t=triangles[it]; 3930 if (t.link) 3931 for (int j=0;j<3;j++) 3932 if(!t.Locked(j) && !t.Hidden(j)){ 3933 Triangle &tt = *t.TriangleAdj(j); 3934 if ( &tt && tt.link && it < GetId(tt)) 3935 { // an internal edge 3936 BamgVertex &v0 = t[VerticesOfTriangularEdge[j][0]]; 3937 BamgVertex &v1 = t[VerticesOfTriangularEdge[j][1]]; 3938 if (v0.GeomEdgeHook && v1.GeomEdgeHook){ 3939 R2 P= ((R2) v0 + (R2) v1)*0.5; 3940 if ( nbv<maxnbv) { 3941 vertices[nbv].r = P; 3942 vertices[nbv++].m = Metric(0.5,v0.m,0.5,v1.m); 3943 vertices[nbv].ReferenceNumber=0; 3944 vertices[nbv].DirOfSearch = NoDirOfSearch ; 3945 } 3946 NbSplitEdge++; 3955 3947 } 3956 } 3957 if ( &vj == pvj0 ) break; 3958 } 3959 } 3960 Head0 = Head1; 3961 Head1 = -1; 3962 Exchange(first_np_or_next_t0,first_np_or_next_t1); 3963 } 3964 if(verbose>2) _printf_(" number of iterations = " << kch << "\n"); 3965 delete [] first_np_or_next_t0; 3966 delete [] first_np_or_next_t1; 3967 } 3968 /*}}}*/ 3969 /*FUNCTION Mesh::SplitInternalEdgeWithBorderVertices{{{*/ 3970 long Mesh::SplitInternalEdgeWithBorderVertices(){ 3971 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SplitInternalEdgeWithBorderVertices)*/ 3972 3973 long NbSplitEdge=0; 3974 SetVertexFieldOn(); 3975 long it; 3976 long nbvold=nbv; 3977 long int verbose=2; 3978 for (it=0;it<nbt;it++){ 3979 Triangle &t=triangles[it]; 3980 if (t.link) 3981 for (int j=0;j<3;j++) 3982 if(!t.Locked(j) && !t.Hidden(j)){ 3983 Triangle &tt = *t.TriangleAdj(j); 3984 if ( &tt && tt.link && it < GetId(tt)) 3985 { // an internal edge 3986 BamgVertex &v0 = t[VerticesOfTriangularEdge[j][0]]; 3987 BamgVertex &v1 = t[VerticesOfTriangularEdge[j][1]]; 3988 if (v0.GeomEdgeHook && v1.GeomEdgeHook){ 3989 R2 P= ((R2) v0 + (R2) v1)*0.5; 3990 if ( nbv<maxnbv) { 3991 vertices[nbv].r = P; 3992 vertices[nbv++].m = Metric(0.5,v0.m,0.5,v1.m); 3993 vertices[nbv].ReferenceNumber=0; 3994 vertices[nbv].DirOfSearch = NoDirOfSearch ; 3995 } 3996 NbSplitEdge++; 3997 } 3998 } 3999 } 4000 } 4001 CreateSingleVertexToTriangleConnectivity(); 4002 if (nbvold!=nbv){ 4003 long iv = nbvold; 4004 long NbSwap = 0; 4005 Icoor2 det3[3]; 4006 for (int i=nbvold;i<nbv;i++) {// for all the new point 4007 BamgVertex & vi = vertices[i]; 4008 vi.i = R2ToI2(vi.r); 4009 vi.r = I2ToR2(vi.i); 4010 4011 // a good new point 4012 vi.ReferenceNumber=0; 4013 vi.DirOfSearch =NoDirOfSearch; 4014 Triangle *tcvi = TriangleFindFromCoord(vi.i,det3); 4015 if (tcvi && !tcvi->link) { 4016 _printf_("problem inserting point in SplitInternalEdgeWithBorderVertices (tcvj && !tcvj->link)\n"); 4017 } 4018 4019 quadtree->Add(vi); 4020 if (!tcvi || tcvi->det<0){// internal 4021 _error_("!tcvi || tcvi->det < 0"); 4022 } 4023 AddVertex(vi,tcvi,det3); 4024 NbSwap += vi.Optim(1); 4025 iv++; 4026 } 4027 if (verbose>3) { 4028 _printf_(" number of points: " << iv << "\n"); 4029 _printf_(" number of swap to split internal edges with border vertices: " << NbSwap << "\n"); 4030 nbv = iv; 4031 } 4032 } 4033 if (NbSplitEdge>nbv-nbvold) _printf_("WARNING: not enough vertices to split all internal edges, we lost " << NbSplitEdge - ( nbv-nbvold) << " edges...\n"); 4034 if (verbose>2) _printf_("SplitInternalEdgeWithBorderVertices: Number of splited edge " << NbSplitEdge << "\n"); 4035 4036 return NbSplitEdge; 4037 } 4038 /*}}}*/ 4039 /*FUNCTION Mesh::ToI2{{{*/ 4040 I2 Mesh::R2ToI2(const R2 & P) const { 4041 return I2( (Icoor1) (coefIcoor*(P.x-pmin.x)),(Icoor1) (coefIcoor*(P.y-pmin.y)) ); 4042 } 4043 /*}}}*/ 4044 /*FUNCTION Mesh::ToR2{{{*/ 4045 R2 Mesh::I2ToR2(const I2 & P) const { 4046 return R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y); 4047 } 4048 /*}}}*/ 4049 /*FUNCTION Mesh::TriangleFindFromCoord{{{*/ 4050 Triangle * Mesh::TriangleFindFromCoord(const I2 & B,Icoor2 det3[3], Triangle *tstart) const { 4051 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindTriangleContening)*/ 4052 4053 Triangle * t=0; 4054 int j,jp,jn,jj; 4055 int counter; 4056 4057 /*Get starting triangle. Take tsart if provided*/ 4058 if (tstart) t=tstart; 4059 4060 /*Else find the closest Triangle using the quadtree*/ 4061 else { 4062 4063 /*Check that the quadtree does exist*/ 4064 if (!quadtree) _error_("no starting triangle provided and no quadtree available"); 4065 4066 /*Call NearestVertex*/ 4067 BamgVertex *a = quadtree->NearestVertex(B.x,B.y) ; 4068 4069 /*Check output (Vertex a)*/ 4070 if (!a) _error_("problem while trying to find nearest vertex from a given point. No output found"); 4071 if (!a->t) _error_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)"); 4072 _assert_(a>=vertices && a<vertices+nbv); 4073 4074 /*Get starting triangle*/ 4075 t = a->t; 4076 _assert_(t>=triangles && t<triangles+nbt); 4077 } 4078 4079 Icoor2 detop ; 4080 4081 /*initialize number of test triangle*/ 4082 counter=0; 4083 4084 /*The initial triangle might be outside*/ 4085 while (t->det < 0){ 4086 4087 /*Get a real vertex from this triangle (k0)*/ 4088 int k0=(*t)(0)?(((*t)(1)?((*t)(2)?-1:2):1)):0; 4089 _assert_(k0>=0);// k0 the NULL vertex 4090 int k1=NextVertex[k0],k2=PreviousVertex[k0]; 4091 det3[k0]=det(B,(*t)[k1],(*t)[k2]); 4092 det3[k1]=det3[k2]=-1; 4093 if (det3[k0] > 0) // outside B 4094 return t; 4095 t = t->TriangleAdj(OppositeEdge[k0]); 4096 counter++; 4097 _assert_(counter<2); 4098 } 4099 4100 jj=0; 4101 detop = det(*(*t)(VerticesOfTriangularEdge[jj][0]),*(*t)(VerticesOfTriangularEdge[jj][1]),B); 4102 4103 while(t->det>0){ 4104 4105 /*Increase counter*/ 4106 if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = " << counter << ")."); 4107 4108 j= OppositeVertex[jj]; 4109 det3[j] = detop; //det(*b,*s1,*s2); 4110 jn = NextVertex[j]; 4111 jp = PreviousVertex[j]; 4112 det3[jp]= det(*(*t)(j),*(*t)(jn),B); 4113 det3[jn] = t->det-det3[j] -det3[jp]; 4114 4115 // count the number k of det3 <0 4116 int k=0,ii[3]; 4117 if (det3[0] < 0 ) ii[k++]=0; 4118 if (det3[1] < 0 ) ii[k++]=1; 4119 if (det3[2] < 0 ) ii[k++]=2; 4120 // 0 => ok 4121 // 1 => go in way 1 4122 // 2 => two way go in way 1 or 2 randomly 4123 4124 if (k==0) break; 4125 if (k==2 && BinaryRand()) Exchange(ii[0],ii[1]); 4126 _assert_(k<3); 4127 AdjacentTriangle t1 = t->Adj(jj=ii[0]); 4128 if ((t1.det() < 0 ) && (k == 2)) 4129 t1 = t->Adj(jj=ii[1]); 4130 t=t1; 4131 j=t1;// for optimisation we now the -det[OppositeVertex[j]]; 4132 detop = -det3[OppositeVertex[jj]]; 4133 jj = j; 4134 } 4135 4136 if (t->det<0) // outside triangle 4137 det3[0]=det3[1]=det3[2]=-1,det3[OppositeVertex[jj]]=detop; 4138 return t; 4139 } 4140 /*}}}*/ 4141 /*FUNCTION Mesh::TriangleIntNumbering{{{*/ 4142 void Mesh::TriangleIntNumbering(long* renumbering){ 4143 4144 long num=0; 4145 for (int i=0;i<nbt;i++){ 4146 if (triangles[i].det>0) renumbering[i]=num++; 4147 else renumbering[i]=-1; 4148 } 4149 return; 4150 } 4151 /*}}}*/ 4152 /*FUNCTION Mesh::TriangleReferenceList{{{*/ 4153 long Mesh::TriangleReferenceList(long* reft) const { 4154 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ConsRefTriangle)*/ 4155 4156 Triangle *t0,*t; 4157 long k=0, num; 4158 4159 //initialize all triangles as -1 (outside) 4160 for (int it=0;it<nbt;it++) reft[it]=-1; 4161 4162 //loop over all subdomains 4163 for (int i=0;i<nbsubdomains;i++){ 4164 4165 //first triangle of the subdomain i 4166 t=t0=subdomains[i].head; 4167 4168 //check that the subdomain is not empty 4169 if (!t0){ _error_("At least one subdomain is empty");} 4170 4171 //loop 4172 do{ 4173 k++; 4174 4175 //get current triangle number 4176 num = GetId(t); 4177 4178 //check that num is in [0 nbt[ 4179 _assert_(num>=0 && num<nbt); 4180 4181 //reft of this triangle is the subdomain number 4182 reft[num]=i; 4183 4184 } while (t0 != (t=t->link)); 4185 //stop when all triangles of subdomains have been tagged 4186 4187 } 4188 return k; 4189 } 4190 /*}}}*/ 4191 /*FUNCTION Mesh::Triangulate{{{*/ 4192 void Mesh::Triangulate(double* x,double* y,int nods){ 4193 4194 int verbose=0; 4195 int i; 4196 Metric M1(1); 4197 4198 /*Initialize mesh*/ 4199 Init(nods);//this resets nbv to 0 4200 nbv=nods; 4201 4202 //Vertices 4203 if(verbose) _printf_("Reading vertices (" << nbv << ")\n"); 4204 for(i=0;i<nbv;i++){ 4205 vertices[i].r.x=x[i]; 4206 vertices[i].r.y=y[i]; 4207 vertices[i].ReferenceNumber=1; 4208 vertices[i].DirOfSearch =NoDirOfSearch; 4209 vertices[i].m=M1; 4210 vertices[i].color=0; 4211 } 4212 maxnbt=2*maxnbv-2; // for filling The Holes and quadrilaterals 4213 4214 /*Insert Vertices*/ 4215 Insert(true); 4216 } 4217 /*}}}*/ 4218 /*FUNCTION Mesh::TriangulateFromGeom0{{{*/ 4219 void Mesh::TriangulateFromGeom0(BamgOpts* bamgopts){ 3948 } 3949 } 3950 } 3951 CreateSingleVertexToTriangleConnectivity(); 3952 if (nbvold!=nbv){ 3953 long iv = nbvold; 3954 long NbSwap = 0; 3955 Icoor2 det3[3]; 3956 for (int i=nbvold;i<nbv;i++) {// for all the new point 3957 BamgVertex & vi = vertices[i]; 3958 vi.i = R2ToI2(vi.r); 3959 vi.r = I2ToR2(vi.i); 3960 3961 // a good new point 3962 vi.ReferenceNumber=0; 3963 vi.DirOfSearch =NoDirOfSearch; 3964 Triangle *tcvi = TriangleFindFromCoord(vi.i,det3); 3965 if (tcvi && !tcvi->link) { 3966 _printf_("problem inserting point in SplitInternalEdgeWithBorderVertices (tcvj && !tcvj->link)\n"); 3967 } 3968 3969 quadtree->Add(vi); 3970 if (!tcvi || tcvi->det<0){// internal 3971 _error_("!tcvi || tcvi->det < 0"); 3972 } 3973 AddVertex(vi,tcvi,det3); 3974 NbSwap += vi.Optim(1); 3975 iv++; 3976 } 3977 if (verbose>3) { 3978 _printf_(" number of points: " << iv << "\n"); 3979 _printf_(" number of swap to split internal edges with border vertices: " << NbSwap << "\n"); 3980 nbv = iv; 3981 } 3982 } 3983 if (NbSplitEdge>nbv-nbvold) _printf_("WARNING: not enough vertices to split all internal edges, we lost " << NbSplitEdge - ( nbv-nbvold) << " edges...\n"); 3984 if (verbose>2) _printf_("SplitInternalEdgeWithBorderVertices: Number of splited edge " << NbSplitEdge << "\n"); 3985 3986 return NbSplitEdge; 3987 } 3988 /*}}}*/ 3989 I2 Mesh::R2ToI2(const R2 & P) const {/*{{{*/ 3990 return I2( (Icoor1) (coefIcoor*(P.x-pmin.x)),(Icoor1) (coefIcoor*(P.y-pmin.y)) ); 3991 } 3992 /*}}}*/ 3993 R2 Mesh::I2ToR2(const I2 & P) const {/*{{{*/ 3994 return R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y); 3995 } 3996 /*}}}*/ 3997 Triangle * Mesh::TriangleFindFromCoord(const I2 & B,Icoor2 det3[3], Triangle *tstart) const {/*{{{*/ 3998 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindTriangleContening)*/ 3999 4000 Triangle * t=0; 4001 int j,jp,jn,jj; 4002 int counter; 4003 4004 /*Get starting triangle. Take tsart if provided*/ 4005 if (tstart) t=tstart; 4006 4007 /*Else find the closest Triangle using the quadtree*/ 4008 else { 4009 4010 /*Check that the quadtree does exist*/ 4011 if (!quadtree) _error_("no starting triangle provided and no quadtree available"); 4012 4013 /*Call NearestVertex*/ 4014 BamgVertex *a = quadtree->NearestVertex(B.x,B.y) ; 4015 4016 /*Check output (Vertex a)*/ 4017 if (!a) _error_("problem while trying to find nearest vertex from a given point. No output found"); 4018 if (!a->t) _error_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)"); 4019 _assert_(a>=vertices && a<vertices+nbv); 4020 4021 /*Get starting triangle*/ 4022 t = a->t; 4023 _assert_(t>=triangles && t<triangles+nbt); 4024 } 4025 4026 Icoor2 detop ; 4027 4028 /*initialize number of test triangle*/ 4029 counter=0; 4030 4031 /*The initial triangle might be outside*/ 4032 while (t->det < 0){ 4033 4034 /*Get a real vertex from this triangle (k0)*/ 4035 int k0=(*t)(0)?(((*t)(1)?((*t)(2)?-1:2):1)):0; 4036 _assert_(k0>=0);// k0 the NULL vertex 4037 int k1=NextVertex[k0],k2=PreviousVertex[k0]; 4038 det3[k0]=det(B,(*t)[k1],(*t)[k2]); 4039 det3[k1]=det3[k2]=-1; 4040 if (det3[k0] > 0) // outside B 4041 return t; 4042 t = t->TriangleAdj(OppositeEdge[k0]); 4043 counter++; 4044 _assert_(counter<2); 4045 } 4046 4047 jj=0; 4048 detop = det(*(*t)(VerticesOfTriangularEdge[jj][0]),*(*t)(VerticesOfTriangularEdge[jj][1]),B); 4049 4050 while(t->det>0){ 4051 4052 /*Increase counter*/ 4053 if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = " << counter << ")."); 4054 4055 j= OppositeVertex[jj]; 4056 det3[j] = detop; //det(*b,*s1,*s2); 4057 jn = NextVertex[j]; 4058 jp = PreviousVertex[j]; 4059 det3[jp]= det(*(*t)(j),*(*t)(jn),B); 4060 det3[jn] = t->det-det3[j] -det3[jp]; 4061 4062 // count the number k of det3 <0 4063 int k=0,ii[3]; 4064 if (det3[0] < 0 ) ii[k++]=0; 4065 if (det3[1] < 0 ) ii[k++]=1; 4066 if (det3[2] < 0 ) ii[k++]=2; 4067 // 0 => ok 4068 // 1 => go in way 1 4069 // 2 => two way go in way 1 or 2 randomly 4070 4071 if (k==0) break; 4072 if (k==2 && BinaryRand()) Exchange(ii[0],ii[1]); 4073 _assert_(k<3); 4074 AdjacentTriangle t1 = t->Adj(jj=ii[0]); 4075 if ((t1.det() < 0 ) && (k == 2)) 4076 t1 = t->Adj(jj=ii[1]); 4077 t=t1; 4078 j=t1;// for optimisation we now the -det[OppositeVertex[j]]; 4079 detop = -det3[OppositeVertex[jj]]; 4080 jj = j; 4081 } 4082 4083 if (t->det<0) // outside triangle 4084 det3[0]=det3[1]=det3[2]=-1,det3[OppositeVertex[jj]]=detop; 4085 return t; 4086 } 4087 /*}}}*/ 4088 void Mesh::TriangleIntNumbering(long* renumbering){/*{{{*/ 4089 4090 long num=0; 4091 for (int i=0;i<nbt;i++){ 4092 if (triangles[i].det>0) renumbering[i]=num++; 4093 else renumbering[i]=-1; 4094 } 4095 return; 4096 } 4097 /*}}}*/ 4098 long Mesh::TriangleReferenceList(long* reft) const {/*{{{*/ 4099 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ConsRefTriangle)*/ 4100 4101 Triangle *t0,*t; 4102 long k=0, num; 4103 4104 //initialize all triangles as -1 (outside) 4105 for (int it=0;it<nbt;it++) reft[it]=-1; 4106 4107 //loop over all subdomains 4108 for (int i=0;i<nbsubdomains;i++){ 4109 4110 //first triangle of the subdomain i 4111 t=t0=subdomains[i].head; 4112 4113 //check that the subdomain is not empty 4114 if (!t0){ _error_("At least one subdomain is empty");} 4115 4116 //loop 4117 do{ 4118 k++; 4119 4120 //get current triangle number 4121 num = GetId(t); 4122 4123 //check that num is in [0 nbt[ 4124 _assert_(num>=0 && num<nbt); 4125 4126 //reft of this triangle is the subdomain number 4127 reft[num]=i; 4128 4129 } while (t0 != (t=t->link)); 4130 //stop when all triangles of subdomains have been tagged 4131 4132 } 4133 return k; 4134 } 4135 /*}}}*/ 4136 void Mesh::Triangulate(double* x,double* y,int nods){/*{{{*/ 4137 4138 int verbose=0; 4139 int i; 4140 Metric M1(1); 4141 4142 /*Initialize mesh*/ 4143 Init(nods);//this resets nbv to 0 4144 nbv=nods; 4145 4146 //Vertices 4147 if(verbose) _printf_("Reading vertices (" << nbv << ")\n"); 4148 for(i=0;i<nbv;i++){ 4149 vertices[i].r.x=x[i]; 4150 vertices[i].r.y=y[i]; 4151 vertices[i].ReferenceNumber=1; 4152 vertices[i].DirOfSearch =NoDirOfSearch; 4153 vertices[i].m=M1; 4154 vertices[i].color=0; 4155 } 4156 maxnbt=2*maxnbv-2; // for filling The Holes and quadrilaterals 4157 4158 /*Insert Vertices*/ 4159 Insert(true); 4160 } 4161 /*}}}*/ 4162 void Mesh::TriangulateFromGeom0(BamgOpts* bamgopts){/*{{{*/ 4220 4163 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/GeomToTriangles0)*/ 4221 4164 /*Generate mesh from geometry*/ … … 4531 4474 } 4532 4475 /*}}}*/ 4533 /*FUNCTION Mesh::TriangulateFromGeom1{{{*/ 4534 void Mesh::TriangulateFromGeom1(BamgOpts* bamgopts,int KeepVertices){ 4476 void Mesh::TriangulateFromGeom1(BamgOpts* bamgopts,int KeepVertices){ /*{{{*/ 4535 4477 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/GeomToTriangles1)*/ 4536 4478 … … 4566 4508 4567 4509 /* There are 2 ways to make the loop 4568 * 1) on the geometry4569 * 2) on the background mesh4570 * if you do the loop on geometry, we don't have the pointeur on background,4571 * and if you do the loop in background we have the pointeur on geometry4572 * so do the walk on background */4510 * 1) on the geometry 4511 * 2) on the background mesh 4512 * if you do the loop on geometry, we don't have the pointeur on background, 4513 * and if you do the loop in background we have the pointeur on geometry 4514 * so do the walk on background */ 4573 4515 4574 4516 NbVerticesOnGeomVertex=0; … … 4861 4803 4862 4804 /*Intermediary*/ 4863 /*FUNCTION CloseBoundaryEdge{{{*/ 4864 AdjacentTriangle CloseBoundaryEdge(I2 A,Triangle *t, double &a,double &b) { 4805 AdjacentTriangle CloseBoundaryEdge(I2 A,Triangle *t, double &a,double &b) {/*{{{*/ 4865 4806 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/CloseBoundaryEdge)*/ 4866 4807 … … 4898 4839 b= IJ_IA/IJ2; 4899 4840 return edge; 4900 } 4901 } 4902 /*}}}*/ 4903 /*FUNCTION ForceEdge{{{*/ 4904 int ForceEdge(BamgVertex &a, BamgVertex & b,AdjacentTriangle & taret) { 4905 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceEdge)*/ 4906 4907 int NbSwap =0; 4908 if (!a.t || !b.t){ // the 2 vertex is in a mesh 4909 _error_("!a.t || !b.t"); 4910 } 4911 int k=0; 4912 taret=AdjacentTriangle(0,0); // erreur 4913 4914 AdjacentTriangle tta(a.t,EdgesVertexTriangle[a.IndexInTriangle][0]); 4915 BamgVertex *v1, *v2 = tta.EdgeVertex(0),*vbegin =v2; 4916 // we turn around a in the direct direction 4917 4918 Icoor2 det2 = v2 ? det(*v2,a,b): -1 , det1; 4919 if(v2) // normal case 4920 det2 = det(*v2,a,b); 4921 else { // no chance infini vertex try the next 4922 tta= Previous(Adj(tta)); 4923 v2 = tta.EdgeVertex(0); 4924 vbegin =v2; 4925 if (!v2){ 4926 _error_("!v2"); 4927 } 4928 det2 = det(*v2,a,b); 4929 } 4930 4931 while (v2 != &b) { 4932 AdjacentTriangle tc = Previous(Adj(tta)); 4933 v1 = v2; 4934 v2 = tc.EdgeVertex(0); 4935 det1 = det2; 4936 det2 = v2 ? det(*v2,a,b): det2; 4937 4938 if((det1 < 0) && (det2 >0)) { 4939 // try to force the edge 4940 BamgVertex * va = &a, *vb = &b; 4941 tc = Previous(tc); 4942 if (!v1 || !v2){ 4943 _error_("!v1 || !v2"); 4944 } 4945 Icoor2 detss = 0,l=0; 4946 while ((SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 4947 if(l++ > 10000000) { 4948 _error_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big"); 4949 } 4950 BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); 4951 if (((aa == &a ) && (bb == &b)) ||((bb == &a ) && (aa == &b))){ 4952 tc.SetLock(); 4953 a.Optim(1,0); 4954 b.Optim(1,0); 4955 taret = tc; 4956 return NbSwap; 4957 } 4958 else 4959 { 4960 taret = tc; 4961 return -2; // error boundary is crossing 4962 } 4963 } 4964 tta = tc; 4965 k++; 4966 if (k>=2000){ 4967 _error_("k>=2000"); 4968 } 4969 if ( vbegin == v2 ) return -1;// error 4970 } 4971 4972 tta.SetLock(); 4973 taret=tta; 4974 a.Optim(1,0); 4975 b.Optim(1,0); 4976 return NbSwap; 4977 } 4978 /*}}}*/ 4979 /*FUNCTION swap{{{*/ 4980 void swap(Triangle *t1,short a1, Triangle *t2,short a2, BamgVertex *s1,BamgVertex *s2,Icoor2 det1,Icoor2 det2){ 4981 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/swap)*/ 4982 // -------------------------------------------------------------- 4983 // short a2=aa[a];// les 2 numero de l arete dans les 2 triangles 4984 // 4985 // sb sb 4986 // / | \ / \ ! 4987 // as1/ | \ /a2 \ ! 4988 // / | \ / t2 \ ! 4989 // s1 /t1 | t2 \s2 --> s1 /___as2___\s2 ! 4990 // \ a1|a2 / \ as1 / 4991 // \ | / \ t1 / 4992 // \ | / as2 \ a1/ 4993 // \ | / \ / 4994 // sa sa 4995 // ------------------------------------------------------------- 4996 int as1 = NextEdge[a1]; 4997 int as2 = NextEdge[a2]; 4998 int ap1 = PreviousEdge[a1]; 4999 int ap2 = PreviousEdge[a2]; 5000 (*t1)(VerticesOfTriangularEdge[a1][1]) = s2 ; // avant sb 5001 (*t2)(VerticesOfTriangularEdge[a2][1]) = s1 ; // avant sa 5002 // mise a jour des 2 adjacences externes 5003 AdjacentTriangle taas1 = t1->Adj(as1), 5004 taas2 = t2->Adj(as2), 5005 tas1(t1,as1), tas2(t2,as2), 5006 ta1(t1,a1),ta2(t2,a2); 5007 // externe haut gauche 5008 taas1.SetAdj2(ta2, taas1.GetAllFlag_UnSwap()); 5009 // externe bas droite 5010 taas2.SetAdj2(ta1, taas2.GetAllFlag_UnSwap()); 5011 // remove the Mark UnMarkSwap 5012 t1->SetUnMarkUnSwap(ap1); 5013 t2->SetUnMarkUnSwap(ap2); 5014 // interne 5015 tas1.SetAdj2(tas2); 5016 5017 t1->det = det1; 5018 t2->det = det2; 5019 5020 t1->SetSingleVertexToTriangleConnectivity(); 5021 t2->SetSingleVertexToTriangleConnectivity(); 5022 } // end swap 5023 /*}}}*/ 5024 /*FUNCTION SwapForForcingEdge{{{*/ 5025 int SwapForForcingEdge(BamgVertex * & pva ,BamgVertex * & pvb ,AdjacentTriangle & tt1,Icoor2 & dets1, Icoor2 & detsa,Icoor2 & detsb, int & NbSwap) { 4841 } 4842 } 4843 /*}}}*/ 4844 int ForceEdge(BamgVertex &a, BamgVertex & b,AdjacentTriangle & taret) { /*{{{*/ 4845 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceEdge)*/ 4846 4847 int NbSwap =0; 4848 if (!a.t || !b.t){ // the 2 vertex is in a mesh 4849 _error_("!a.t || !b.t"); 4850 } 4851 int k=0; 4852 taret=AdjacentTriangle(0,0); // erreur 4853 4854 AdjacentTriangle tta(a.t,EdgesVertexTriangle[a.IndexInTriangle][0]); 4855 BamgVertex *v1, *v2 = tta.EdgeVertex(0),*vbegin =v2; 4856 // we turn around a in the direct direction 4857 4858 Icoor2 det2 = v2 ? det(*v2,a,b): -1 , det1; 4859 if(v2) // normal case 4860 det2 = det(*v2,a,b); 4861 else { // no chance infini vertex try the next 4862 tta= Previous(Adj(tta)); 4863 v2 = tta.EdgeVertex(0); 4864 vbegin =v2; 4865 if (!v2){ 4866 _error_("!v2"); 4867 } 4868 det2 = det(*v2,a,b); 4869 } 4870 4871 while (v2 != &b) { 4872 AdjacentTriangle tc = Previous(Adj(tta)); 4873 v1 = v2; 4874 v2 = tc.EdgeVertex(0); 4875 det1 = det2; 4876 det2 = v2 ? det(*v2,a,b): det2; 4877 4878 if((det1 < 0) && (det2 >0)) { 4879 // try to force the edge 4880 BamgVertex * va = &a, *vb = &b; 4881 tc = Previous(tc); 4882 if (!v1 || !v2){ 4883 _error_("!v1 || !v2"); 4884 } 4885 Icoor2 detss = 0,l=0; 4886 while ((SwapForForcingEdge( va, vb, tc, detss, det1,det2,NbSwap))) 4887 if(l++ > 10000000) { 4888 _error_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big"); 4889 } 4890 BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1); 4891 if (((aa == &a ) && (bb == &b)) ||((bb == &a ) && (aa == &b))){ 4892 tc.SetLock(); 4893 a.Optim(1,0); 4894 b.Optim(1,0); 4895 taret = tc; 4896 return NbSwap; 4897 } 4898 else 4899 { 4900 taret = tc; 4901 return -2; // error boundary is crossing 4902 } 4903 } 4904 tta = tc; 4905 k++; 4906 if (k>=2000){ 4907 _error_("k>=2000"); 4908 } 4909 if ( vbegin == v2 ) return -1;// error 4910 } 4911 4912 tta.SetLock(); 4913 taret=tta; 4914 a.Optim(1,0); 4915 b.Optim(1,0); 4916 return NbSwap; 4917 } 4918 /*}}}*/ 4919 void swap(Triangle *t1,short a1, Triangle *t2,short a2, BamgVertex *s1,BamgVertex *s2,Icoor2 det1,Icoor2 det2){ /*{{{*/ 4920 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/swap)*/ 4921 // -------------------------------------------------------------- 4922 // short a2=aa[a];// les 2 numero de l arete dans les 2 triangles 4923 // 4924 // sb sb 4925 // / | \ / \ ! 4926 // as1/ | \ /a2 \ ! 4927 // / | \ / t2 \ ! 4928 // s1 /t1 | t2 \s2 --> s1 /___as2___\s2 ! 4929 // \ a1|a2 / \ as1 / 4930 // \ | / \ t1 / 4931 // \ | / as2 \ a1/ 4932 // \ | / \ / 4933 // sa sa 4934 // ------------------------------------------------------------- 4935 int as1 = NextEdge[a1]; 4936 int as2 = NextEdge[a2]; 4937 int ap1 = PreviousEdge[a1]; 4938 int ap2 = PreviousEdge[a2]; 4939 (*t1)(VerticesOfTriangularEdge[a1][1]) = s2 ; // avant sb 4940 (*t2)(VerticesOfTriangularEdge[a2][1]) = s1 ; // avant sa 4941 // mise a jour des 2 adjacences externes 4942 AdjacentTriangle taas1 = t1->Adj(as1), 4943 taas2 = t2->Adj(as2), 4944 tas1(t1,as1), tas2(t2,as2), 4945 ta1(t1,a1),ta2(t2,a2); 4946 // externe haut gauche 4947 taas1.SetAdj2(ta2, taas1.GetAllFlag_UnSwap()); 4948 // externe bas droite 4949 taas2.SetAdj2(ta1, taas2.GetAllFlag_UnSwap()); 4950 // remove the Mark UnMarkSwap 4951 t1->SetUnMarkUnSwap(ap1); 4952 t2->SetUnMarkUnSwap(ap2); 4953 // interne 4954 tas1.SetAdj2(tas2); 4955 4956 t1->det = det1; 4957 t2->det = det2; 4958 4959 t1->SetSingleVertexToTriangleConnectivity(); 4960 t2->SetSingleVertexToTriangleConnectivity(); 4961 } // end swap 4962 /*}}}*/ 4963 int SwapForForcingEdge(BamgVertex * & pva ,BamgVertex * & pvb ,AdjacentTriangle & tt1,Icoor2 & dets1, Icoor2 & detsa,Icoor2 & detsb, int & NbSwap) {/*{{{*/ 5026 4964 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SwapForForcingEdge)*/ 5027 4965 // l'arete ta coupe l'arete pva pvb … … 5092 5030 5093 5031 if(ToSwap){ 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5032 if (dets2 < 0) {// haut 5033 dets1 = (ToSwap ? dets1 : detsa) ; 5034 detsa = dets2; 5035 tt1 = Previous(tt2) ;} 5036 else if(dets2 > 0){// bas 5037 dets1 = (ToSwap ? dets1 : detsb) ; 5038 detsb = dets2; 5039 if(!ToSwap) tt1 = Next(tt2); 5040 } 5041 else {// on a fin ??? 5042 tt1 = Next(tt2); 5043 ret =0;} 5106 5044 } 5107 5045 … … 5110 5048 } 5111 5049 /*}}}*/ 5112 5113 5050 } -
issm/trunk-jpl/src/c/bamg/Metric.cpp
r15104 r18064 13 13 14 14 /*Constructor/Destructor*/ 15 /*FUNCTION Metric::Metric(double a){{{*/ 16 Metric::Metric(double a): a11(1/(a*a)),a21(0),a22(1/(a*a)){ 15 Metric::Metric(double a): a11(1/(a*a)),a21(0),a22(1/(a*a)){/*{{{*/ 17 16 18 17 }/*}}}*/ 19 /*FUNCTION Metric::Metric(double a,double b,double c){{{*/ 20 Metric::Metric(double a,double b,double c) :a11(a),a21(b),a22(c){ 18 Metric::Metric(double a,double b,double c) :a11(a),a21(b),a22(c){/*{{{*/ 21 19 22 20 }/*}}}*/ 23 /*FUNCTION Metric::Metric(const double a[3],const Metric& m0, const Metric& m1,const Metric& m2 ){{{*/ 24 Metric::Metric(const double a[3],const Metric& m0, const Metric& m1,const Metric& m2 ){ 21 Metric::Metric(const double a[3],const Metric& m0, const Metric& m1,const Metric& m2 ){/*{{{*/ 25 22 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/Metric)*/ 26 23 … … 42 39 } 43 40 /*}}}*/ 44 /*FUNCTION Metric::Metric(double a,const Metric& ma, double b,const Metric& mb){{{*/ 45 Metric::Metric(double a,const Metric& ma, double b,const Metric& mb) { 41 Metric::Metric(double a,const Metric& ma, double b,const Metric& mb) { /*{{{*/ 46 42 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/EigenMetric)*/ 47 43 … … 64 60 65 61 /*Methods*/ 66 /*FUNCTION Metric::det{{{*/ 67 double Metric::det() const { 62 double Metric::det() const {/*{{{*/ 68 63 return a11*a22-a21*a21; 69 64 } /*}}}*/ 70 /*FUNCTION Metric::Echo {{{*/ 71 void Metric::Echo(void){ 65 void Metric::Echo(void){/*{{{*/ 72 66 73 67 _printf_("Metric:\n"); … … 77 71 } 78 72 /*}}}*/ 79 /*FUNCTION Metric::IntersectWith{{{*/ 80 int Metric::IntersectWith(const Metric& M2) { 73 int Metric::IntersectWith(const Metric& M2) {/*{{{*/ 81 74 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectWith)*/ 82 75 … … 130 123 } 131 124 /*}}}*/ 132 /*FUNCTION Metric::mul{{{*/ 133 R2 Metric::mul(const R2 x)const { 125 R2 Metric::mul(const R2 x)const {/*{{{*/ 134 126 return R2(a11*x.x+a21*x.y,a21*x.x+a22*x.y); 135 127 }/*}}}*/ 136 128 137 129 /*Intermediary*/ 138 /*FUNCTION LengthInterpole{{{*/ 139 double LengthInterpole(const Metric& Ma,const Metric& Mb, R2 AB) { 130 double LengthInterpole(const Metric& Ma,const Metric& Mb, R2 AB) {/*{{{*/ 140 131 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/LengthInterpole)*/ 141 132 … … 204 195 } 205 196 /*}}}*/ 206 /*FUNCTION SimultaneousMatrixReduction{{{*/ 207 void SimultaneousMatrixReduction( Metric M1, Metric M2, D2xD2 &V) { 197 void SimultaneousMatrixReduction( Metric M1, Metric M2, D2xD2 &V) {/*{{{*/ 208 198 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/ReductionSimultanee)*/ 209 199 … … 307 297 } 308 298 /*}}}*/ 309 /*FUNCTION abscisseInterpole{{{*/ 310 double abscisseInterpole(const Metric& Ma,const Metric& Mb, R2 AB,double s,int optim) { 299 double abscisseInterpole(const Metric& Ma,const Metric& Mb, R2 AB,double s,int optim) { /*{{{*/ 311 300 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/abscisseInterpole)*/ 312 301 -
issm/trunk-jpl/src/c/bamg/SetOfE4.cpp
r16228 r18064 5 5 6 6 /*Constructor*/ 7 /*FUNCTION SetOfEdges4::SetOfEdges4(long mmx,long nnx){{{*/ 8 SetOfEdges4::SetOfEdges4(long mmx,long nnx){ 7 SetOfEdges4::SetOfEdges4(long mmx,long nnx){/*{{{*/ 9 8 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/SetOfEdges4)*/ 10 9 … … 26 25 27 26 /*Methods*/ 28 /*FUNCTION SetOfEdges4::add{{{*/ 29 long SetOfEdges4::add(long ii,long jj) { 27 long SetOfEdges4::add(long ii,long jj) {/*{{{*/ 30 28 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/add)*/ 31 29 … … 61 59 } 62 60 /*}}}*/ 63 /*FUNCTION SetOfEdges4::find {{{*/ 64 long SetOfEdges4::find(long ii,long jj) { 61 long SetOfEdges4::find(long ii,long jj) { /*{{{*/ 65 62 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/find)*/ 66 63 … … 88 85 } 89 86 /*}}}*/ 90 /*FUNCTION SetOfEdges4::i{{{*/ 91 long SetOfEdges4::i(long k){ 87 long SetOfEdges4::i(long k){/*{{{*/ 92 88 return Edges[k].i; 93 89 } 94 90 /*}}}*/ 95 /*FUNCTION SetOfEdges4::j{{{*/ 96 long SetOfEdges4::j(long k){ 91 long SetOfEdges4::j(long k){/*{{{*/ 97 92 return Edges[k].j; 98 93 } 99 94 /*}}}*/ 100 /*FUNCTION SetOfEdges4::nb{{{*/ 101 long SetOfEdges4::nb(){ 95 long SetOfEdges4::nb(){/*{{{*/ 102 96 return NbOfEdges; 103 97 } 104 98 /*}}}*/ 105 /*FUNCTION SetOfEdges4::SortAndAdd{{{*/ 106 long SetOfEdges4::SortAndAdd (long ii,long jj) { 99 long SetOfEdges4::SortAndAdd (long ii,long jj) {/*{{{*/ 107 100 return ii <=jj ? add (ii,jj) : add (jj,ii) ; 108 101 } 109 102 /*}}}*/ 110 /*FUNCTION SetOfEdges4::SortAndFind{{{*/ 111 long SetOfEdges4::SortAndFind (long ii,long jj) { 103 long SetOfEdges4::SortAndFind (long ii,long jj) {/*{{{*/ 112 104 return ii <=jj ? find (ii,jj) : find (jj,ii) ; 113 105 } -
issm/trunk-jpl/src/c/bamg/SubDomain.cpp
r16546 r18064 12 12 13 13 /*Methods*/ 14 /*FUNCTION SubDomain::Set {{{*/ 15 void SubDomain::Set(const Mesh & Th ,long i,Mesh & ThNew){ 14 void SubDomain::Set(const Mesh & Th ,long i,Mesh & ThNew){/*{{{*/ 16 15 *this = Th.subdomains[i]; 17 16 if( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){ -
issm/trunk-jpl/src/c/bamg/Triangle.cpp
r17507 r18064 11 11 12 12 /*Constructors/Destructors*/ 13 /*FUNCTION Triangle(){{{*/ 14 Triangle::Triangle(void){ 15 16 } 17 /*}}}*/ 18 /*FUNCTION Triangle(Mesh *Th,long i,long j,long k) {{{*/ 19 Triangle::Triangle(Mesh *Th,long i,long j,long k) { 13 Triangle::Triangle(void){/*{{{*/ 14 15 } 16 /*}}}*/ 17 Triangle::Triangle(Mesh *Th,long i,long j,long k) {/*{{{*/ 20 18 BamgVertex *v=Th->vertices; 21 19 long nbv = Th->nbv; … … 34 32 } 35 33 /*}}}*/ 36 /*FUNCTION Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2) {{{*/ 37 Triangle::Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2){ 34 Triangle::Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2){/*{{{*/ 38 35 vertices[0]=v0; 39 36 vertices[1]=v1; … … 49 46 50 47 /*Methods*/ 51 /*FUNCTION Triangle::Adj{{{*/ 52 AdjacentTriangle Triangle::Adj(int i) const { 48 AdjacentTriangle Triangle::Adj(int i) const {/*{{{*/ 53 49 return AdjacentTriangle(adj[i],AdjEdgeIndex[i]&3); 54 50 };/*}}}*/ 55 /*FUNCTION Triangle::Length{{{*/ 56 double Triangle::Length() const{ 51 double Triangle::Length() const{/*{{{*/ 57 52 58 53 double l; … … 75 70 return l; 76 71 };/*}}}*/ 77 /*FUNCTION Triangle::Echo {{{*/ 78 void Triangle::Echo(void){ 72 void Triangle::Echo(void){/*{{{*/ 79 73 80 74 int i; … … 106 100 } 107 101 /*}}}*/ 108 /*FUNCTION Triangle::GetAllflag{{{*/ 109 int Triangle::GetAllflag(int a){ 102 int Triangle::GetAllflag(int a){/*{{{*/ 110 103 return AdjEdgeIndex[a] & 1020; 111 104 }/*}}}*/ 112 /*FUNCTION Triangle::Hidden{{{*/ 113 int Triangle::Hidden(int a)const { 105 int Triangle::Hidden(int a)const {/*{{{*/ 114 106 return AdjEdgeIndex[a]&16; 115 107 } /*}}}*/ 116 /*FUNCTION Triangle::Locked{{{*/ 117 int Triangle::Locked(int a)const { 108 int Triangle::Locked(int a)const {/*{{{*/ 118 109 return AdjEdgeIndex[a]&4; 119 110 } /*}}}*/ 120 /*FUNCTION Triangle::NuEdgeTriangleAdj{{{*/ 121 short Triangle::NuEdgeTriangleAdj(int i) const { 111 short Triangle::NuEdgeTriangleAdj(int i) const {/*{{{*/ 122 112 /*Number of the adjacent edge in adj tria (make sure it is between 0 and 2*/ 123 113 return AdjEdgeIndex[i&3]&3; 124 114 }/*}}}*/ 125 /*FUNCTION Triangle::Optim{{{*/ 126 long Triangle::Optim(short i,int koption) { 115 long Triangle::Optim(short i,int koption) {/*{{{*/ 127 116 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Optim)*/ 128 117 … … 156 145 } 157 146 /*}}}*/ 158 /*FUNCTION Triangle::Quadrangle {{{*/ 159 Triangle* Triangle::Quadrangle(BamgVertex * & v0,BamgVertex * & v1,BamgVertex * & v2,BamgVertex * & v3) const{ 147 Triangle* Triangle::Quadrangle(BamgVertex * & v0,BamgVertex * & v1,BamgVertex * & v2,BamgVertex * & v3) const{/*{{{*/ 160 148 // return the other triangle of the quad if a quad or 0 if not a quat 161 149 Triangle * t =0; … … 177 165 } 178 166 /*}}}*/ 179 /*FUNCTION Triangle::QualityQuad {{{*/ 180 double Triangle::QualityQuad(int a,int option) const{ 167 double Triangle::QualityQuad(int a,int option) const{/*{{{*/ 181 168 double q; 182 169 if (!link || AdjEdgeIndex[a] &4) … … 200 187 } 201 188 /*}}}*/ 202 /*FUNCTION Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){{{*/ 203 void Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){ 189 void Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){/*{{{*/ 204 190 205 191 if (link >=tb && link <te) link = tb + renu[link -tb]; … … 208 194 if (adj[2] >=tb && adj[2] <te) adj[2] = tb + renu[adj[2]-tb]; 209 195 }/*}}}*/ 210 /*FUNCTION Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){{{*/ 211 void Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){ 196 void Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){/*{{{*/ 212 197 if (vertices[0] >=vb && vertices[0] <ve) vertices[0] = vb + renu[vertices[0]-vb]; 213 198 if (vertices[1] >=vb && vertices[1] <ve) vertices[1] = vb + renu[vertices[1]-vb]; 214 199 if (vertices[2] >=vb && vertices[2] <ve) vertices[2] = vb + renu[vertices[2]-vb]; 215 200 }/*}}}*/ 216 /*FUNCTION Triangle::Set {{{*/ 217 void Triangle::Set(const Triangle & rec,const Mesh & Th ,Mesh & ThNew){ 201 void Triangle::Set(const Triangle & rec,const Mesh & Th ,Mesh & ThNew){ /*{{{*/ 218 202 *this = rec; 219 203 if ( vertices[0] ) vertices[0] = ThNew.vertices + Th.GetId(vertices[0]); … … 227 211 } 228 212 /*}}}*/ 229 /*FUNCTION Triangle::SetAdjAdj{{{*/ 230 void Triangle::SetAdjAdj(short a){ 213 void Triangle::SetAdjAdj(short a){/*{{{*/ 231 214 // Copy all the mark 232 215 a &= 3; … … 239 222 } 240 223 }/*}}}*/ 241 /*FUNCTION Triangle::SetAdj2{{{*/ 242 void Triangle::SetAdj2(short a,Triangle *t,short aat){ 224 void Triangle::SetAdj2(short a,Triangle *t,short aat){/*{{{*/ 243 225 /*For current triangle: 244 226 * - a is the index of the edge were the adjency is set (in [0 2]) … … 252 234 } 253 235 }/*}}}*/ 254 /*FUNCTION Triangle::SetHidden{{{*/ 255 void Triangle::SetHidden(int a){ 236 void Triangle::SetHidden(int a){/*{{{*/ 256 237 //Get Adjacent Triangle number a 257 238 Triangle* t = adj[a]; … … 261 242 AdjEdgeIndex[a] |= 16; 262 243 }/*}}}*/ 263 /*FUNCTION Triangle::SetLocked{{{*/ 264 void Triangle::SetLocked(int a){ 244 void Triangle::SetLocked(int a){/*{{{*/ 265 245 //mark the edge as on Boundary 266 246 Triangle * t = adj[a]; … … 268 248 AdjEdgeIndex[a] |= 4; 269 249 }/*}}}*/ 270 /*FUNCTION Triangle::SetMarkUnSwap{{{*/ 271 void Triangle::SetMarkUnSwap(int a){ 250 void Triangle::SetMarkUnSwap(int a){/*{{{*/ 272 251 Triangle * t = adj[a]; 273 252 t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] |=8; 274 253 AdjEdgeIndex[a] |=8 ; 275 254 }/*}}}*/ 276 /*FUNCTION Triangle::SetSingleVertexToTriangleConnectivity{{{*/ 277 void Triangle::SetSingleVertexToTriangleConnectivity() { 255 void Triangle::SetSingleVertexToTriangleConnectivity() { /*{{{*/ 278 256 if (vertices[0]) (vertices[0]->t=this,vertices[0]->IndexInTriangle=0); 279 257 if (vertices[1]) (vertices[1]->t=this,vertices[1]->IndexInTriangle=1); 280 258 if (vertices[2]) (vertices[2]->t=this,vertices[2]->IndexInTriangle=2); 281 259 }/*}}}*/ 282 /*FUNCTION Triangle::SetUnMarkUnSwap{{{*/ 283 void Triangle::SetUnMarkUnSwap(int a){ 260 void Triangle::SetUnMarkUnSwap(int a){ /*{{{*/ 284 261 Triangle * t = adj[a]; 285 262 t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] &=55; // 23 + 32 286 263 AdjEdgeIndex[a] &=55 ; 287 264 }/*}}}*/ 288 /*FUNCTION Triangle::swap{{{*/ 289 int Triangle::swap(short a,int koption){ 265 int Triangle::swap(short a,int koption){/*{{{*/ 290 266 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/swap)*/ 291 267 … … 400 376 } 401 377 /*}}}*/ 402 /*FUNCTION Triangle::TriangleAdj{{{*/ 403 Triangle* Triangle::TriangleAdj(int i) const { 378 Triangle* Triangle::TriangleAdj(int i) const {/*{{{*/ 404 379 return adj[i&3]; 405 380 }/*}}}*/ -
issm/trunk-jpl/src/c/bamg/VertexOnEdge.cpp
r12821 r18064 10 10 11 11 /*Methods*/ 12 /*FUNCTION VertexOnEdge::Set {{{*/ 13 void VertexOnEdge::Set(const Mesh & Th ,long i,Mesh & ThNew){ 12 void VertexOnEdge::Set(const Mesh & Th ,long i,Mesh & ThNew){/*{{{*/ 14 13 *this = Th.VertexOnBThEdge[i]; 15 14 v = ThNew.vertices + Th.GetId(v); 16 15 } 17 16 /*}}}*/ 18 /*FUNCTION VertexOnEdge::SetOnBTh{{{*/ 19 void VertexOnEdge::SetOnBTh(){ 17 void VertexOnEdge::SetOnBTh(){/*{{{*/ 20 18 v->BackgroundEdgeHook=this; 21 19 v->IndexInTriangle=IsVertexOnEdge; -
issm/trunk-jpl/src/c/bamg/VertexOnGeom.cpp
r16546 r18064 11 11 12 12 /*Constructors/Destructors*/ 13 /*FUNCTION VertexOnGeom::VertexOnGeom(){{{*/ 14 VertexOnGeom::VertexOnGeom(){ 13 VertexOnGeom::VertexOnGeom(){/*{{{*/ 15 14 meshvertex=NULL; 16 15 curvilincoord=0; … … 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){{{*/ 21 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){ 19 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){/*{{{*/ 22 20 meshvertex=&m; 23 21 curvilincoord=-1; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){{{*/ 28 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){ 25 VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){/*{{{*/ 29 26 meshvertex=&m; 30 27 curvilincoord=s; … … 34 31 35 32 /*Methods*/ 36 /*FUNCTION VertexOnGeom::Set {{{*/ 37 void VertexOnGeom::Set(const VertexOnGeom & rec,const Mesh & Th ,Mesh & ThNew){ 33 void VertexOnGeom::Set(const VertexOnGeom & rec,const Mesh & Th ,Mesh & ThNew){/*{{{*/ 38 34 *this = rec; 39 35 meshvertex = ThNew.vertices + Th.GetId(meshvertex); … … 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION VertexOnGeom::OnGeomVertex{{{*/ 50 int VertexOnGeom::OnGeomVertex()const{ 45 int VertexOnGeom::OnGeomVertex()const{/*{{{*/ 51 46 return this? curvilincoord <0 :0; 52 47 } 53 48 /*}}}*/ 54 /*FUNCTION VertexOnGeom::OnGeomEdge{{{*/ 55 int VertexOnGeom::OnGeomEdge() const{ 49 int VertexOnGeom::OnGeomEdge() const{/*{{{*/ 56 50 return this? curvilincoord >=0 :0; 57 51 } 58 52 /*}}}*/ 59 /*FUNCTION VertexOnGeom::IsRequiredVertex{{{*/ 60 int VertexOnGeom::IsRequiredVertex() { 53 int VertexOnGeom::IsRequiredVertex() {/*{{{*/ 61 54 return this? ((curvilincoord<0 ? (gv?gv->Required():0):0 )) : 0; 62 55 } 63 56 /*}}}*/ 64 /*FUNCTION VertexOnGeom::SetOn{{{*/ 65 void VertexOnGeom::SetOn(){ 57 void VertexOnGeom::SetOn(){/*{{{*/ 66 58 meshvertex->GeomEdgeHook=this; 67 59 meshvertex->IndexInTriangle=IsVertexOnGeom; -
issm/trunk-jpl/src/c/bamg/VertexOnVertex.cpp
r13622 r18064 10 10 11 11 /*Constructors/Destructors*/ 12 /*FUNCTION VertexOnVertex::VertexOnVertex(){{{*/ 13 VertexOnVertex::VertexOnVertex() { 12 VertexOnVertex::VertexOnVertex() {/*{{{*/ 14 13 v=NULL; 15 14 bv=NULL; 16 15 };/*}}}*/ 17 /*FUNCTION VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw){{{*/ 18 VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw) :v(w),bv(bw){ 16 VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw) :v(w),bv(bw){/*{{{*/ 19 17 20 18 }/*}}}*/ 21 19 22 20 /*Methods*/ 23 /*FUNCTION VertexOnVertex::Set{{{*/ 24 void VertexOnVertex::Set(const Mesh &Th ,long i,Mesh &ThNew) { 21 void VertexOnVertex::Set(const Mesh &Th ,long i,Mesh &ThNew) { /*{{{*/ 25 22 *this = Th.VertexOnBThVertex[i]; 26 23 v = ThNew.vertices + Th.GetId(v); 27 24 } 28 25 /*}}}*/ 29 /*FUNCTION VertexOnVertex::SetOnBTh{{{*/ 30 void VertexOnVertex::SetOnBTh(){ 26 void VertexOnVertex::SetOnBTh(){/*{{{*/ 31 27 v->BackgroundVertexHook=bv;v->IndexInTriangle=IsVertexOnVertex; 32 28 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/Constraints/Constraints.cpp
r15838 r18064 19 19 20 20 /*Numerics: */ 21 /*FUNCTION Constraints::NumberOfConstraints{{{*/ 22 int Constraints::NumberOfConstraints(void){ 21 int Constraints::NumberOfConstraints(void){/*{{{*/ 23 22 24 23 int localconstraints; -
issm/trunk-jpl/src/c/classes/Constraints/Constraints.h
r15067 r18064 16 16 17 17 /*Object constructors and destructor*/ 18 /*FUNCTION Constraints::Constraints(){{{*/ 19 Constraints(){ 18 Constraints(){/*{{{*/ 20 19 enum_type=ConstraintsEnum; 21 20 return; 22 21 } 23 22 /*}}}*/ 24 /*FUNCTION Constraints::~Constraints(){{{*/ 25 ~Constraints(){ 23 ~Constraints(){/*{{{*/ 26 24 return; 27 25 } -
issm/trunk-jpl/src/c/classes/Constraints/SpcDynamic.cpp
r17600 r18064 14 14 15 15 /*SpcDynamic constructors and destructor*/ 16 /*FUNCTION SpcDynamic::SpcDynamic(){{{*/ 17 SpcDynamic::SpcDynamic(){ 16 SpcDynamic::SpcDynamic(){/*{{{*/ 18 17 return; 19 18 } 20 19 /*}}}*/ 21 /*FUNCTION SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid,...){{{*/ 22 SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid, int spc_dof,int spc_analysis_type){ 20 SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid, int spc_dof,int spc_analysis_type){/*{{{*/ 23 21 24 22 sid=spc_sid; … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION SpcDynamic::~SpcDynamic{{{*/ 35 SpcDynamic::~SpcDynamic(){ 32 SpcDynamic::~SpcDynamic(){/*{{{*/ 36 33 return; 37 34 } … … 39 36 40 37 /*Object virtual functions definitions:*/ 41 /*FUNCTION SpcDynamic::Echo {{{*/ 42 void SpcDynamic::Echo(void){ 38 void SpcDynamic::Echo(void){/*{{{*/ 43 39 44 40 _printf_("SpcDynamic:\n"); … … 52 48 } 53 49 /*}}}*/ 54 /*FUNCTION SpcDynamic::DeepEcho {{{*/ 55 void SpcDynamic::DeepEcho(void){ 50 void SpcDynamic::DeepEcho(void){/*{{{*/ 56 51 57 52 this->Echo(); … … 59 54 } 60 55 /*}}}*/ 61 /*FUNCTION SpcDynamic::Id {{{*/ 62 int SpcDynamic::Id(void){ return sid; } 56 int SpcDynamic::Id(void){ return sid; }/*{{{*/ 63 57 /*}}}*/ 64 /*FUNCTION SpcDynamic::ObjectEnum{{{*/ 65 int SpcDynamic::ObjectEnum(void){ 58 int SpcDynamic::ObjectEnum(void){/*{{{*/ 66 59 67 60 return SpcDynamicEnum; … … 69 62 } 70 63 /*}}}*/ 71 /*FUNCTION SpcDynamic::copy {{{*/ 72 Object* SpcDynamic::copy() { 64 Object* SpcDynamic::copy() {/*{{{*/ 73 65 return new SpcDynamic(*this); 74 66 } … … 76 68 77 69 /*Constraint virtual functions definitions: */ 78 /*FUNCTION SpcDynamic::InAnalysis{{{*/ 79 bool SpcDynamic::InAnalysis(int in_analysis_type){ 70 bool SpcDynamic::InAnalysis(int in_analysis_type){/*{{{*/ 80 71 if (in_analysis_type==this->analysis_type) return true; 81 72 else return false; 82 73 } 83 74 /*}}}*/ 84 /*FUNCTION SpcDynamic::ConstrainNode{{{*/ 85 void SpcDynamic::ConstrainNode(Nodes* nodes,Parameters* parameters){ 75 void SpcDynamic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/ 86 76 87 77 Node* node=NULL; … … 100 90 101 91 /*SpcDynamic functions*/ 102 /*FUNCTION SpcDynamic::GetDof {{{*/ 103 int SpcDynamic::GetDof(){ 92 int SpcDynamic::GetDof(){/*{{{*/ 104 93 return dof; 105 94 } 106 95 /*}}}*/ 107 /*FUNCTION SpcDynamic::GetNodeId {{{*/ 108 int SpcDynamic::GetNodeId(){ 96 int SpcDynamic::GetNodeId(){/*{{{*/ 109 97 110 98 return nodeid; 111 99 } 112 100 /*}}}*/ 113 /*FUNCTION SpcDynamic::GetValue {{{*/ 114 IssmDouble SpcDynamic::GetValue(){ 101 IssmDouble SpcDynamic::GetValue(){/*{{{*/ 115 102 _assert_(this->isset); 116 103 _assert_(!xIsNan<IssmDouble>(value)); … … 118 105 } 119 106 /*}}}*/ 120 /*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/ 121 void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){ 107 void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){/*{{{*/ 122 108 123 109 int pos; -
issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
r15448 r18064 14 14 15 15 /*SpcStatic constructors and destructor*/ 16 /*FUNCTION SpcStatic::SpcStatic(){{{*/ 17 SpcStatic::SpcStatic(){ 16 SpcStatic::SpcStatic(){/*{{{*/ 18 17 return; 19 18 } 20 19 /*}}}*/ 21 /*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{*/ 22 SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){ 20 SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){/*{{{*/ 23 21 24 22 sid = spc_sid; … … 31 29 } 32 30 /*}}}*/ 33 /*FUNCTION SpcStatic::~SpcStatic{{{*/ 34 SpcStatic::~SpcStatic(){ 31 SpcStatic::~SpcStatic(){/*{{{*/ 35 32 return; 36 33 } … … 38 35 39 36 /*Object virtual functions definitions:*/ 40 /*FUNCTION SpcStatic::Echo {{{*/ 41 void SpcStatic::Echo(void){ 37 void SpcStatic::Echo(void){/*{{{*/ 42 38 43 39 _printf_("SpcStatic:\n"); … … 50 46 } 51 47 /*}}}*/ 52 /*FUNCTION SpcStatic::DeepEcho {{{*/ 53 void SpcStatic::DeepEcho(void){ 48 void SpcStatic::DeepEcho(void){/*{{{*/ 54 49 55 50 _printf_("SpcStatic:\n"); … … 62 57 } 63 58 /*}}}*/ 64 /*FUNCTION SpcStatic::Id {{{*/ 65 int SpcStatic::Id(void){ return sid; } 59 int SpcStatic::Id(void){ return sid; }/*{{{*/ 66 60 /*}}}*/ 67 /*FUNCTION SpcStatic::ObjectEnum{{{*/ 68 int SpcStatic::ObjectEnum(void){ 61 int SpcStatic::ObjectEnum(void){/*{{{*/ 69 62 70 63 return SpcStaticEnum; … … 72 65 } 73 66 /*}}}*/ 74 /*FUNCTION SpcStatic::copy {{{*/ 75 Object* SpcStatic::copy() { 67 Object* SpcStatic::copy() {/*{{{*/ 76 68 return new SpcStatic(*this); 77 69 } … … 79 71 80 72 /*Constraint virtual functions definitions: */ 81 /*FUNCTION SpcStatic::InAnalysis{{{*/ 82 bool SpcStatic::InAnalysis(int in_analysis_type){ 73 bool SpcStatic::InAnalysis(int in_analysis_type){/*{{{*/ 83 74 if (in_analysis_type==this->analysis_type) return true; 84 75 else return false; 85 76 } 86 77 /*}}}*/ 87 /*FUNCTION SpcStatic::ConstrainNode{{{*/ 88 void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){ 78 void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/ 89 79 90 80 Node* node=NULL; … … 101 91 102 92 /*SpcStatic functions*/ 103 /*FUNCTION SpcStatic::GetDof {{{*/ 104 int SpcStatic::GetDof(){ 93 int SpcStatic::GetDof(){/*{{{*/ 105 94 return dof; 106 95 } 107 96 /*}}}*/ 108 /*FUNCTION SpcStatic::GetNodeId {{{*/ 109 int SpcStatic::GetNodeId(){ 97 int SpcStatic::GetNodeId(){/*{{{*/ 110 98 111 99 return nodeid; 112 100 } 113 101 /*}}}*/ 114 /*FUNCTION SpcStatic::GetValue {{{*/ 115 IssmDouble SpcStatic::GetValue(){ 102 IssmDouble SpcStatic::GetValue(){/*{{{*/ 116 103 _assert_(!xIsNan<IssmDouble>(value)); 117 104 return value; -
issm/trunk-jpl/src/c/classes/Constraints/SpcTransient.cpp
r15862 r18064 14 14 15 15 /*SpcTransient constructors and destructor*/ 16 /*FUNCTION SpcTransient::SpcTransient(){{{*/ 17 SpcTransient::SpcTransient(){ 16 SpcTransient::SpcTransient(){/*{{{*/ 18 17 sid=-1; 19 18 nodeid=-1; … … 26 25 } 27 26 /*}}}*/ 28 /*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{*/ 29 SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){ 27 SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){/*{{{*/ 30 28 31 29 sid=spc_sid; … … 43 41 } 44 42 /*}}}*/ 45 /*FUNCTION SpcTransient::~SpcTransient{{{*/ 46 SpcTransient::~SpcTransient(){ 43 SpcTransient::~SpcTransient(){/*{{{*/ 47 44 xDelete<IssmDouble>(times); 48 45 xDelete<IssmDouble>(values); … … 52 49 53 50 /*Object virtual functions definitions:*/ 54 /*FUNCTION SpcTransient::Echo {{{*/ 55 void SpcTransient::Echo(void){ 51 void SpcTransient::Echo(void){/*{{{*/ 56 52 57 53 int i; … … 69 65 } 70 66 /*}}}*/ 71 /*FUNCTION SpcTransient::DeepEcho {{{*/ 72 void SpcTransient::DeepEcho(void){ 67 void SpcTransient::DeepEcho(void){/*{{{*/ 73 68 this->Echo(); 74 69 } 75 70 /*}}}*/ 76 /*FUNCTION SpcTransient::Id {{{*/ 77 int SpcTransient::Id(void){ return sid; } 71 int SpcTransient::Id(void){ return sid; }/*{{{*/ 78 72 /*}}}*/ 79 /*FUNCTION SpcTransient::ObjectEnum{{{*/ 80 int SpcTransient::ObjectEnum(void){ 73 int SpcTransient::ObjectEnum(void){/*{{{*/ 81 74 82 75 return SpcTransientEnum; … … 84 77 } 85 78 /*}}}*/ 86 /*FUNCTION SpcTransient::copy {{{*/ 87 Object* SpcTransient::copy() { 79 Object* SpcTransient::copy() {/*{{{*/ 88 80 return new SpcTransient(sid,nodeid,dof,nsteps,times,values,analysis_type); 89 81 } … … 91 83 92 84 /*Constraint virtual functions definitions:*/ 93 /*FUNCTION SpcTransient::InAnalysis{{{*/ 94 bool SpcTransient::InAnalysis(int in_analysis_type){ 85 bool SpcTransient::InAnalysis(int in_analysis_type){/*{{{*/ 95 86 96 87 if (in_analysis_type==this->analysis_type) return true; … … 98 89 } 99 90 /*}}}*/ 100 /*FUNCTION SpcTransient::ConstrainNode{{{*/ 101 void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){ 91 void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/ 102 92 103 93 Node *node = NULL; … … 149 139 150 140 /*SpcTransient functions*/ 151 /*FUNCTION SpcTransient::GetDof {{{*/ 152 int SpcTransient::GetDof(){ 141 int SpcTransient::GetDof(){/*{{{*/ 153 142 return dof; 154 143 } 155 144 /*}}}*/ 156 /*FUNCTION SpcTransient::GetNodeId {{{*/ 157 int SpcTransient::GetNodeId(){ 145 int SpcTransient::GetNodeId(){/*{{{*/ 158 146 159 147 return nodeid; 160 148 } 161 149 /*}}}*/ 162 /*FUNCTION SpcTransient::GetValue {{{*/ 163 IssmDouble SpcTransient::GetValue(){ 150 IssmDouble SpcTransient::GetValue(){/*{{{*/ 164 151 return values[0]; 165 152 } -
issm/trunk-jpl/src/c/classes/Contour.h
r15104 r18064 24 24 25 25 /*Contour constructors, destructors :*/ 26 /*FUNCTION Contour() {{{*/ 27 Contour(){ 26 Contour(){/*{{{*/ 28 27 this->id = 0; 29 28 this->nods = 0; … … 33 32 } 34 33 /*}}}*/ 35 /*FUNCTION Contour(int pid, int nods, doubletype* x, doubletype* y,bool closed) {{{*/ 36 Contour(int pid,int pnods, doubletype* px, doubletype* py,bool pclosed){ 34 Contour(int pid,int pnods, doubletype* px, doubletype* py,bool pclosed){/*{{{*/ 37 35 38 36 this->id = pid; … … 47 45 } 48 46 /*}}}*/ 49 /*FUNCTION ~Contour() {{{*/ 50 ~Contour(){ 47 ~Contour(){/*{{{*/ 51 48 xDelete<doubletype>(this->x); 52 49 xDelete<doubletype>(this->y); … … 55 52 56 53 /*Object virtual function resolutoin: */ 57 /*FUNCTION Echo(){{{*/ 58 void Echo(void){ 54 void Echo(void){/*{{{*/ 59 55 _printf_(" Contour: " << id << "\n"); 60 56 _printf_(" nods: " << nods << "\n"); … … 68 64 } 69 65 /*}}}*/ 70 /*FUNCTION DeepEcho(){{{*/ 71 void DeepEcho(void){ 66 void DeepEcho(void){/*{{{*/ 72 67 this->Echo(); 73 68 } 74 69 /*}}}*/ 75 /*FUNCTION Id(){{{*/ 76 int Id(void){ 70 int Id(void){/*{{{*/ 77 71 return id; 78 72 } 79 73 /*}}}*/ 80 /*FUNCTION ObjectEnum{{{*/ 81 int ObjectEnum(void){ 74 int ObjectEnum(void){/*{{{*/ 82 75 return ContourEnum; 83 76 } 84 77 /*}}}*/ 85 /*FUNCTION copy {{{*/ 86 Object* copy() { 78 Object* copy() {/*{{{*/ 87 79 return new Contour(*this); 88 80 } -
issm/trunk-jpl/src/c/classes/Contours.cpp
r15049 r18064 19 19 20 20 /*Object constructors and destructor*/ 21 /*FUNCTION Contours::Contours(){{{*/ 22 Contours::Contours(){ 21 Contours::Contours(){/*{{{*/ 23 22 enum_type=ContoursEnum; 24 23 return; 25 24 } 26 25 /*}}}*/ 27 /*FUNCTION Contours::~Contours(){{{*/ 28 Contours::~Contours(){ 26 Contours::~Contours(){/*{{{*/ 29 27 return; 30 28 } -
issm/trunk-jpl/src/c/classes/DependentObject.cpp
r16402 r18064 14 14 15 15 /*DependentObject constructors and destructor*/ 16 /*FUNCTION DependentObject::DependentObject(){{{*/ 17 DependentObject::DependentObject(){ 16 DependentObject::DependentObject(){/*{{{*/ 18 17 this->name=NULL; 19 18 this->type=0; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION DependentObject::DependentObject(int in_name, int in_type, int in_index){{{*/ 24 DependentObject::DependentObject(char* in_name, int in_type,int in_index){ 22 DependentObject::DependentObject(char* in_name, int in_type,int in_index){/*{{{*/ 25 23 26 24 this->name=xNew<char>(strlen(in_name)+1); xMemCpy<char>(this->name,in_name,strlen(in_name)+1); … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION DependentObject::~DependentObject() {{{*/ 35 DependentObject::~DependentObject(){ //destructor 32 DependentObject::~DependentObject(){ //destructor/*{{{*/ 36 33 xDelete<char>(this->name); 37 34 } … … 39 36 40 37 /*Object virtual functions definitions:*/ 41 /*FUNCTION DependentObject::Echo{{{*/ 42 void DependentObject::Echo(void){ 38 void DependentObject::Echo(void){/*{{{*/ 43 39 44 40 _printf_("DependentObject:\n"); … … 53 49 } 54 50 /*}}}*/ 55 /*FUNCTION DependentObject::DeepEcho{{{*/ 56 void DependentObject::DeepEcho(void){ 51 void DependentObject::DeepEcho(void){/*{{{*/ 57 52 this->Echo(); 58 53 } 59 54 /*}}}*/ 60 /*FUNCTION DependentObject::Id{{{*/ 61 int DependentObject::Id(void){ return -1; } 55 int DependentObject::Id(void){ return -1; }/*{{{*/ 62 56 /*}}}*/ 63 /*FUNCTION DependentObject::ObjectEnum{{{*/ 64 int DependentObject::ObjectEnum(void){ 57 int DependentObject::ObjectEnum(void){/*{{{*/ 65 58 66 59 return DependentObjectEnum; … … 68 61 } 69 62 /*}}}*/ 70 /*FUNCTION DependentObject::copy{{{*/ 71 Object* DependentObject::copy(void) { 63 Object* DependentObject::copy(void) { /*{{{*/ 72 64 return new DependentObject(name,type,index); 73 65 } /*}}}*/ 74 66 75 67 /*DependentObject methods: */ 76 /*FUNCTION DependentObject::NumDependents{{{*/ 77 int DependentObject::NumDependents(void){ 68 int DependentObject::NumDependents(void){/*{{{*/ 78 69 79 70 /*Branch according to the type of variable: */ … … 87 78 } 88 79 /*}}}*/ 89 /*FUNCTION DependentObject::Responsex{{{*/ 90 void DependentObject::Responsex(IssmDouble* poutput_value,FemModel* femmodel){ 80 void DependentObject::Responsex(IssmDouble* poutput_value,FemModel* femmodel){/*{{{*/ 91 81 92 82 /*Is this some special type of response for which we need to go in the output definitions? :*/ -
issm/trunk-jpl/src/c/classes/DofIndexing.cpp
r15645 r18064 20 20 21 21 /*DofIndexing constructors and destructor*/ 22 /*FUNCTION DofIndexing::DofIndexing(){{{*/ 23 DofIndexing::DofIndexing(){ 22 DofIndexing::DofIndexing(){/*{{{*/ 24 23 25 24 this->gsize = UNDEF; … … 38 37 } 39 38 /*}}}*/ 40 /*FUNCTION DofIndexing::DofIndexing(int gsize){{{*/ 41 DofIndexing::DofIndexing(int in_gsize){ 39 DofIndexing::DofIndexing(int in_gsize){/*{{{*/ 42 40 43 41 this->Init(in_gsize,NULL); … … 45 43 } 46 44 /*}}}*/ 47 /*FUNCTION DofIndexing::DofIndexing(DofIndexing* in) -> copy{{{*/ 48 DofIndexing::DofIndexing(DofIndexing* in){ //copy constructor 45 DofIndexing::DofIndexing(DofIndexing* in){ //copy constructor/*{{{*/ 49 46 50 47 this->gsize = in->gsize; … … 83 80 } 84 81 /*}}}*/ 85 /*FUNCTION DofIndexing::~DofIndexing() {{{*/ 86 DofIndexing::~DofIndexing(){ //destructor 82 DofIndexing::~DofIndexing(){ //destructor/*{{{*/ 87 83 88 84 xDelete<bool>(f_set); … … 96 92 } 97 93 /*}}}*/ 98 /*FUNCTION DofIndexing::Init{{{*/ 99 void DofIndexing::Init(int in_gsize,int* in_doftype){ 94 void DofIndexing::Init(int in_gsize,int* in_doftype){/*{{{*/ 100 95 101 96 this->gsize = in_gsize; … … 127 122 } 128 123 /*}}}*/ 129 /*FUNCTION DofIndexing::InitSet{{{*/ 130 void DofIndexing::InitSet(int setenum){ 124 void DofIndexing::InitSet(int setenum){/*{{{*/ 131 125 132 126 int i; … … 162 156 163 157 /*Some of the Object functionality: */ 164 /*FUNCTION DofIndexing::Echo{{{*/ 165 void DofIndexing::Echo(void){ 158 void DofIndexing::Echo(void){/*{{{*/ 166 159 167 160 _printf_("DofIndexing:\n"); … … 173 166 } 174 167 /*}}}*/ 175 /*FUNCTION DofIndexing::DeepEcho{{{*/ 176 void DofIndexing::DeepEcho(void){ 168 void DofIndexing::DeepEcho(void){/*{{{*/ 177 169 178 170 int i; … … 224 216 } 225 217 /*}}}*/ 226 /*FUNCTION DofIndexing::Deactivate{{{*/ 227 void DofIndexing::Deactivate(void){ 218 void DofIndexing::Deactivate(void){/*{{{*/ 228 219 this->active = false; 229 220 … … 237 228 } 238 229 /*}}}*/ 239 /*FUNCTION DofIndexing::Activate{{{*/ 240 void DofIndexing::Activate(void){ 230 void DofIndexing::Activate(void){/*{{{*/ 241 231 this->active = true; 242 232 -
issm/trunk-jpl/src/c/classes/ExternalResults/Results.cpp
r16498 r18064 20 20 21 21 /*Object constructors and destructor*/ 22 /*FUNCTION Results::Results(){{{*/ 23 Results::Results(){ 22 Results::Results(){/*{{{*/ 24 23 enum_type=ResultsEnum; 25 24 return; 26 25 } 27 26 /*}}}*/ 28 /*FUNCTION Results::~Results(){{{*/ 29 Results::~Results(){ 27 Results::~Results(){/*{{{*/ 30 28 return; 31 29 } … … 33 31 34 32 /*Object management*/ 35 /*FUNCTION Results::Write{{{*/ 36 void Results::Write(Parameters* parameters){ 33 void Results::Write(Parameters* parameters){/*{{{*/ 37 34 38 35 FILE *fid = NULL; … … 50 47 } 51 48 /*}}}*/ 52 /*FUNCTION Results::AddResult(ExternalResult* in_result){{{*/ 53 int Results::AddResult(ExternalResult* in_result){ 49 int Results::AddResult(ExternalResult* in_result){/*{{{*/ 54 50 55 51 /*First, go through dataset of inputs and check whether any input … … 82 78 } 83 79 /*}}}*/ 84 /*FUNCTION Results::DeleteResult(ExternalResult* in_result){{{*/ 85 int Results::DeleteResult(int result_enum,int result_step){ 80 int Results::DeleteResult(int result_enum,int result_step){/*{{{*/ 86 81 87 82 for(int i=0;i<this->Size();i++){ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r18056 r18064 43 43 44 44 /*Object constructors and destructor*/ 45 /*FUNCTION FemModel::FemModel(int argc,char** argv,ISSM_MPI_Comm incomm){{{*/ 46 FemModel::FemModel(int argc,char** argv,ISSM_MPI_Comm incomm){ 45 FemModel::FemModel(int argc,char** argv,ISSM_MPI_Comm incomm){/*{{{*/ 47 46 48 47 /*configuration: */ … … 94 93 } 95 94 /*}}}*/ 96 /*FUNCTION FemModel::FemModel(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){{{*/ 97 FemModel::FemModel(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){ 95 FemModel::FemModel(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){/*{{{*/ 98 96 99 97 /*Call InitFromFiles. This constructor is just a wrapper: */ … … 102 100 } 103 101 /*}}}*/ 104 /*FUNCTION FemModel::~FemModel{{{*/ 105 FemModel::~FemModel(){ 102 FemModel::~FemModel(){/*{{{*/ 106 103 107 104 /*Intermediary*/ … … 163 160 164 161 /*Object management*/ 165 /*FUNCTION FemModel::Echo {{{*/ 166 void FemModel::Echo(void){ 162 void FemModel::Echo(void){/*{{{*/ 167 163 168 164 _printf_("FemModel echo: \n"); … … 175 171 } 176 172 /*}}}*/ 177 /*FUNCTION FemModel::InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){{{*/ 178 void FemModel::InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){ 173 void FemModel::InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* toolkitsfilename, char* lockfilename, const int in_solution_type,const int* analyses,const int nummodels){/*{{{*/ 179 174 180 175 /*intermediary*/ … … 246 241 } 247 242 /*}}}*/ 248 /*FUNCTION FemModel::SetStaticComm {{{*/ 249 void FemModel::SetStaticComm(void){ 243 void FemModel::SetStaticComm(void){/*{{{*/ 250 244 251 245 /*This routine sets the global communicator variable hidden inside the IssmComm … … 255 249 } 256 250 /*}}}*/ 257 /*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){{{*/ 258 void FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){ 251 void FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){/*{{{*/ 259 252 260 253 /*Use configuration_type to setup the analysis counter, the configurations of objects etc ... but use … … 290 283 } 291 284 /*}}}*/ 292 /*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type){{{*/ 293 void FemModel::SetCurrentConfiguration(int configuration_type){ 285 void FemModel::SetCurrentConfiguration(int configuration_type){/*{{{*/ 294 286 this->SetCurrentConfiguration(configuration_type,configuration_type); 295 287 } 296 288 /*}}}*/ 297 /*FUNCTION FemModel::Solve {{{*/ 298 void FemModel::Solve(void){ 289 void FemModel::Solve(void){/*{{{*/ 299 290 300 291 /*profiling: */ -
issm/trunk-jpl/src/c/classes/Hook.cpp
r16233 r18064 16 16 17 17 /*Constructor/Destructors*/ 18 /*FUNCTION Hook::Hook(){{{*/ 19 Hook::Hook(){ 18 Hook::Hook(){/*{{{*/ 20 19 this->num = 0; 21 20 this->objects = NULL; … … 24 23 } 25 24 /*}}}*/ 26 /*FUNCTION Hook::Hook(int* ids, int num){{{*/ 27 Hook::Hook(int* in_ids, int in_num){ 25 Hook::Hook(int* in_ids, int in_num){/*{{{*/ 28 26 29 27 /*Get number of objects to hook*/ … … 52 50 } 53 51 /*}}}*/ 54 /*FUNCTION Hook::~Hook(){{{*/ 55 Hook::~Hook(){ 52 Hook::~Hook(){/*{{{*/ 56 53 xDelete<Object*>(this->objects); 57 54 xDelete<int>(this->ids); … … 61 58 62 59 /*Some of the Object functionality: */ 63 /*FUNCTION Hook::Echo{{{*/ 64 void Hook::Echo(void){ 60 void Hook::Echo(void){/*{{{*/ 65 61 _assert_(this); 66 62 int i; … … 80 76 } 81 77 /*}}}*/ 82 /*FUNCTION Hook::DeepEcho{{{*/ 83 void Hook::DeepEcho(void){ 78 void Hook::DeepEcho(void){/*{{{*/ 84 79 85 80 int i; … … 108 103 } 109 104 /*}}}*/ 110 /*FUNCTION Hook::copy {{{*/ 111 Object* Hook::copy(void){ 105 Object* Hook::copy(void){/*{{{*/ 112 106 113 107 /*output: */ … … 136 130 137 131 /*Hook management: */ 138 /*FUNCTION Hook::configure{{{*/ 139 void Hook::configure(DataSet* dataset){ 132 void Hook::configure(DataSet* dataset){/*{{{*/ 140 133 141 134 /*intermediary: */ … … 178 171 } 179 172 /*}}}*/ 180 /*FUNCTION Hook::delivers{{{*/ 181 Object* Hook::delivers(void){ 173 Object* Hook::delivers(void){/*{{{*/ 182 174 183 175 /*first, check that we only have one T object in our object list: */ … … 191 183 192 184 /*}}}*/ 193 /*FUNCTION Hook::deliverp{{{*/ 194 Object** Hook::deliverp(void){ 185 Object** Hook::deliverp(void){/*{{{*/ 195 186 return objects; 196 187 } 197 188 /*}}}*/ 198 /*FUNCTION Hook::Ids{{{*/ 199 int* Hook::Ids(void){ 189 int* Hook::Ids(void){/*{{{*/ 200 190 return this->ids; 201 191 } 202 192 /*}}}*/ 203 /*FUNCTION Hook::GetNum{{{*/ 204 int Hook::GetNum(void){ 193 int Hook::GetNum(void){/*{{{*/ 205 194 return this->num; 206 195 } 207 196 /*}}}*/ 208 /*FUNCTION Hook::Spawn{{{*/ 209 Hook* Hook::Spawn(int* indices, int numindices){ 197 Hook* Hook::Spawn(int* indices, int numindices){/*{{{*/ 210 198 211 199 /*output: */ -
issm/trunk-jpl/src/c/classes/IndependentObject.cpp
r16144 r18064 14 14 15 15 /*IndependentObject constructors and destructor*/ 16 /*FUNCTION IndependentObject::IndependentObject(){{{*/ 17 IndependentObject::IndependentObject(){ 16 IndependentObject::IndependentObject(){/*{{{*/ 18 17 this->name=NoneEnum; 19 18 this->type=0; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION IndependentObject::IndependentObject(int in_name, int in_type){{{*/ 24 IndependentObject::IndependentObject(int in_name, int in_type){ 22 IndependentObject::IndependentObject(int in_name, int in_type){/*{{{*/ 25 23 26 24 this->numberofindependents=0; … … 31 29 } 32 30 /*}}}*/ 33 /*FUNCTION IndependentObject::~IndependentObject() {{{*/ 34 IndependentObject::~IndependentObject(){ //destructor 31 IndependentObject::~IndependentObject(){ //destructor/*{{{*/ 35 32 } 36 33 /*}}}*/ 37 34 38 35 /*Object virtual functions definitions:*/ 39 /*FUNCTION IndependentObject::Echo{{{*/ 40 void IndependentObject::Echo(void){ 36 void IndependentObject::Echo(void){/*{{{*/ 41 37 42 38 _printf_("IndependentObject:\n"); … … 51 47 } 52 48 /*}}}*/ 53 /*FUNCTION IndependentObject::DeepEcho{{{*/ 54 void IndependentObject::DeepEcho(void){ 49 void IndependentObject::DeepEcho(void){/*{{{*/ 55 50 this->Echo(); 56 51 } 57 52 /*}}}*/ 58 /*FUNCTION IndependentObject::Id{{{*/ 59 int IndependentObject::Id(void){ return -1; } 53 int IndependentObject::Id(void){ return -1; }/*{{{*/ 60 54 /*}}}*/ 61 /*FUNCTION IndependentObject::ObjectEnum{{{*/ 62 int IndependentObject::ObjectEnum(void){ 55 int IndependentObject::ObjectEnum(void){/*{{{*/ 63 56 64 57 return IndependentObjectEnum; … … 66 59 } 67 60 /*}}}*/ 68 /*FUNCTION IndependentObject::copy{{{*/ 69 Object* IndependentObject::copy(void) { 61 Object* IndependentObject::copy(void) { /*{{{*/ 70 62 71 63 IndependentObject* object=new IndependentObject(); … … 78 70 79 71 /*IndependentObject methods: */ 80 /*FUNCTION IndependentObject::FetchIndependent{{{*/ 81 void IndependentObject::FetchIndependent(IoModel* iomodel){ 72 void IndependentObject::FetchIndependent(IoModel* iomodel){/*{{{*/ 82 73 83 74 int my_rank; … … 183 174 } 184 175 /*}}}*/ 185 /*FUNCTION IndependentObject::NumIndependents{{{*/ 186 int IndependentObject::NumIndependents(void){ 176 int IndependentObject::NumIndependents(void){/*{{{*/ 187 177 188 178 return this->numberofindependents;; 189 179 } 190 180 /*}}}*/ 191 /*FUNCTION IndependentObject::FillIndependents{{{*/ 192 void IndependentObject::FillIndependents(IssmDouble** data, IssmDouble* xp){ 181 void IndependentObject::FillIndependents(IssmDouble** data, IssmDouble* xp){/*{{{*/ 193 182 194 183 int i; -
issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp
r17514 r18064 13 13 14 14 /*BoolInput constructors and destructor*/ 15 /*FUNCTION BoolInput::BoolInput(){{{*/ 16 BoolInput::BoolInput(){ 15 BoolInput::BoolInput(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION BoolInput::BoolInput(int in_enum_type,bool in_value){{{*/ 21 BoolInput::BoolInput(int in_enum_type,bool in_value){ 19 BoolInput::BoolInput(int in_enum_type,bool in_value){/*{{{*/ 22 20 23 21 enum_type=in_enum_type; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION BoolInput::~BoolInput(){{{*/ 28 BoolInput::~BoolInput(){ 25 BoolInput::~BoolInput(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION BoolInput::Echo {{{*/ 35 void BoolInput::Echo(void){ 31 void BoolInput::Echo(void){/*{{{*/ 36 32 this->DeepEcho(); 37 33 } 38 34 /*}}}*/ 39 /*FUNCTION BoolInput::DeepEcho{{{*/ 40 void BoolInput::DeepEcho(void){ 35 void BoolInput::DeepEcho(void){/*{{{*/ 41 36 42 37 _printf_(setw(15)<<" BoolInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<(value?"true":"false") << "\n"); 43 38 } 44 39 /*}}}*/ 45 /*FUNCTION BoolInput::Id{{{*/ 46 int BoolInput::Id(void){ return -1; } 40 int BoolInput::Id(void){ return -1; }/*{{{*/ 47 41 /*}}}*/ 48 /*FUNCTION BoolInput::ObjectEnum{{{*/ 49 int BoolInput::ObjectEnum(void){ 42 int BoolInput::ObjectEnum(void){/*{{{*/ 50 43 51 44 return BoolInputEnum; … … 53 46 } 54 47 /*}}}*/ 55 /*FUNCTION BoolInput::copy{{{*/ 56 Object* BoolInput::copy() { 48 Object* BoolInput::copy() {/*{{{*/ 57 49 58 50 return new BoolInput(this->enum_type,this->value); … … 62 54 63 55 /*BoolInput management*/ 64 /*FUNCTION BoolInput::InstanceEnum{{{*/ 65 int BoolInput::InstanceEnum(void){ 56 int BoolInput::InstanceEnum(void){/*{{{*/ 66 57 67 58 return this->enum_type; … … 69 60 } 70 61 /*}}}*/ 71 /*FUNCTION BoolInput::SpawnTriaInput{{{*/ 72 Input* BoolInput::SpawnTriaInput(int index1,int index2,int index3){ 62 Input* BoolInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 73 63 74 64 /*output*/ … … 84 74 } 85 75 /*}}}*/ 86 /*FUNCTION BoolInput::SpawnSegInput{{{*/ 87 Input* BoolInput::SpawnSegInput(int index1,int index2){ 76 Input* BoolInput::SpawnSegInput(int index1,int index2){/*{{{*/ 88 77 89 78 /*output*/ … … 101 90 102 91 /*Object functions*/ 103 /*FUNCTION BoolInput::GetInputValue(bool* pvalue) {{{*/ 104 void BoolInput::GetInputValue(bool* pvalue){ 92 void BoolInput::GetInputValue(bool* pvalue){/*{{{*/ 105 93 *pvalue=value; 106 94 } 107 95 /*}}}*/ 108 /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/ 109 void BoolInput::GetInputValue(int* pvalue){_error_("not supported yet!");} 96 void BoolInput::GetInputValue(int* pvalue){_error_("not supported yet!");}/*{{{*/ 110 97 /*}}}*/ 111 /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue){{{*/ 112 void BoolInput::GetInputValue(IssmDouble* pvalue){_error_("not supported yet!");} 98 void BoolInput::GetInputValue(IssmDouble* pvalue){_error_("not supported yet!");}/*{{{*/ 113 99 /*}}}*/ 114 /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 115 void BoolInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");} 100 void BoolInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");}/*{{{*/ 116 101 /*}}}*/ 117 /*FUNCTION BoolInput::ChangeEnum{{{*/ 118 void BoolInput::ChangeEnum(int newenumtype){ 102 void BoolInput::ChangeEnum(int newenumtype){/*{{{*/ 119 103 this->enum_type=newenumtype; 120 104 } 121 105 /*}}}*/ 122 /*FUNCTION BoolInput::SquareMin{{{*/ 123 void BoolInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 106 void BoolInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 124 107 /*square of a bool is the bool itself: */ 125 108 *psquaremin=value; 126 109 } 127 110 /*}}}*/ 128 /*FUNCTION BoolInput::Scale{{{*/ 129 void BoolInput::Scale(IssmDouble scale_factor){ 111 void BoolInput::Scale(IssmDouble scale_factor){/*{{{*/ 130 112 /*a bool cannot be scaled: */ 131 113 } 132 114 /*}}}*/ 133 /*FUNCTION BoolInput::AXPY{{{*/ 134 void BoolInput::AXPY(Input* xinput,IssmDouble scalar){ 115 void BoolInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 135 116 136 117 BoolInput* xboolinput=NULL; … … 152 133 } 153 134 /*}}}*/ 154 /*FUNCTION BoolInput::Extrude{{{*/ 155 void BoolInput::Extrude(void){ 135 void BoolInput::Extrude(void){/*{{{*/ 156 136 157 137 /*do nothing*/ … … 159 139 } 160 140 /*}}}*/ 161 /*FUNCTION BoolInput::GetVectorFromInputs{{{*/ 162 void BoolInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 141 void BoolInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 163 142 164 143 _error_("not supporte yet!"); … … 166 145 } 167 146 /*}}}*/ 168 /*FUNCTION BoolInput::Configure{{{*/ 169 void BoolInput::Configure(Parameters* parameters){ 147 void BoolInput::Configure(Parameters* parameters){/*{{{*/ 170 148 /*do nothing: */ 171 149 } -
issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
r17514 r18064 13 13 14 14 /*ControlInput constructors and destructor*/ 15 /*FUNCTION ControlInput::ControlInput(){{{*/ 16 ControlInput::ControlInput(){ 15 ControlInput::ControlInput(){/*{{{*/ 17 16 control_id = 0; 18 17 values = NULL; … … 23 22 } 24 23 /*}}}*/ 25 /*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id){{{*/ 26 ControlInput::ControlInput(int in_enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id){ 24 ControlInput::ControlInput(int in_enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id){/*{{{*/ 27 25 28 26 control_id=id; … … 48 46 } 49 47 /*}}}*/ 50 /*FUNCTION ControlInput::~ControlInput(){{{*/ 51 ControlInput::~ControlInput(){ 48 ControlInput::~ControlInput(){/*{{{*/ 52 49 delete values; 53 50 delete savedvalues; … … 59 56 60 57 /*Object virtual functions definitions:*/ 61 /*FUNCTION ControlInput::Echo {{{*/ 62 void ControlInput::Echo(void){ 58 void ControlInput::Echo(void){/*{{{*/ 63 59 this->DeepEcho(); 64 60 } 65 61 /*}}}*/ 66 /*FUNCTION ControlInput::DeepEcho{{{*/ 67 void ControlInput::DeepEcho(void){ 62 void ControlInput::DeepEcho(void){/*{{{*/ 68 63 69 64 _printf_("ControlInput:\n"); … … 76 71 } 77 72 /*}}}*/ 78 /*FUNCTION ControlInput::Id{{{*/ 79 int ControlInput::Id(void){ return -1; } 80 /*}}}*/ 81 /*FUNCTION ControlInput::ObjectEnum{{{*/ 82 int ControlInput::ObjectEnum(void){ 73 int ControlInput::Id(void){ return -1; }/*{{{*/ 74 /*}}}*/ 75 int ControlInput::ObjectEnum(void){/*{{{*/ 83 76 84 77 return ControlInputEnum; … … 86 79 } 87 80 /*}}}*/ 88 /*FUNCTION ControlInput::copy{{{*/ 89 Object* ControlInput::copy() { 81 Object* ControlInput::copy() {/*{{{*/ 90 82 91 83 ControlInput* output=NULL; … … 106 98 107 99 /*ControlInput management*/ 108 /*FUNCTION ControlInput::InstanceEnum{{{*/ 109 int ControlInput::InstanceEnum(void){ 100 int ControlInput::InstanceEnum(void){/*{{{*/ 110 101 111 102 return this->enum_type; … … 115 106 116 107 /*Object functions*/ 117 /*FUNCTION ControlInput::AXPY(){{{*/ 118 void ControlInput::AXPY(Input* xinput,IssmDouble scalar){ 108 void ControlInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 119 109 values->AXPY(xinput,scalar); 120 110 }/*}}}*/ 121 /*FUNCTION ControlInput::Constrain(){{{*/ 122 void ControlInput::Constrain(void){ 111 void ControlInput::Constrain(void){/*{{{*/ 123 112 124 113 Input* newvalues=NULL; … … 129 118 delete values; this->values=newvalues; 130 119 }/*}}}*/ 131 /*FUNCTION ControlInput::Constrain(IssmDouble min, IssmDouble max){{{*/ 132 void ControlInput::Constrain(IssmDouble min, IssmDouble max){ 120 void ControlInput::Constrain(IssmDouble min, IssmDouble max){/*{{{*/ 133 121 values->Constrain(min,max); 134 122 }/*}}}*/ 135 /*FUNCTION ControlInput::Extrude{{{*/ 136 void ControlInput::Extrude(void){ 123 void ControlInput::Extrude(void){/*{{{*/ 137 124 values->Extrude(); 138 125 savedvalues->Extrude(); 139 126 //gradient->Extrude(); 140 127 }/*}}}*/ 141 /*FUNCTION ControlInput::GetResultInterpolation{{{*/ 142 int ControlInput::GetResultInterpolation(void){ 128 int ControlInput::GetResultInterpolation(void){/*{{{*/ 143 129 144 130 return values->GetResultInterpolation(); … … 146 132 } 147 133 /*}}}*/ 148 /*FUNCTION ControlInput::GetResultNumberOfNodes{{{*/ 149 int ControlInput::GetResultNumberOfNodes(void){ 134 int ControlInput::GetResultNumberOfNodes(void){/*{{{*/ 150 135 151 136 return values->GetResultNumberOfNodes(); … … 153 138 } 154 139 /*}}}*/ 155 /*FUNCTION ControlInput::GetGradient{{{*/ 156 void ControlInput::GetGradient(Vector<IssmDouble>* gradient_vec,int* doflist){ 140 void ControlInput::GetGradient(Vector<IssmDouble>* gradient_vec,int* doflist){/*{{{*/ 157 141 if(gradient) gradient->GetVectorFromInputs(gradient_vec,doflist); 158 142 }/*}}}*/ 159 /*FUNCTION ControlInput::ScaleGradient{{{*/ 160 void ControlInput::ScaleGradient(IssmDouble scaling_factor){ 143 void ControlInput::ScaleGradient(IssmDouble scaling_factor){/*{{{*/ 161 144 if(!gradient) _error_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found"); 162 145 gradient->Scale(scaling_factor); 163 146 }/*}}}*/ 164 /*FUNCTION ControlInput::SetGradient{{{*/ 165 void ControlInput::SetGradient(Input* gradient_in){ 147 void ControlInput::SetGradient(Input* gradient_in){/*{{{*/ 166 148 167 149 /*Get enum for current gradient*/ … … 185 167 186 168 }/*}}}*/ 187 /*FUNCTION ControlInput::SetInput{{{*/ 188 void ControlInput::SetInput(Input* in_input){ 169 void ControlInput::SetInput(Input* in_input){/*{{{*/ 189 170 190 171 delete values; this->values=in_input; … … 192 173 193 174 }/*}}}*/ 194 /*FUNCTION ControlInput::SpawnTriaInput{{{*/ 195 Input* ControlInput::SpawnTriaInput(int index1,int index2,int index3){ 175 Input* ControlInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 196 176 return values->SpawnTriaInput(index1,index2,index3); 197 177 }/*}}}*/ 198 /*FUNCTION ControlInput::SpawnSegInput{{{*/ 199 Input* ControlInput::SpawnSegInput(int index1,int index2){ 178 Input* ControlInput::SpawnSegInput(int index1,int index2){/*{{{*/ 200 179 return values->SpawnSegInput(index1,index2); 201 180 }/*}}}*/ 202 /*FUNCTION ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){{{*/ 203 void ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 181 void ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 204 182 values->GetVectorFromInputs(vector,doflist); 205 183 }/*}}}*/ 206 /*FUNCTION ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist,const char* data){{{*/ 207 void ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist,const char* data){ 184 void ControlInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist,const char* data){/*{{{*/ 208 185 if(strcmp(data,"value")==0){ 209 186 _assert_(values); … … 226 203 } 227 204 }/*}}}*/ 228 /*FUNCTION ControlInput::GetInputAverage(IssmDouble* pvalue){{{*/ 229 void ControlInput::GetInputAverage(IssmDouble* pvalue){ 205 void ControlInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 230 206 values->GetInputAverage(pvalue); 231 207 }/*}}}*/ 232 /*FUNCTION ControlInput::GetInputValue(bool* pvalue){{{*/ 233 void ControlInput::GetInputValue(bool* pvalue){ 208 void ControlInput::GetInputValue(bool* pvalue){/*{{{*/ 234 209 values->GetInputValue(pvalue); 235 210 }/*}}}*/ 236 /*FUNCTION ControlInput::GetInputValue(int* pvalue){{{*/ 237 void ControlInput::GetInputValue(int* pvalue){ 211 void ControlInput::GetInputValue(int* pvalue){/*{{{*/ 238 212 values->GetInputValue(pvalue); 239 213 }/*}}}*/ 240 /*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/ 241 void ControlInput::GetInputValue(IssmDouble* pvalue){ 214 void ControlInput::GetInputValue(IssmDouble* pvalue){/*{{{*/ 242 215 values->GetInputValue(pvalue); 243 216 }/*}}}*/ 244 /*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 245 void ControlInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 217 void ControlInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 246 218 values->GetInputValue(pvalue,gauss); 247 219 }/*}}}*/ 248 /*FUNCTION ControlInput::GetGradientValue{{{*/ 249 void ControlInput::GetGradientValue(IssmDouble* pvalue,Gauss* gauss){ 220 void ControlInput::GetGradientValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 250 221 gradient->GetInputValue(pvalue,gauss); 251 222 }/*}}}*/ 252 /*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, Gauss* gauss){{{*/ 253 void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, Gauss* gauss){ 223 void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 254 224 values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss); 255 225 }/*}}}*/ 256 /*FUNCTION ControlInput::SaveValue{{{*/ 257 void ControlInput::SaveValue(void){ 226 void ControlInput::SaveValue(void){/*{{{*/ 258 227 if(!values) _error_("Values of " << EnumToStringx(this->enum_type) << " not found"); 259 228 … … 261 230 this->savedvalues=dynamic_cast<Input*>(this->values->copy()); 262 231 }/*}}}*/ 263 /*FUNCTION ControlInput::UpdateValue{{{*/ 264 void ControlInput::UpdateValue(IssmDouble scalar){ 232 void ControlInput::UpdateValue(IssmDouble scalar){/*{{{*/ 265 233 if(!gradient) _error_("Gradient of " << EnumToStringx(this->enum_type) << " not found"); 266 234 if(!savedvalues) _error_("Values of " << EnumToStringx(this->enum_type) << " not found"); … … 270 238 this->values->AXPY(gradient,scalar); 271 239 }/*}}}*/ 272 /*FUNCTION ControlInput::VerticallyIntegrate{{{*/ 273 void ControlInput::VerticallyIntegrate(Input* thickness_input){ 240 void ControlInput::VerticallyIntegrate(Input* thickness_input){/*{{{*/ 274 241 values->VerticallyIntegrate(thickness_input); 275 242 }/*}}}*/ 276 /*FUNCTION ControlInput::Configure{{{*/ 277 void ControlInput::Configure(Parameters* parameters){ 243 void ControlInput::Configure(Parameters* parameters){/*{{{*/ 278 244 /*do nothing: */ 279 245 } -
issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp
r17514 r18064 14 14 15 15 /*DatasetInput constructors and destructor*/ 16 /*FUNCTION DatasetInput::DatasetInput(){{{*/ 17 DatasetInput::DatasetInput(){ 16 DatasetInput::DatasetInput(){/*{{{*/ 18 17 enum_type = UNDEF; 19 18 inputs = NULL; … … 22 21 } 23 22 /*}}}*/ 24 /*FUNCTION DatasetInput::DatasetInput(int in_enum_type,int* idlist,int numids) {{{*/ 25 DatasetInput::DatasetInput(int in_enum_type){ 23 DatasetInput::DatasetInput(int in_enum_type){/*{{{*/ 26 24 27 25 enum_type = in_enum_type; … … 31 29 } 32 30 /*}}}*/ 33 /*FUNCTION DatasetInput::~DatasetInput(){{{*/ 34 DatasetInput::~DatasetInput(){ 31 DatasetInput::~DatasetInput(){/*{{{*/ 35 32 xDelete<int>(this->ids); 36 33 delete inputs; … … 39 36 40 37 /*Object virtual functions definitions:*/ 41 /*FUNCTION DatasetInput::Echo {{{*/ 42 void DatasetInput::Echo(void){ 38 void DatasetInput::Echo(void){/*{{{*/ 43 39 this->DeepEcho(); 44 40 } 45 41 /*}}}*/ 46 /*FUNCTION DatasetInput::DeepEcho{{{*/ 47 void DatasetInput::DeepEcho(void){ 42 void DatasetInput::DeepEcho(void){/*{{{*/ 48 43 49 44 _printf_("DatasetInput:\n"); … … 56 51 } 57 52 /*}}}*/ 58 /*FUNCTION DatasetInput::Id{{{*/ 59 int DatasetInput::Id(void){ return -1; } 53 int DatasetInput::Id(void){ return -1; }/*{{{*/ 60 54 /*}}}*/ 61 /*FUNCTION DatasetInput::ObjectEnum{{{*/ 62 int DatasetInput::ObjectEnum(void){ 55 int DatasetInput::ObjectEnum(void){/*{{{*/ 63 56 64 57 return DatasetInputEnum; … … 66 59 } 67 60 /*}}}*/ 68 /*FUNCTION DatasetInput::copy{{{*/ 69 Object* DatasetInput::copy() { 61 Object* DatasetInput::copy() {/*{{{*/ 70 62 71 63 DatasetInput* output=NULL; … … 78 70 } 79 71 /*}}}*/ 80 /*FUNCTION DatasetInput::SpawnTriaInput{{{*/ 81 Input* DatasetInput::SpawnTriaInput(int index1,int index2,int index3){ 72 Input* DatasetInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 82 73 83 74 /*output*/ … … 96 87 } 97 88 /*}}}*/ 98 /*FUNCTION DatasetInput::SpawnSegInput{{{*/ 99 Input* DatasetInput::SpawnSegInput(int index1,int index2){ 89 Input* DatasetInput::SpawnSegInput(int index1,int index2){/*{{{*/ 100 90 101 91 /*output*/ … … 116 106 117 107 /*DatasetInput management*/ 118 /*FUNCTION DatasetInput::AddInput{{{*/ 119 void DatasetInput::AddInput(Input* input,int id){ 108 void DatasetInput::AddInput(Input* input,int id){/*{{{*/ 120 109 121 110 _assert_(this->numids == this->inputs->Size()); … … 144 133 } 145 134 /*}}}*/ 146 /*FUNCTION DatasetInput::InstanceEnum{{{*/ 147 int DatasetInput::InstanceEnum(void){ 135 int DatasetInput::InstanceEnum(void){/*{{{*/ 148 136 149 137 return this->enum_type; … … 153 141 154 142 /*Object functions*/ 155 /*FUNCTION DatasetInput::Configure{{{*/ 156 void DatasetInput::Configure(Parameters* parameters){ 143 void DatasetInput::Configure(Parameters* parameters){/*{{{*/ 157 144 /*do nothing: */ 158 145 } 159 146 /*}}}*/ 160 /*FUNCTION DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int id){{{*/ 161 void DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int id){ 147 void DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int id){/*{{{*/ 162 148 163 149 int offset = -1; -
issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
r17514 r18064 13 13 14 14 /*DoubleInput constructors and destructor*/ 15 /*FUNCTION DoubleInput::DoubleInput(){{{*/ 16 DoubleInput::DoubleInput(){ 15 DoubleInput::DoubleInput(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION DoubleInput::DoubleInput(IssmDouble value){{{*/ 21 DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){ 19 DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){/*{{{*/ 22 20 23 21 enum_type=in_enum_type; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION DoubleInput::~DoubleInput(){{{*/ 28 DoubleInput::~DoubleInput(){ 25 DoubleInput::~DoubleInput(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION DoubleInput::Echo {{{*/ 35 void DoubleInput::Echo(void){ 31 void DoubleInput::Echo(void){/*{{{*/ 36 32 this->DeepEcho(); 37 33 } 38 34 /*}}}*/ 39 /*FUNCTION DoubleInput::DeepEcho{{{*/ 40 void DoubleInput::DeepEcho(void){ 35 void DoubleInput::DeepEcho(void){/*{{{*/ 41 36 42 37 _printf_(setw(15)<<" DoubleInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 43 38 } 44 39 /*}}}*/ 45 /*FUNCTION DoubleInput::Id{{{*/ 46 int DoubleInput::Id(void){ return -1; } 47 /*}}}*/ 48 /*FUNCTION DoubleInput::ObjectEnum{{{*/ 49 int DoubleInput::ObjectEnum(void){ 40 int DoubleInput::Id(void){ return -1; }/*{{{*/ 41 /*}}}*/ 42 int DoubleInput::ObjectEnum(void){/*{{{*/ 50 43 51 44 return DoubleInputEnum; … … 53 46 } 54 47 /*}}}*/ 55 /*FUNCTION DoubleInput::copy{{{*/ 56 Object* DoubleInput::copy() { 48 Object* DoubleInput::copy() {/*{{{*/ 57 49 58 50 return new DoubleInput(this->enum_type,this->value); … … 62 54 63 55 /*DoubleInput management*/ 64 /*FUNCTION DoubleInput::InstanceEnum{{{*/ 65 int DoubleInput::InstanceEnum(void){ 56 int DoubleInput::InstanceEnum(void){/*{{{*/ 66 57 67 58 return this->enum_type; … … 69 60 } 70 61 /*}}}*/ 71 /*FUNCTION DoubleInput::SpawnTriaInput{{{*/ 72 Input* DoubleInput::SpawnTriaInput(int index1,int index2,int index3){ 62 Input* DoubleInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 73 63 74 64 /*output*/ … … 84 74 } 85 75 /*}}}*/ 86 /*FUNCTION DoubleInput::SpawnSegInput{{{*/ 87 Input* DoubleInput::SpawnSegInput(int index1,int index2){ 76 Input* DoubleInput::SpawnSegInput(int index1,int index2){/*{{{*/ 88 77 89 78 /*output*/ … … 101 90 102 91 /*Object functions*/ 103 /*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/ 104 void DoubleInput::GetInputValue(bool* pvalue){ 92 void DoubleInput::GetInputValue(bool* pvalue){/*{{{*/ 105 93 _error_("Double input of enum " << EnumToStringx(enum_type) << " cannot return a boolean"); 106 94 107 95 } 108 96 /*}}}*/ 109 /*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/ 110 void DoubleInput::GetInputValue(int* pvalue){ 97 void DoubleInput::GetInputValue(int* pvalue){/*{{{*/ 111 98 _error_("Double input of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer"); 112 99 113 100 } 114 101 /*}}}*/ 115 /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue){{{*/ 116 void DoubleInput::GetInputValue(IssmDouble* pvalue){ 102 void DoubleInput::GetInputValue(IssmDouble* pvalue){/*{{{*/ 117 103 118 104 /*return value*/ … … 120 106 } 121 107 /*}}}*/ 122 /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 123 void DoubleInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){*pvalue=this->value;} 124 /*}}}*/ 125 /*FUNCTION DoubleInput::ChangeEnum{{{*/ 126 void DoubleInput::ChangeEnum(int newenumtype){ 108 void DoubleInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){*pvalue=this->value;}/*{{{*/ 109 /*}}}*/ 110 void DoubleInput::ChangeEnum(int newenumtype){/*{{{*/ 127 111 this->enum_type=newenumtype; 128 112 } 129 113 /*}}}*/ 130 /*FUNCTION DoubleInput::SquareMin{{{*/ 131 void DoubleInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 114 void DoubleInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 132 115 133 116 /*square min of a IssmDouble is the square of the IssmDouble itself: */ … … 135 118 } 136 119 /*}}}*/ 137 /*FUNCTION DoubleInput::Scale{{{*/ 138 void DoubleInput::Scale(IssmDouble scale_factor){ 120 void DoubleInput::Scale(IssmDouble scale_factor){/*{{{*/ 139 121 value=value*scale_factor; 140 122 } 141 123 /*}}}*/ 142 /*FUNCTION DoubleInput::ConstrainMin{{{*/ 143 void DoubleInput::ConstrainMin(IssmDouble minimum){ 124 void DoubleInput::ConstrainMin(IssmDouble minimum){/*{{{*/ 144 125 if (value<minimum) value=minimum; 145 126 } 146 127 /*}}}*/ 147 /*FUNCTION DoubleInput::AXPY{{{*/ 148 void DoubleInput::AXPY(Input* xinput,IssmDouble scalar){ 128 void DoubleInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 149 129 150 130 DoubleInput* xIssmDoubleinput=NULL; … … 166 146 } 167 147 /*}}}*/ 168 /*FUNCTION DoubleInput::Constrain{{{*/ 169 void DoubleInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 148 void DoubleInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 170 149 171 150 if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min; … … 174 153 } 175 154 /*}}}*/ 176 /*FUNCTION DoubleInput::Max{{{*/ 177 IssmDouble DoubleInput::Max(void){ 155 IssmDouble DoubleInput::Max(void){/*{{{*/ 178 156 return this->value; 179 157 } 180 158 /*}}}*/ 181 /*FUNCTION DoubleInput::MaxAbs{{{*/ 182 IssmDouble DoubleInput::MaxAbs(void){ 159 IssmDouble DoubleInput::MaxAbs(void){/*{{{*/ 183 160 return fabs(this->value); 184 161 } 185 162 /*}}}*/ 186 /*FUNCTION DoubleInput::Min{{{*/ 187 IssmDouble DoubleInput::Min(void){ 163 IssmDouble DoubleInput::Min(void){/*{{{*/ 188 164 return this->value; 189 165 } 190 166 /*}}}*/ 191 /*FUNCTION DoubleInput::MinAbs{{{*/ 192 IssmDouble DoubleInput::MinAbs(void){ 167 IssmDouble DoubleInput::MinAbs(void){/*{{{*/ 193 168 return fabs(this->value); 194 169 } 195 170 /*}}}*/ 196 /*FUNCTION DoubleInput::GetVectorFromInputs{{{*/ 197 void DoubleInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 171 void DoubleInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 198 172 199 173 _error_("not supporte yet!"); … … 201 175 } 202 176 /*}}}*/ 203 /*FUNCTION DoubleInput::GetInputAverage{{{*/ 204 void DoubleInput::GetInputAverage(IssmDouble* pvalue){ 177 void DoubleInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 205 178 *pvalue=value; 206 179 } 207 180 /*}}}*/ 208 /*FUNCTION DoubleInput::VerticallyIntegrate{{{*/ 209 void DoubleInput::VerticallyIntegrate(Input* thickness_input){ 181 void DoubleInput::VerticallyIntegrate(Input* thickness_input){/*{{{*/ 210 182 211 183 /*Intermediaries*/ … … 228 200 } 229 201 /*}}}*/ 230 /*FUNCTION DoubleInput::PointwiseDivide{{{*/ 231 Input* DoubleInput::PointwiseDivide(Input* inputB){ 202 Input* DoubleInput::PointwiseDivide(Input* inputB){/*{{{*/ 232 203 233 204 /*Ouput*/ … … 248 219 } 249 220 /*}}}*/ 250 /*FUNCTION DoubleInput::PointwiseMin{{{*/ 251 Input* DoubleInput::PointwiseMin(Input* input){ 221 Input* DoubleInput::PointwiseMin(Input* input){/*{{{*/ 252 222 253 223 /*Ouput*/ … … 269 239 } 270 240 /*}}}*/ 271 /*FUNCTION DoubleInput::PointwiseMax{{{*/ 272 Input* DoubleInput::PointwiseMax(Input* input){ 241 Input* DoubleInput::PointwiseMax(Input* input){/*{{{*/ 273 242 274 243 /*Ouput*/ … … 290 259 } 291 260 /*}}}*/ 292 /*FUNCTION DoubleInput::Configure{{{*/ 293 void DoubleInput::Configure(Parameters* parameters){ 261 void DoubleInput::Configure(Parameters* parameters){/*{{{*/ 294 262 /*do nothing: */ 295 263 } -
issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
r17514 r18064 19 19 20 20 /*Object constructors and destructor*/ 21 /*FUNCTION Inputs::Inputs(){{{*/ 22 Inputs::Inputs(){ 21 Inputs::Inputs(){/*{{{*/ 23 22 return; 24 23 } 25 24 /*}}}*/ 26 /*FUNCTION Inputs::~Inputs(){{{*/ 27 Inputs::~Inputs(){ 25 Inputs::~Inputs(){/*{{{*/ 28 26 return; 29 27 } … … 31 29 32 30 /*Object management*/ 33 /*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{*/ 34 void Inputs::GetInputValue(bool* pvalue,int enum_type){ 31 void Inputs::GetInputValue(bool* pvalue,int enum_type){/*{{{*/ 35 32 36 33 vector<Object*>::iterator object; … … 59 56 } 60 57 /*}}}*/ 61 /*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{*/ 62 void Inputs::GetInputValue(int* pvalue,int enum_type){ 58 void Inputs::GetInputValue(int* pvalue,int enum_type){/*{{{*/ 63 59 64 60 vector<Object*>::iterator object; … … 87 83 } 88 84 /*}}}*/ 89 /*FUNCTION Inputs::GetInputValue(IssmDouble* pvalue,int enum-type){{{*/ 90 void Inputs::GetInputValue(IssmDouble* pvalue,int enum_type){ 85 void Inputs::GetInputValue(IssmDouble* pvalue,int enum_type){/*{{{*/ 91 86 92 87 vector<Object*>::iterator object; … … 115 110 } 116 111 /*}}}*/ 117 /*FUNCTION Inputs::GetInputAverage{{{*/ 118 void Inputs::GetInputAverage(IssmDouble* pvalue,int enum_type){ 112 void Inputs::GetInputAverage(IssmDouble* pvalue,int enum_type){/*{{{*/ 119 113 120 114 vector<Object*>::iterator object; … … 143 137 } 144 138 /*}}}*/ 145 /*FUNCTION Inputs::AddInput{{{*/ 146 int Inputs::AddInput(Input* in_input){ 139 int Inputs::AddInput(Input* in_input){/*{{{*/ 147 140 148 141 /*First, go through dataset of inputs and check whether any input … … 169 162 } 170 163 /*}}}*/ 171 /*FUNCTION Inputs::ChangeEnum{{{*/ 172 void Inputs::ChangeEnum(int oldenumtype,int newenumtype){ 164 void Inputs::ChangeEnum(int oldenumtype,int newenumtype){/*{{{*/ 173 165 174 166 /*Go through dataset of inputs and look for input with … … 199 191 } 200 192 /*}}}*/ 201 /*FUNCTION Inputs::ConstrainMin{{{*/ 202 void Inputs::ConstrainMin(int constrain_enum, IssmDouble minimum){ 193 void Inputs::ConstrainMin(int constrain_enum, IssmDouble minimum){/*{{{*/ 203 194 204 195 /*Find x and y inputs: */ … … 212 203 } 213 204 /*}}}*/ 214 /*FUNCTION Inputs::InfinityNorm{{{*/ 215 IssmDouble Inputs::InfinityNorm(int enumtype){ 205 IssmDouble Inputs::InfinityNorm(int enumtype){/*{{{*/ 216 206 217 207 /*Output*/ … … 233 223 } 234 224 /*}}}*/ 235 /*FUNCTION Inputs::Max{{{*/ 236 IssmDouble Inputs::Max(int enumtype){ 225 IssmDouble Inputs::Max(int enumtype){/*{{{*/ 237 226 238 227 /*Output*/ … … 254 243 } 255 244 /*}}}*/ 256 /*FUNCTION Inputs::MaxAbs{{{*/ 257 IssmDouble Inputs::MaxAbs(int enumtype){ 245 IssmDouble Inputs::MaxAbs(int enumtype){/*{{{*/ 258 246 259 247 /*Output*/ … … 275 263 } 276 264 /*}}}*/ 277 /*FUNCTION Inputs::Min{{{*/ 278 IssmDouble Inputs::Min(int enumtype){ 265 IssmDouble Inputs::Min(int enumtype){/*{{{*/ 279 266 280 267 /*Output*/ … … 296 283 } 297 284 /*}}}*/ 298 /*FUNCTION Inputs::MinAbs{{{*/ 299 IssmDouble Inputs::MinAbs(int enumtype){ 285 IssmDouble Inputs::MinAbs(int enumtype){/*{{{*/ 300 286 301 287 /*Output*/ … … 317 303 } 318 304 /*}}}*/ 319 /*FUNCTION Inputs::GetInput{{{*/ 320 Input* Inputs::GetInput(int enum_name){ 305 Input* Inputs::GetInput(int enum_name){/*{{{*/ 321 306 322 307 vector<Object*>::iterator object; … … 334 319 } 335 320 /*}}}*/ 336 /*FUNCTION Inputs::DeleteInput{{{*/ 337 int Inputs::DeleteInput(int enum_type){ 321 int Inputs::DeleteInput(int enum_type){/*{{{*/ 338 322 339 323 vector<Object*>::iterator object; … … 354 338 } 355 339 /*}}}*/ 356 /*FUNCTION Inputs::DuplicateInput{{{*/ 357 void Inputs::DuplicateInput(int original_enum,int new_enum){ 340 void Inputs::DuplicateInput(int original_enum,int new_enum){/*{{{*/ 358 341 359 342 /*Make a copy of the original input: */ … … 369 352 } 370 353 /*}}}*/ 371 /*FUNCTION Inputs::SpawnTriaInputs{{{*/ 372 Inputs* Inputs::SpawnTriaInputs(int index1,int index2,int index3){ 354 Inputs* Inputs::SpawnTriaInputs(int index1,int index2,int index3){/*{{{*/ 373 355 374 356 /*Intermediary*/ … … 395 377 } 396 378 /*}}}*/ 397 /*FUNCTION Inputs::SpawnSegInputs{{{*/ 398 Inputs* Inputs::SpawnSegInputs(int index1,int index2){ 379 Inputs* Inputs::SpawnSegInputs(int index1,int index2){/*{{{*/ 399 380 400 381 /*Intermediary*/ … … 421 402 } 422 403 /*}}}*/ 423 /*FUNCTION Inputs::AXPY{{{*/ 424 void Inputs::AXPY(int inputy_enum, IssmDouble scalar, int inputx_enum){ 404 void Inputs::AXPY(int inputy_enum, IssmDouble scalar, int inputx_enum){/*{{{*/ 425 405 426 406 /*Find x and y inputs: */ … … 436 416 } 437 417 /*}}}*/ 438 /*FUNCTION Inputs::Configure{{{*/ 439 void Inputs::Configure(Parameters* parameters){ 418 void Inputs::Configure(Parameters* parameters){/*{{{*/ 440 419 441 420 vector<Object*>::iterator object; -
issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
r17514 r18064 13 13 14 14 /*IntInput constructors and destructor*/ 15 /*FUNCTION IntInput::IntInput(){{{*/ 16 IntInput::IntInput(){ 15 IntInput::IntInput(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION IntInput::IntInput(IssmDouble* values){{{*/ 21 IntInput::IntInput(int in_enum_type,IssmInt in_value){ 19 IntInput::IntInput(int in_enum_type,IssmInt in_value){/*{{{*/ 22 20 23 21 enum_type=in_enum_type; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION IntInput::~IntInput(){{{*/ 28 IntInput::~IntInput(){ 25 IntInput::~IntInput(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION IntInput::DeepEcho{{{*/ 35 void IntInput::DeepEcho(void){ 31 void IntInput::DeepEcho(void){/*{{{*/ 36 32 37 33 _printf_(setw(15)<<" IntInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 38 34 } 39 35 /*}}}*/ 40 /*FUNCTION IntInput::Id{{{*/ 41 int IntInput::Id(void){ return -1; } 36 int IntInput::Id(void){ return -1; }/*{{{*/ 42 37 /*}}}*/ 43 /*FUNCTION IntInput::ObjectEnum{{{*/ 44 int IntInput::ObjectEnum(void){ 38 int IntInput::ObjectEnum(void){/*{{{*/ 45 39 46 40 return IntInputEnum; … … 48 42 } 49 43 /*}}}*/ 50 /*FUNCTION IntInput::copy{{{*/ 51 Object* IntInput::copy() { 44 Object* IntInput::copy() {/*{{{*/ 52 45 53 46 return new IntInput(this->enum_type,this->value); … … 57 50 58 51 /*IntInput management*/ 59 /*FUNCTION IntInput::Echo {{{*/ 60 void IntInput::Echo(void){ 52 void IntInput::Echo(void){/*{{{*/ 61 53 this->DeepEcho(); 62 54 } 63 55 /*}}}*/ 64 /*FUNCTION IntInput::InstanceEnum{{{*/ 65 int IntInput::InstanceEnum(void){ 56 int IntInput::InstanceEnum(void){/*{{{*/ 66 57 67 58 return this->enum_type; … … 69 60 } 70 61 /*}}}*/ 71 /*FUNCTION IntInput::SpawnTriaInput{{{*/ 72 Input* IntInput::SpawnTriaInput(int index1,int index2,int index3){ 62 Input* IntInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 73 63 74 64 /*output*/ … … 83 73 } 84 74 /*}}}*/ 85 /*FUNCTION IntInput::SpawnSegInput{{{*/ 86 Input* IntInput::SpawnSegInput(int index1,int index2){ 75 Input* IntInput::SpawnSegInput(int index1,int index2){/*{{{*/ 87 76 88 77 /*output*/ … … 99 88 100 89 /*Object functions*/ 101 /*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/ 102 void IntInput::GetInputValue(bool* pvalue){_error_("not supported yet!");} 90 void IntInput::GetInputValue(bool* pvalue){_error_("not supported yet!");}/*{{{*/ 103 91 /*}}}*/ 104 /*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/ 105 void IntInput::GetInputValue(int* pvalue){ 92 void IntInput::GetInputValue(int* pvalue){/*{{{*/ 106 93 *pvalue=value; 107 94 } 108 95 /*}}}*/ 109 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue){{{*/ 110 void IntInput::GetInputValue(IssmDouble* pvalue){ 96 void IntInput::GetInputValue(IssmDouble* pvalue){/*{{{*/ 111 97 _error_("IntInput cannot return a IssmDouble in parallel"); 112 98 } 113 99 /*}}}*/ 114 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 115 void IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");} 100 void IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");}/*{{{*/ 116 101 /*}}}*/ 117 /*FUNCTION IntInput::ChangeEnum{{{*/ 118 void IntInput::ChangeEnum(int newenumtype){ 102 void IntInput::ChangeEnum(int newenumtype){/*{{{*/ 119 103 this->enum_type=newenumtype; 120 104 } 121 105 /*}}}*/ 122 /*FUNCTION IntInput::SquareMin{{{*/ 123 void IntInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 106 void IntInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 124 107 125 108 /*square min of an integer is the square of the integer itself: */ … … 127 110 } 128 111 /*}}}*/ 129 /*FUNCTION IntInput::Scale{{{*/ 130 void IntInput::Scale(IssmDouble scale_factor){ 112 void IntInput::Scale(IssmDouble scale_factor){/*{{{*/ 131 113 IssmDouble dvalue=(IssmDouble)value*scale_factor; 132 114 value=reCast<int>(dvalue); 133 115 } 134 116 /*}}}*/ 135 /*FUNCTION IntInput::AXPY{{{*/ 136 void IntInput::AXPY(Input* xinput,IssmDouble scalar){ 117 void IntInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 137 118 138 119 IssmDouble dvalue; … … 156 137 } 157 138 /*}}}*/ 158 /*FUNCTION IntInput::Constrain{{{*/ 159 void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 139 void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 160 140 161 141 if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=reCast<int>(cm_min); … … 164 144 } 165 145 /*}}}*/ 166 /*FUNCTION IntInput::GetVectorFromInputs{{{*/ 167 void IntInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 146 void IntInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 168 147 169 148 _error_("not supporte yet!"); … … 171 150 } 172 151 /*}}}*/ 173 /*FUNCTION IntInput::Configure{{{*/ 174 void IntInput::Configure(Parameters* parameters){ 152 void IntInput::Configure(Parameters* parameters){/*{{{*/ 175 153 /*do nothing: */ 176 154 } -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
r18039 r18064 13 13 14 14 /*PentaInput constructors and destructor*/ 15 /*FUNCTION PentaInput::PentaInput(){{{*/ 16 PentaInput::PentaInput(){ 15 PentaInput::PentaInput(){/*{{{*/ 17 16 values = NULL; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION PentaInput::PentaInput(int in_enum_type,IssmDouble* values,int element_type){{{*/ 21 PentaInput::PentaInput(int in_enum_type,IssmDouble* in_values,int element_type_in) 19 PentaInput::PentaInput(int in_enum_type,IssmDouble* in_values,int element_type_in)/*{{{*/ 22 20 :PentaRef(1) 23 21 { … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION PentaInput::~PentaInput(){{{*/ 38 PentaInput::~PentaInput(){ 35 PentaInput::~PentaInput(){/*{{{*/ 39 36 xDelete<IssmDouble>(this->values); 40 37 } … … 42 39 43 40 /*Object virtual functions definitions:*/ 44 /*FUNCTION PentaInput::Echo {{{*/ 45 void PentaInput::Echo(void){ 41 void PentaInput::Echo(void){/*{{{*/ 46 42 this->DeepEcho(); 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION PentaInput::DeepEcho{{{*/ 50 void PentaInput::DeepEcho(void){ 45 void PentaInput::DeepEcho(void){/*{{{*/ 51 46 52 47 _printf_(setw(15)<<" PentaInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" ["); … … 55 50 } 56 51 /*}}}*/ 57 /*FUNCTION PentaInput::Id{{{*/ 58 int PentaInput::Id(void){ return -1; } 59 /*}}}*/ 60 /*FUNCTION PentaInput::ObjectEnum{{{*/ 61 int PentaInput::ObjectEnum(void){ 52 int PentaInput::Id(void){ return -1; }/*{{{*/ 53 /*}}}*/ 54 int PentaInput::ObjectEnum(void){/*{{{*/ 62 55 63 56 return PentaInputEnum; … … 65 58 } 66 59 /*}}}*/ 67 /*FUNCTION PentaInput::copy{{{*/ 68 Object* PentaInput::copy() { 60 Object* PentaInput::copy() {/*{{{*/ 69 61 70 62 return new PentaInput(this->enum_type,this->values,this->element_type); … … 74 66 75 67 /*PentaInput management*/ 76 /*FUNCTION PentaInput::InstanceEnum{{{*/ 77 int PentaInput::InstanceEnum(void){ 68 int PentaInput::InstanceEnum(void){/*{{{*/ 78 69 79 70 return this->enum_type; … … 81 72 } 82 73 /*}}}*/ 83 /*FUNCTION PentaInput::SpawnTriaInput{{{*/ 84 Input* PentaInput::SpawnTriaInput(int index1,int index2,int index3){ 74 Input* PentaInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 85 75 86 76 /*output*/ … … 112 102 } 113 103 /*}}}*/ 114 /*FUNCTION PentaInput::SpawnSegInput{{{*/ 115 Input* PentaInput::SpawnSegInput(int index1,int index2){ 104 Input* PentaInput::SpawnSegInput(int index1,int index2){/*{{{*/ 116 105 117 106 _error_("not supported"); 118 107 } 119 108 /*}}}*/ 120 /*FUNCTION PentaInput::GetResultInterpolation{{{*/ 121 int PentaInput::GetResultInterpolation(void){ 109 int PentaInput::GetResultInterpolation(void){/*{{{*/ 122 110 123 111 if(this->element_type==P0Enum){ … … 128 116 } 129 117 /*}}}*/ 130 /*FUNCTION PentaInput::GetResultNumberOfNodes{{{*/ 131 int PentaInput::GetResultNumberOfNodes(void){ 118 int PentaInput::GetResultNumberOfNodes(void){/*{{{*/ 132 119 133 120 return this->NumberofNodes();; … … 135 122 } 136 123 /*}}}*/ 137 /*FUNCTION PentaInput::ResultToPatch{{{*/ 138 void PentaInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){ 124 void PentaInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){/*{{{*/ 139 125 140 126 int numnodes = this->NumberofNodes(); … … 150 136 151 137 /*Object functions*/ 152 /*FUNCTION PentaInput::GetInputValue(IssmDouble* pvalue){{{*/ 153 void PentaInput::GetInputValue(IssmDouble* pvalue){ 138 void PentaInput::GetInputValue(IssmDouble* pvalue){/*{{{*/ 154 139 155 140 if(this->element_type==P0Enum){ … … 159 144 } 160 145 /*}}}*/ 161 /*FUNCTION PentaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 162 void PentaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 146 void PentaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 163 147 164 148 /*Call PentaRef function*/ … … 168 152 } 169 153 /*}}}*/ 170 /*FUNCTION PentaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){{{*/ 171 void PentaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list,Gauss* gauss){ 154 void PentaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 172 155 173 156 /*Call PentaRef function*/ … … 176 159 } 177 160 /*}}}*/ 178 /*FUNCTION PentaInput::ChangeEnum{{{*/ 179 void PentaInput::ChangeEnum(int newenumtype){ 161 void PentaInput::ChangeEnum(int newenumtype){/*{{{*/ 180 162 this->enum_type=newenumtype; 181 163 } 182 164 /*}}}*/ 183 /*FUNCTION PentaInput::GetInputAverage{{{*/ 184 void PentaInput::GetInputAverage(IssmDouble* pvalue){ 165 void PentaInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 185 166 186 167 int numnodes = this->NumberofNodes(); … … 196 177 197 178 /*Intermediary*/ 198 /*FUNCTION PentaInput::SquareMin{{{*/ 199 void PentaInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 179 void PentaInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 200 180 201 181 int numnodes=this->NumberofNodes(); … … 211 191 } 212 192 /*}}}*/ 213 /*FUNCTION PentaInput::ConstrainMin{{{*/ 214 void PentaInput::ConstrainMin(IssmDouble minimum){ 193 void PentaInput::ConstrainMin(IssmDouble minimum){/*{{{*/ 215 194 216 195 int numnodes = this->NumberofNodes(); … … 218 197 } 219 198 /*}}}*/ 220 /*FUNCTION PentaInput::InfinityNorm{{{*/ 221 IssmDouble PentaInput::InfinityNorm(void){ 199 IssmDouble PentaInput::InfinityNorm(void){/*{{{*/ 222 200 223 201 /*Output*/ … … 229 207 } 230 208 /*}}}*/ 231 /*FUNCTION PentaInput::Max{{{*/ 232 IssmDouble PentaInput::Max(void){ 209 IssmDouble PentaInput::Max(void){/*{{{*/ 233 210 234 211 int numnodes=this->NumberofNodes(); … … 241 218 } 242 219 /*}}}*/ 243 /*FUNCTION PentaInput::MaxAbs{{{*/ 244 IssmDouble PentaInput::MaxAbs(void){ 220 IssmDouble PentaInput::MaxAbs(void){/*{{{*/ 245 221 246 222 int numnodes=this->NumberofNodes(); … … 253 229 } 254 230 /*}}}*/ 255 /*FUNCTION PentaInput::Min{{{*/ 256 IssmDouble PentaInput::Min(void){ 231 IssmDouble PentaInput::Min(void){/*{{{*/ 257 232 258 233 const int numnodes=this->NumberofNodes(); … … 265 240 } 266 241 /*}}}*/ 267 /*FUNCTION PentaInput::MinAbs{{{*/ 268 IssmDouble PentaInput::MinAbs(void){ 242 IssmDouble PentaInput::MinAbs(void){/*{{{*/ 269 243 270 244 const int numnodes=this->NumberofNodes(); … … 277 251 } 278 252 /*}}}*/ 279 /*FUNCTION PentaInput::Scale{{{*/ 280 void PentaInput::Scale(IssmDouble scale_factor){ 253 void PentaInput::Scale(IssmDouble scale_factor){/*{{{*/ 281 254 282 255 const int numnodes=this->NumberofNodes(); … … 284 257 } 285 258 /*}}}*/ 286 /*FUNCTION PentaInput::AXPY{{{*/ 287 void PentaInput::AXPY(Input* xinput,IssmDouble scalar){ 259 void PentaInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 288 260 289 261 const int numnodes=this->NumberofNodes(); … … 306 278 } 307 279 /*}}}*/ 308 /*FUNCTION PentaInput::Constrain{{{*/ 309 void PentaInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 280 void PentaInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 310 281 311 282 int i; … … 317 288 } 318 289 /*}}}*/ 319 /*FUNCTION PentaInput::Extrude{{{*/ 320 void PentaInput::Extrude(void){ 290 void PentaInput::Extrude(void){/*{{{*/ 321 291 322 292 switch(this->element_type){ … … 329 299 } 330 300 /*}}}*/ 331 /*FUNCTION PentaInput::VerticallyIntegrate{{{*/ 332 void PentaInput::VerticallyIntegrate(Input* thickness_input){ 301 void PentaInput::VerticallyIntegrate(Input* thickness_input){/*{{{*/ 333 302 334 303 IssmDouble thickness; … … 360 329 } 361 330 /*}}}*/ 362 /*FUNCTION PentaInput::PointwiseDivide{{{*/ 363 Input* PentaInput::PointwiseDivide(Input* inputB){ 331 Input* PentaInput::PointwiseDivide(Input* inputB){/*{{{*/ 364 332 365 333 /*Ouput*/ … … 393 361 } 394 362 /*}}}*/ 395 /*FUNCTION PentaInput::PointwiseMin{{{*/ 396 Input* PentaInput::PointwiseMin(Input* inputB){ 363 Input* PentaInput::PointwiseMin(Input* inputB){/*{{{*/ 397 364 398 365 /*Ouput*/ … … 424 391 } 425 392 /*}}}*/ 426 /*FUNCTION PentaInput::PointwiseMax{{{*/ 427 Input* PentaInput::PointwiseMax(Input* inputB){ 393 Input* PentaInput::PointwiseMax(Input* inputB){/*{{{*/ 428 394 429 395 /*Ouput*/ … … 455 421 } 456 422 /*}}}*/ 457 /*FUNCTION PentaInput::GetVectorFromInputs{{{*/ 458 void PentaInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 423 void PentaInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 459 424 const int numvertices=6; 460 425 vector->SetValues(numvertices,doflist,this->values,INS_VAL); 461 426 } /*}}}*/ 462 /*FUNCTION PentaInput::Configure{{{*/ 463 void PentaInput::Configure(Parameters* parameters){ 427 void PentaInput::Configure(Parameters* parameters){/*{{{*/ 464 428 /*do nothing: */ 465 429 } -
issm/trunk-jpl/src/c/classes/Inputs/SegInput.cpp
r17309 r18064 13 13 14 14 /*SegInput constructors and destructor*/ 15 /*FUNCTION SegInput::SegInput(){{{*/ 16 SegInput::SegInput(){ 15 SegInput::SegInput(){/*{{{*/ 17 16 values = NULL; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION SegInput::SegInput(int in_enum_type,IssmDouble* invalues,element_type_in){{{*/ 21 SegInput::SegInput(int in_enum_type,IssmDouble* in_values,int element_type_in) 19 SegInput::SegInput(int in_enum_type,IssmDouble* in_values,int element_type_in)/*{{{*/ 22 20 :SegRef(1) 23 21 { … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION SegInput::~SegInput(){{{*/ 38 SegInput::~SegInput(){ 35 SegInput::~SegInput(){/*{{{*/ 39 36 xDelete<IssmDouble>(this->values); 40 37 } … … 42 39 43 40 /*Object virtual functions definitions:*/ 44 /*FUNCTION SegInput::Echo {{{*/ 45 void SegInput::Echo(void){ 41 void SegInput::Echo(void){/*{{{*/ 46 42 this->DeepEcho(); 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION SegInput::DeepEcho{{{*/ 50 void SegInput::DeepEcho(void){ 45 void SegInput::DeepEcho(void){/*{{{*/ 51 46 52 47 _printf_(setw(15)<<" SegInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" ["); … … 55 50 } 56 51 /*}}}*/ 57 /*FUNCTION SegInput::Id{{{*/ 58 int SegInput::Id(void){ return -1; } 52 int SegInput::Id(void){ return -1; }/*{{{*/ 59 53 /*}}}*/ 60 /*FUNCTION SegInput::ObjectEnum{{{*/ 61 int SegInput::ObjectEnum(void){ 54 int SegInput::ObjectEnum(void){/*{{{*/ 62 55 63 56 return SegInputEnum; … … 65 58 } 66 59 /*}}}*/ 67 /*FUNCTION SegInput::copy{{{*/ 68 Object* SegInput::copy() { 60 Object* SegInput::copy() {/*{{{*/ 69 61 70 62 return new SegInput(this->enum_type,this->values,this->element_type); … … 74 66 75 67 /*SegInput management*/ 76 /*FUNCTION SegInput::InstanceEnum{{{*/ 77 int SegInput::InstanceEnum(void){ 68 int SegInput::InstanceEnum(void){/*{{{*/ 78 69 79 70 return this->enum_type; … … 83 74 84 75 /*Object functions*/ 85 /*FUNCTION SegInput::GetInputAverage{{{*/ 86 void SegInput::GetInputAverage(IssmDouble* pvalue){ 76 void SegInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 87 77 88 78 int numnodes = this->NumberofNodes(); … … 96 86 } 97 87 /*}}}*/ 98 /*FUNCTION SegInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 99 void SegInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 88 void SegInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 100 89 101 90 /*Call SegRef function*/ … … 105 94 } 106 95 /*}}}*/ 107 /*FUNCTION SegInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){{{*/ 108 void SegInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list,Gauss* gauss){ 96 void SegInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 109 97 110 98 /*Call SegRef function*/ … … 113 101 } 114 102 /*}}}*/ 115 /*FUNCTION SegInput::Configure{{{*/ 116 void SegInput::Configure(Parameters* parameters){ 103 void SegInput::Configure(Parameters* parameters){/*{{{*/ 117 104 /*do nothing: */ 118 105 } 119 106 /*}}}*/ 120 /*FUNCTION SegInput::Min{{{*/ 121 IssmDouble SegInput::Min(void){ 107 IssmDouble SegInput::Min(void){/*{{{*/ 122 108 123 109 const int numnodes=this->NumberofNodes(); -
issm/trunk-jpl/src/c/classes/Inputs/TetraInput.cpp
r18039 r18064 13 13 14 14 /*TetraInput constructors and destructor*/ 15 /*FUNCTION TetraInput::TetraInput(){{{*/ 16 TetraInput::TetraInput(){ 15 TetraInput::TetraInput(){/*{{{*/ 17 16 values = NULL; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION TetraInput::TetraInput(int in_enum_type,IssmDouble* invalues,element_type_in){{{*/ 21 TetraInput::TetraInput(int in_enum_type,IssmDouble* in_values,int element_type_in) 19 TetraInput::TetraInput(int in_enum_type,IssmDouble* in_values,int element_type_in)/*{{{*/ 22 20 :TetraRef(1) 23 21 { … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION TetraInput::~TetraInput(){{{*/ 38 TetraInput::~TetraInput(){ 35 TetraInput::~TetraInput(){/*{{{*/ 39 36 xDelete<IssmDouble>(this->values); 40 37 } … … 42 39 43 40 /*Object virtual functions definitions:*/ 44 /*FUNCTION TetraInput::Echo {{{*/ 45 void TetraInput::Echo(void){ 41 void TetraInput::Echo(void){/*{{{*/ 46 42 this->DeepEcho(); 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION TetraInput::DeepEcho{{{*/ 50 void TetraInput::DeepEcho(void){ 45 void TetraInput::DeepEcho(void){/*{{{*/ 51 46 52 47 _printf_(setw(15)<<" TetraInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" ["); … … 55 50 } 56 51 /*}}}*/ 57 /*FUNCTION TetraInput::Id{{{*/ 58 int TetraInput::Id(void){ return -1; } 59 /*}}}*/ 60 /*FUNCTION TetraInput::ObjectEnum{{{*/ 61 int TetraInput::ObjectEnum(void){ 52 int TetraInput::Id(void){ return -1; }/*{{{*/ 53 /*}}}*/ 54 int TetraInput::ObjectEnum(void){/*{{{*/ 62 55 63 56 return TetraInputEnum; … … 65 58 } 66 59 /*}}}*/ 67 /*FUNCTION TetraInput::copy{{{*/ 68 Object* TetraInput::copy() { 60 Object* TetraInput::copy() {/*{{{*/ 69 61 70 62 return new TetraInput(this->enum_type,this->values,this->element_type); … … 74 66 75 67 /*TetraInput management*/ 76 /*FUNCTION TetraInput::InstanceEnum{{{*/ 77 int TetraInput::InstanceEnum(void){ 68 int TetraInput::InstanceEnum(void){/*{{{*/ 78 69 79 70 return this->enum_type; … … 81 72 } 82 73 /*}}}*/ 83 /*FUNCTION TetraInput::GetResultInterpolation{{{*/ 84 int TetraInput::GetResultInterpolation(void){ 74 int TetraInput::GetResultInterpolation(void){/*{{{*/ 85 75 86 76 if(this->element_type==P0Enum){ … … 91 81 } 92 82 /*}}}*/ 93 /*FUNCTION TetraInput::GetResultNumberOfNodes{{{*/ 94 int TetraInput::GetResultNumberOfNodes(void){ 83 int TetraInput::GetResultNumberOfNodes(void){/*{{{*/ 95 84 96 85 return this->NumberofNodes(); … … 98 87 } 99 88 /*}}}*/ 100 /*FUNCTION TetraInput::ResultToPatch{{{*/ 101 void TetraInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){ 89 void TetraInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){/*{{{*/ 102 90 103 91 int numnodes = this->NumberofNodes(); … … 113 101 114 102 /*Object functions*/ 115 /*FUNCTION TetraInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 116 void TetraInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 103 void TetraInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 117 104 118 105 /*Call TetraRef function*/ … … 122 109 } 123 110 /*}}}*/ 124 /*FUNCTION TetraInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){{{*/ 125 void TetraInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){ 111 void TetraInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 126 112 127 113 /*Call TetraRef function*/ … … 130 116 } 131 117 /*}}}*/ 132 /*FUNCTION TetraInput::ChangeEnum{{{*/ 133 void TetraInput::ChangeEnum(int newenumtype){ 118 void TetraInput::ChangeEnum(int newenumtype){/*{{{*/ 134 119 this->enum_type=newenumtype; 135 120 } 136 121 /*}}}*/ 137 /*FUNCTION TetraInput::GetInputAverage{{{*/ 138 void TetraInput::GetInputAverage(IssmDouble* pvalue){ 122 void TetraInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 139 123 140 124 int numnodes = this->NumberofNodes(); … … 148 132 } 149 133 /*}}}*/ 150 /*FUNCTION TetraInput::GetInputAllTimeAverages{{{*/ 151 void TetraInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){ 134 void TetraInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/ 152 135 153 136 IssmDouble* outvalues=NULL; … … 168 151 } 169 152 /*}}}*/ 170 /*FUNCTION TetraInput::GetInputUpToCurrentTimeAverages{{{*/ 171 void TetraInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){ 153 void TetraInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/ 172 154 173 155 IssmDouble* outvalues=NULL; … … 188 170 } 189 171 /*}}}*/ 190 /*FUNCTION TetraInput::SpawnTriaInput{{{*/ 191 Input* TetraInput::SpawnTriaInput(int index1,int index2,int index3){ 172 Input* TetraInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 192 173 193 174 /*output*/ … … 221 202 222 203 /*Intermediary*/ 223 /*FUNCTION TetraInput::SquareMin{{{*/ 224 void TetraInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 204 void TetraInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 225 205 226 206 int numnodes=this->NumberofNodes(); … … 236 216 } 237 217 /*}}}*/ 238 /*FUNCTION TetraInput::ContrainMin{{{*/ 239 void TetraInput::ConstrainMin(IssmDouble minimum){ 218 void TetraInput::ConstrainMin(IssmDouble minimum){/*{{{*/ 240 219 241 220 int numnodes = this->NumberofNodes(); … … 243 222 } 244 223 /*}}}*/ 245 /*FUNCTION TetraInput::InfinityNorm{{{*/ 246 IssmDouble TetraInput::InfinityNorm(void){ 224 IssmDouble TetraInput::InfinityNorm(void){/*{{{*/ 247 225 248 226 /*Output*/ … … 254 232 } 255 233 /*}}}*/ 256 /*FUNCTION TetraInput::Max{{{*/ 257 IssmDouble TetraInput::Max(void){ 234 IssmDouble TetraInput::Max(void){/*{{{*/ 258 235 259 236 int numnodes=this->NumberofNodes(); … … 266 243 } 267 244 /*}}}*/ 268 /*FUNCTION TetraInput::MaxAbs{{{*/ 269 IssmDouble TetraInput::MaxAbs(void){ 245 IssmDouble TetraInput::MaxAbs(void){/*{{{*/ 270 246 271 247 int numnodes=this->NumberofNodes(); … … 278 254 } 279 255 /*}}}*/ 280 /*FUNCTION TetraInput::Min{{{*/ 281 IssmDouble TetraInput::Min(void){ 256 IssmDouble TetraInput::Min(void){/*{{{*/ 282 257 283 258 const int numnodes=this->NumberofNodes(); … … 290 265 } 291 266 /*}}}*/ 292 /*FUNCTION TetraInput::MinAbs{{{*/ 293 IssmDouble TetraInput::MinAbs(void){ 267 IssmDouble TetraInput::MinAbs(void){/*{{{*/ 294 268 295 269 const int numnodes=this->NumberofNodes(); … … 302 276 } 303 277 /*}}}*/ 304 /*FUNCTION TetraInput::Scale{{{*/ 305 void TetraInput::Scale(IssmDouble scale_factor){ 278 void TetraInput::Scale(IssmDouble scale_factor){/*{{{*/ 306 279 307 280 const int numnodes=this->NumberofNodes(); … … 309 282 } 310 283 /*}}}*/ 311 /*FUNCTION TetraInput::Set{{{*/ 312 void TetraInput::Set(IssmDouble setvalue){ 284 void TetraInput::Set(IssmDouble setvalue){/*{{{*/ 313 285 314 286 const int numnodes=this->NumberofNodes(); … … 316 288 } 317 289 /*}}}*/ 318 /*FUNCTION TetraInput::AXPY{{{*/ 319 void TetraInput::AXPY(Input* xinput,IssmDouble scalar){ 290 void TetraInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 320 291 321 292 const int numnodes=this->NumberofNodes(); … … 332 303 } 333 304 /*}}}*/ 334 /*FUNCTION TetraInput::Constrain{{{*/ 335 void TetraInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 305 void TetraInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 336 306 337 307 int i; … … 343 313 } 344 314 /*}}}*/ 345 /*FUNCTION TetraInput::GetVectorFromInputs{{{*/ 346 void TetraInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 315 void TetraInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 347 316 const int numvertices=4; 348 317 vector->SetValues(numvertices,doflist,this->values,INS_VAL); 349 318 } /*}}}*/ 350 /*FUNCTION TetraInput::PointwiseMin{{{*/ 351 Input* TetraInput::PointwiseMin(Input* inputB){ 319 Input* TetraInput::PointwiseMin(Input* inputB){/*{{{*/ 352 320 353 321 /*Ouput*/ … … 380 348 } 381 349 /*}}}*/ 382 /*FUNCTION TetraInput::PointwiseMax{{{*/ 383 Input* TetraInput::PointwiseMax(Input* inputB){ 350 Input* TetraInput::PointwiseMax(Input* inputB){/*{{{*/ 384 351 385 352 /*Ouput*/ … … 412 379 } 413 380 /*}}}*/ 414 /*FUNCTION TetraInput::PointwiseDivide{{{*/ 415 Input* TetraInput::PointwiseDivide(Input* inputB){ 381 Input* TetraInput::PointwiseDivide(Input* inputB){/*{{{*/ 416 382 417 383 /*Ouput*/ … … 445 411 } 446 412 /*}}}*/ 447 /*FUNCTION TetraInput::Configure{{{*/ 448 void TetraInput::Configure(Parameters* parameters){ 413 void TetraInput::Configure(Parameters* parameters){/*{{{*/ 449 414 /*do nothing: */ 450 415 } -
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
r18001 r18064 14 14 15 15 /*TransientInput constructors and destructor*/ 16 /*FUNCTION TransientInput::TransientInput(){{{*/ 17 TransientInput::TransientInput(){ 16 TransientInput::TransientInput(){/*{{{*/ 18 17 19 18 enum_type=UNDEF; … … 25 24 } 26 25 /*}}}*/ 27 /*FUNCTION TransientInput::TransientInput(int in_enum_type){{{*/ 28 TransientInput::TransientInput(int in_enum_type) 26 TransientInput::TransientInput(int in_enum_type)/*{{{*/ 29 27 { 30 28 /*Set Enum*/ … … 39 37 } 40 38 /*}}}*/ 41 /*FUNCTION TransientInput::TransientInput(int in_enum_type,IssmDouble* timesin,int N){{{*/ 42 TransientInput::TransientInput(int in_enum_type,IssmDouble* timesin,int N){ 39 TransientInput::TransientInput(int in_enum_type,IssmDouble* timesin,int N){/*{{{*/ 43 40 44 41 /*Set Enum*/ … … 54 51 } 55 52 /*}}}*/ 56 /*FUNCTION TransientInput::~TransientInput{{{*/ 57 TransientInput::~TransientInput(){ 53 TransientInput::~TransientInput(){/*{{{*/ 58 54 xDelete(this->timesteps); 59 55 this->timesteps=NULL; … … 66 62 67 63 /*Object virtual functions definitions:*/ 68 /*FUNCTION TransientInput::Echo {{{*/ 69 void TransientInput::Echo(void){ 64 void TransientInput::Echo(void){/*{{{*/ 70 65 this->DeepEcho(); 71 66 } 72 67 /*}}}*/ 73 /*FUNCTION TransientInput::DeepEcho{{{*/ 74 void TransientInput::DeepEcho(void){ 68 void TransientInput::DeepEcho(void){/*{{{*/ 75 69 76 70 int i; … … 86 80 } 87 81 /*}}}*/ 88 /*FUNCTION TransientInput::Id{{{*/ 89 int TransientInput::Id(void){ return -1; } 90 /*}}}*/ 91 /*FUNCTION TransientInput::ObjectEnum{{{*/ 92 int TransientInput::ObjectEnum(void){ 82 int TransientInput::Id(void){ return -1; }/*{{{*/ 83 /*}}}*/ 84 int TransientInput::ObjectEnum(void){/*{{{*/ 93 85 94 86 return TransientInputEnum; … … 96 88 } 97 89 /*}}}*/ 98 /*FUNCTION TransientInput::copy{{{*/ 99 Object* TransientInput::copy() { 90 Object* TransientInput::copy() {/*{{{*/ 100 91 101 92 TransientInput* output=NULL; … … 115 106 116 107 /*TransientInput management*/ 117 /*FUNCTION TransientInput::InstanceEnum{{{*/ 118 int TransientInput::InstanceEnum(void){ 108 int TransientInput::InstanceEnum(void){/*{{{*/ 119 109 120 110 return this->enum_type; … … 122 112 } 123 113 /*}}}*/ 124 /*FUNCTION TransientInput::SpawnTriaInput{{{*/ 125 Input* TransientInput::SpawnTriaInput(int index1,int index2,int index3){ 114 Input* TransientInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 126 115 127 116 /*output*/ … … 142 131 } 143 132 /*}}}*/ 144 /*FUNCTION TransientInput::SpawnSegInput{{{*/ 145 Input* TransientInput::SpawnSegInput(int index1,int index2){ 133 Input* TransientInput::SpawnSegInput(int index1,int index2){/*{{{*/ 146 134 147 135 /*output*/ … … 164 152 165 153 /*Object functions*/ 166 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 167 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 154 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 168 155 IssmDouble time; 169 156 … … 180 167 } 181 168 /*}}}*/ 182 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){{{*/ 183 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){ 169 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){/*{{{*/ 184 170 185 171 /*Retrieve interpolated values for this time step: */ … … 192 178 } 193 179 /*}}}*/ 194 /*FUNCTION TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){{{*/ 195 void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){ 180 void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 196 181 197 182 IssmDouble time; … … 209 194 } 210 195 /*}}}*/ 211 /*FUNCTION TransientInput::ChangeEnum{{{*/ 212 void TransientInput::ChangeEnum(int newenumtype){ 196 void TransientInput::ChangeEnum(int newenumtype){/*{{{*/ 213 197 this->enum_type=newenumtype; 214 198 } 215 199 /*}}}*/ 216 /*FUNCTION TransientInput::GetInputAverage{{{*/ 217 void TransientInput::GetInputAverage(IssmDouble* pvalue){ 200 void TransientInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 218 201 219 202 IssmDouble time; … … 232 215 } 233 216 /*}}}*/ 234 /*FUNCTION TransientInput::GetInputAllTimeAverages{{{*/ 235 void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){ 217 void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/ 236 218 237 219 int i; … … 254 236 } 255 237 /*}}}*/ 256 /*FUNCTION TransientInput::GetInputUpToCurrentTimeAverages{{{*/ 257 void TransientInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){ 238 void TransientInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/ 258 239 259 240 int i; … … 299 280 300 281 /*Intermediary*/ 301 /*FUNCTION TransientInput::AddTimeInput{{{*/ 302 void TransientInput::AddTimeInput(Input* input,IssmDouble time){ 282 void TransientInput::AddTimeInput(Input* input,IssmDouble time){/*{{{*/ 303 283 304 284 /*insert values at time step: */ … … 328 308 } 329 309 /*}}}*/ 330 /*FUNCTION TransientInput::AddTimeInput{{{*/ 331 void TransientInput::AddTimeInput(Input* input){ 310 void TransientInput::AddTimeInput(Input* input){/*{{{*/ 332 311 333 312 _assert_(this->inputs->Size()<this->numtimesteps); … … 336 315 } 337 316 /*}}}*/ 338 /*FUNCTION TransientInput::GetResultInterpolation{{{*/ 339 int TransientInput::GetResultInterpolation(void){ 317 int TransientInput::GetResultInterpolation(void){/*{{{*/ 340 318 341 319 IssmDouble time; … … 352 330 } 353 331 /*}}}*/ 354 /*FUNCTION TransientInput::GetResultNumberOfNodes{{{*/ 355 int TransientInput::GetResultNumberOfNodes(void){ 332 int TransientInput::GetResultNumberOfNodes(void){/*{{{*/ 356 333 357 334 IssmDouble time; … … 368 345 } 369 346 /*}}}*/ 370 /*FUNCTION TransientInput::Extrude{{{*/ 371 void TransientInput::Extrude(void){ 347 void TransientInput::Extrude(void){/*{{{*/ 372 348 373 349 for(int i=0;i<this->numtimesteps;i++){ … … 376 352 } 377 353 /*}}}*/ 378 /*FUNCTION TransientInput::SquareMin{{{*/ 379 void TransientInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 354 void TransientInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 380 355 381 356 IssmDouble time; … … 394 369 } 395 370 /*}}}*/ 396 /*FUNCTION TransientInput::InfinityNorm{{{*/ 397 IssmDouble TransientInput::InfinityNorm(void){ 371 IssmDouble TransientInput::InfinityNorm(void){/*{{{*/ 398 372 399 373 IssmDouble time; … … 414 388 } 415 389 /*}}}*/ 416 /*FUNCTION TransientInput::Max{{{*/ 417 IssmDouble TransientInput::Max(void){ 390 IssmDouble TransientInput::Max(void){/*{{{*/ 418 391 419 392 IssmDouble time; … … 434 407 } 435 408 /*}}}*/ 436 /*FUNCTION TransientInput::MaxAbs{{{*/ 437 IssmDouble TransientInput::MaxAbs(void){ 409 IssmDouble TransientInput::MaxAbs(void){/*{{{*/ 438 410 439 411 IssmDouble time; … … 455 427 } 456 428 /*}}}*/ 457 /*FUNCTION TransientInput::Min{{{*/ 458 IssmDouble TransientInput::Min(void){ 429 IssmDouble TransientInput::Min(void){/*{{{*/ 459 430 460 431 IssmDouble time; … … 476 447 } 477 448 /*}}}*/ 478 /*FUNCTION TransientInput::MinAbs{{{*/ 479 IssmDouble TransientInput::MinAbs(void){ 449 IssmDouble TransientInput::MinAbs(void){/*{{{*/ 480 450 481 451 IssmDouble time; … … 496 466 } 497 467 /*}}}*/ 498 /*FUNCTION TransientInput::GetVectorFromInputs{{{*/ 499 void TransientInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 468 void TransientInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 500 469 501 470 IssmDouble time; … … 513 482 514 483 } /*}}}*/ 515 /*FUNCTION TransientInput::GetTimeInput{{{*/ 516 Input* TransientInput::GetTimeInput(IssmDouble intime){ 484 Input* TransientInput::GetTimeInput(IssmDouble intime){/*{{{*/ 517 485 518 486 IssmDouble deltat; … … 563 531 } 564 532 /*}}}*/ 565 /*FUNCTION TransientInput::Configure{{{*/ 566 void TransientInput::Configure(Parameters* parameters){ 533 void TransientInput::Configure(Parameters* parameters){/*{{{*/ 567 534 this->parameters=parameters; 568 535 } -
issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp
r18039 r18064 13 13 14 14 /*TriaInput constructors and destructor*/ 15 /*FUNCTION TriaInput::TriaInput(){{{*/ 16 TriaInput::TriaInput(){ 15 TriaInput::TriaInput(){/*{{{*/ 17 16 values = NULL; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION TriaInput::TriaInput(int in_enum_type,IssmDouble* invalues,element_type_in){{{*/ 21 TriaInput::TriaInput(int in_enum_type,IssmDouble* in_values,int element_type_in) 19 TriaInput::TriaInput(int in_enum_type,IssmDouble* in_values,int element_type_in)/*{{{*/ 22 20 :TriaRef(1) 23 21 { … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION TriaInput::~TriaInput(){{{*/ 38 TriaInput::~TriaInput(){ 35 TriaInput::~TriaInput(){/*{{{*/ 39 36 xDelete<IssmDouble>(this->values); 40 37 } … … 42 39 43 40 /*Object virtual functions definitions:*/ 44 /*FUNCTION TriaInput::Echo {{{*/ 45 void TriaInput::Echo(void){ 41 void TriaInput::Echo(void){/*{{{*/ 46 42 this->DeepEcho(); 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION TriaInput::DeepEcho{{{*/ 50 void TriaInput::DeepEcho(void){ 45 void TriaInput::DeepEcho(void){/*{{{*/ 51 46 52 47 _printf_(setw(15)<<" TriaInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" ["); … … 55 50 } 56 51 /*}}}*/ 57 /*FUNCTION TriaInput::Id{{{*/ 58 int TriaInput::Id(void){ return -1; } 59 /*}}}*/ 60 /*FUNCTION TriaInput::ObjectEnum{{{*/ 61 int TriaInput::ObjectEnum(void){ 52 int TriaInput::Id(void){ return -1; }/*{{{*/ 53 /*}}}*/ 54 int TriaInput::ObjectEnum(void){/*{{{*/ 62 55 63 56 return TriaInputEnum; … … 65 58 } 66 59 /*}}}*/ 67 /*FUNCTION TriaInput::copy{{{*/ 68 Object* TriaInput::copy() { 60 Object* TriaInput::copy() {/*{{{*/ 69 61 70 62 return new TriaInput(this->enum_type,this->values,this->element_type); … … 74 66 75 67 /*TriaInput management*/ 76 /*FUNCTION TriaInput::InstanceEnum{{{*/ 77 int TriaInput::InstanceEnum(void){ 68 int TriaInput::InstanceEnum(void){/*{{{*/ 78 69 79 70 return this->enum_type; … … 81 72 } 82 73 /*}}}*/ 83 /*FUNCTION TriaInput::SpawnTriaInput{{{*/ 84 Input* TriaInput::SpawnTriaInput(int index1,int index2,int index3){ 74 Input* TriaInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 85 75 86 76 /*output*/ … … 95 85 } 96 86 /*}}}*/ 97 /*FUNCTION TriaInput::SpawnSegInput{{{*/ 98 Input* TriaInput::SpawnSegInput(int index1,int index2){ 87 Input* TriaInput::SpawnSegInput(int index1,int index2){/*{{{*/ 99 88 100 89 /*output*/ … … 121 110 } 122 111 /*}}}*/ 123 /*FUNCTION TriaInput::GetResultInterpolation{{{*/ 124 int TriaInput::GetResultInterpolation(void){ 112 int TriaInput::GetResultInterpolation(void){/*{{{*/ 125 113 126 114 if(this->element_type==P0Enum){ … … 131 119 } 132 120 /*}}}*/ 133 /*FUNCTION TriaInput::GetResultNumberOfNodes{{{*/ 134 int TriaInput::GetResultNumberOfNodes(void){ 121 int TriaInput::GetResultNumberOfNodes(void){/*{{{*/ 135 122 136 123 return this->NumberofNodes(); … … 138 125 } 139 126 /*}}}*/ 140 /*FUNCTION TriaInput::ResultToPatch{{{*/ 141 void TriaInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){ 127 void TriaInput::ResultToPatch(IssmDouble* values,int nodesperelement,int sid){/*{{{*/ 142 128 143 129 int numnodes = this->NumberofNodes(); … … 153 139 154 140 /*Object functions*/ 155 /*FUNCTION TriaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 156 void TriaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 141 void TriaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/ 157 142 158 143 /*Call TriaRef function*/ … … 162 147 } 163 148 /*}}}*/ 164 /*FUNCTION TriaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){{{*/ 165 void TriaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){ 149 void TriaInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 166 150 167 151 /*Call TriaRef function*/ … … 170 154 } 171 155 /*}}}*/ 172 /*FUNCTION TriaInput::ChangeEnum{{{*/ 173 void TriaInput::ChangeEnum(int newenumtype){ 156 void TriaInput::ChangeEnum(int newenumtype){/*{{{*/ 174 157 this->enum_type=newenumtype; 175 158 } 176 159 /*}}}*/ 177 /*FUNCTION TriaInput::GetInputAverage{{{*/ 178 void TriaInput::GetInputAverage(IssmDouble* pvalue){ 160 void TriaInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/ 179 161 180 162 int numnodes = this->NumberofNodes(); … … 188 170 } 189 171 /*}}}*/ 190 /*FUNCTION TriaInput::GetInputAllTimeAverages{{{*/ 191 void TriaInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){ 172 void TriaInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/ 192 173 193 174 IssmDouble* outvalues=NULL; … … 208 189 } 209 190 /*}}}*/ 210 /*FUNCTION TriaInput::GetInputUpToCurrentTimeAverages{{{*/ 211 void TriaInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){ 191 void TriaInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/ 212 192 213 193 IssmDouble* outvalues=NULL; … … 230 210 231 211 /*Intermediary*/ 232 /*FUNCTION TriaInput::SquareMin{{{*/ 233 void TriaInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 212 void TriaInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 234 213 235 214 int numnodes=this->NumberofNodes(); … … 245 224 } 246 225 /*}}}*/ 247 /*FUNCTION TriaInput::ContrainMin{{{*/ 248 void TriaInput::ConstrainMin(IssmDouble minimum){ 226 void TriaInput::ConstrainMin(IssmDouble minimum){/*{{{*/ 249 227 250 228 int numnodes = this->NumberofNodes(); … … 252 230 } 253 231 /*}}}*/ 254 /*FUNCTION TriaInput::InfinityNorm{{{*/ 255 IssmDouble TriaInput::InfinityNorm(void){ 232 IssmDouble TriaInput::InfinityNorm(void){/*{{{*/ 256 233 257 234 /*Output*/ … … 263 240 } 264 241 /*}}}*/ 265 /*FUNCTION TriaInput::Max{{{*/ 266 IssmDouble TriaInput::Max(void){ 242 IssmDouble TriaInput::Max(void){/*{{{*/ 267 243 268 244 int numnodes=this->NumberofNodes(); … … 275 251 } 276 252 /*}}}*/ 277 /*FUNCTION TriaInput::MaxAbs{{{*/ 278 IssmDouble TriaInput::MaxAbs(void){ 253 IssmDouble TriaInput::MaxAbs(void){/*{{{*/ 279 254 280 255 int numnodes=this->NumberofNodes(); … … 287 262 } 288 263 /*}}}*/ 289 /*FUNCTION TriaInput::Min{{{*/ 290 IssmDouble TriaInput::Min(void){ 264 IssmDouble TriaInput::Min(void){/*{{{*/ 291 265 292 266 const int numnodes=this->NumberofNodes(); … … 299 273 } 300 274 /*}}}*/ 301 /*FUNCTION TriaInput::MinAbs{{{*/ 302 IssmDouble TriaInput::MinAbs(void){ 275 IssmDouble TriaInput::MinAbs(void){/*{{{*/ 303 276 304 277 const int numnodes=this->NumberofNodes(); … … 311 284 } 312 285 /*}}}*/ 313 /*FUNCTION TriaInput::Scale{{{*/ 314 void TriaInput::Scale(IssmDouble scale_factor){ 286 void TriaInput::Scale(IssmDouble scale_factor){/*{{{*/ 315 287 316 288 const int numnodes=this->NumberofNodes(); … … 318 290 } 319 291 /*}}}*/ 320 /*FUNCTION TriaInput::Set{{{*/ 321 void TriaInput::Set(IssmDouble setvalue){ 292 void TriaInput::Set(IssmDouble setvalue){/*{{{*/ 322 293 323 294 const int numnodes=this->NumberofNodes(); … … 325 296 } 326 297 /*}}}*/ 327 /*FUNCTION TriaInput::AXPY{{{*/ 328 void TriaInput::AXPY(Input* xinput,IssmDouble scalar){ 298 void TriaInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 329 299 330 300 const int numnodes=this->NumberofNodes(); … … 341 311 } 342 312 /*}}}*/ 343 /*FUNCTION TriaInput::Constrain{{{*/ 344 void TriaInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 313 void TriaInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 345 314 346 315 int i; … … 352 321 } 353 322 /*}}}*/ 354 /*FUNCTION TriaInput::GetVectorFromInputs{{{*/ 355 void TriaInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 323 void TriaInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 356 324 const int numvertices=3; 357 325 vector->SetValues(numvertices,doflist,this->values,INS_VAL); 358 326 } /*}}}*/ 359 /*FUNCTION TriaInput::PointwiseMin{{{*/ 360 Input* TriaInput::PointwiseMin(Input* inputB){ 327 Input* TriaInput::PointwiseMin(Input* inputB){/*{{{*/ 361 328 362 329 /*Ouput*/ … … 389 356 } 390 357 /*}}}*/ 391 /*FUNCTION TriaInput::PointwiseMax{{{*/ 392 Input* TriaInput::PointwiseMax(Input* inputB){ 358 Input* TriaInput::PointwiseMax(Input* inputB){/*{{{*/ 393 359 394 360 /*Ouput*/ … … 421 387 } 422 388 /*}}}*/ 423 /*FUNCTION TriaInput::PointwiseDivide{{{*/ 424 Input* TriaInput::PointwiseDivide(Input* inputB){ 389 Input* TriaInput::PointwiseDivide(Input* inputB){/*{{{*/ 425 390 426 391 /*Ouput*/ … … 454 419 } 455 420 /*}}}*/ 456 /*FUNCTION TriaInput::Configure{{{*/ 457 void TriaInput::Configure(Parameters* parameters){ 421 void TriaInput::Configure(Parameters* parameters){/*{{{*/ 458 422 /*do nothing: */ 459 423 } -
issm/trunk-jpl/src/c/classes/IoModel.cpp
r17924 r18064 19 19 #include "../shared/shared.h" 20 20 21 /*FUNCTION IoModel::IoModel(){{{*/ 22 IoModel::IoModel(){ 21 IoModel::IoModel(){/*{{{*/ 23 22 this->fid=NULL; 24 23 this->data=NULL; … … 51 50 } 52 51 /*}}}*/ 53 /*FUNCTION IoModel::IoModel(FILE* iomodel_handle){{{*/ 54 IoModel::IoModel(FILE* iomodel_handle){ 52 IoModel::IoModel(FILE* iomodel_handle){/*{{{*/ 55 53 56 54 /*First, keep track of the file handle: */ … … 97 95 } 98 96 /*}}}*/ 99 /*FUNCTION IoModel::~IoModel(){{{*/ 100 IoModel::~IoModel(){ 97 IoModel::~IoModel(){/*{{{*/ 101 98 102 99 /*Delete independents*/ … … 140 137 /*}}}*/ 141 138 142 /*FUNCTION IoModel::CheckEnumSync{{{*/ 143 void IoModel::CheckEnumSync(void){ 139 void IoModel::CheckEnumSync(void){/*{{{*/ 144 140 145 141 int record_enum,record_length; … … 226 222 } 227 223 /*}}}*/ 228 /*FUNCTION IoModel::Constant(bool* poutput,int constant_enum){{{*/ 229 void IoModel::Constant(bool* poutput,int constant_enum){ 224 void IoModel::Constant(bool* poutput,int constant_enum){/*{{{*/ 230 225 231 226 _assert_(constant_enum>=0); … … 235 230 } 236 231 /*}}}*/ 237 /*FUNCTION IoModel::Constant(int* poutput,int constant_enum){{{*/ 238 void IoModel::Constant(int* poutput,int constant_enum){ 232 void IoModel::Constant(int* poutput,int constant_enum){/*{{{*/ 239 233 240 234 _assert_(constant_enum>=0); … … 244 238 } 245 239 /*}}}*/ 246 /*FUNCTION IoModel::Constant(IssmDouble* poutput,int constant_enum){{{*/ 247 void IoModel::Constant(IssmDouble* poutput,int constant_enum){ 240 void IoModel::Constant(IssmDouble* poutput,int constant_enum){/*{{{*/ 248 241 249 242 _assert_(constant_enum>=0); … … 253 246 } 254 247 /*}}}*/ 255 /*FUNCTION IoModel::Constant(char** poutput,int constant_enum){{{*/ 256 void IoModel::Constant(char** poutput,int constant_enum){ 248 void IoModel::Constant(char** poutput,int constant_enum){/*{{{*/ 257 249 258 250 _assert_(constant_enum>=0); … … 262 254 } 263 255 /*}}}*/ 264 /*FUNCTION IoModel::CopyConstantObject{{{*/ 265 Param* IoModel::CopyConstantObject(int constant_enum){ 256 Param* IoModel::CopyConstantObject(int constant_enum){/*{{{*/ 266 257 267 258 _assert_(this->constants); … … 274 265 } 275 266 /*}}}*/ 276 /*FUNCTION IoModel::Data{{{*/ 277 IssmDouble* IoModel::Data(int data_enum){ 267 IssmDouble* IoModel::Data(int data_enum){/*{{{*/ 278 268 279 269 _assert_(data_enum<MaximumNumberOfDefinitionsEnum); … … 283 273 } 284 274 /*}}}*/ 285 /*FUNCTION IoModel::StartTrace{{{*/ 286 void IoModel::StartTrace(void){ 275 void IoModel::StartTrace(void){/*{{{*/ 287 276 288 277 bool autodiff = false; … … 322 311 } 323 312 /*}}}*/ 324 /*FUNCTION IoModel::DeclareIndependents{{{*/ 325 void IoModel::DeclareIndependents(void){ 313 void IoModel::DeclareIndependents(void){/*{{{*/ 326 314 327 315 int i; … … 374 362 } 375 363 /*}}}*/ 376 /*FUNCTION IoModel::DeleteData(int num,...){{{*/ 377 void IoModel::DeleteData(int num,...){ 364 void IoModel::DeleteData(int num,...){/*{{{*/ 378 365 379 366 va_list ap; … … 391 378 va_end(ap); 392 379 } /*}}}*/ 393 /*FUNCTION IoModel::DeleteData(IssmDouble* {{{*/ 394 void IoModel::DeleteData(IssmDouble* vector, int dataenum){ 380 void IoModel::DeleteData(IssmDouble* vector, int dataenum){/*{{{*/ 395 381 396 382 /*do not erase independent variables for the AD mode computations!: */ … … 398 384 399 385 } /*}}}*/ 400 /*FUNCTION IoModel::DeleteData(char*** pstringarray, int numstrings, int dataenum) {{{*/ 401 void IoModel::DeleteData(char*** pstringarray, int numstrings, int dataenum){ 386 void IoModel::DeleteData(char*** pstringarray, int numstrings, int dataenum){/*{{{*/ 402 387 403 388 int i; … … 413 398 *pstringarray=NULL; 414 399 } /*}}}*/ 415 /*FUNCTION IoModel::FetchConstants{{{*/ 416 void IoModel::FetchConstants(void){ 400 void IoModel::FetchConstants(void){/*{{{*/ 417 401 418 402 int my_rank; … … 637 621 } 638 622 /*}}}*/ 639 /*FUNCTION IoModel::FetchData(bool* pbool,int data_enum){{{*/ 640 void IoModel::FetchData(bool* pboolean,int data_enum){ 623 void IoModel::FetchData(bool* pboolean,int data_enum){/*{{{*/ 641 624 642 625 int my_rank; … … 666 649 } 667 650 /*}}}*/ 668 /*FUNCTION IoModel::FetchData(int* pinteger,int data_enum){{{*/ 669 void IoModel::FetchData(int* pinteger,int data_enum){ 651 void IoModel::FetchData(int* pinteger,int data_enum){/*{{{*/ 670 652 671 653 int my_rank; … … 694 676 } 695 677 /*}}}*/ 696 /*FUNCTION IoModel::FetchData(IssmDouble* pscalar,int data_enum){{{*/ 697 void IoModel::FetchData(IssmDouble* pscalar,int data_enum){ 678 void IoModel::FetchData(IssmDouble* pscalar,int data_enum){/*{{{*/ 698 679 699 680 int my_rank; … … 722 703 } 723 704 /*}}}*/ 724 /*FUNCTION IoModel::FetchData(char** pstring,int data_enum){{{*/ 725 void IoModel::FetchData(char** pstring,int data_enum){ 705 void IoModel::FetchData(char** pstring,int data_enum){/*{{{*/ 726 706 727 707 int my_rank; … … 769 749 } 770 750 /*}}}*/ 771 /*FUNCTION IoModel::FetchData(int** pintegerematrix,int* pM,int* pN,int data_enum){{{*/ 772 void IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){ 751 void IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){/*{{{*/ 773 752 774 753 int my_rank; … … 838 817 } 839 818 /*}}}*/ 840 /*FUNCTION IoModel::FetchData(IssmDouble** pIssmDoublematrix,int* pM,int* pN,int data_enum){{{*/ 841 void IoModel::FetchData(IssmDouble** pmatrix,int* pM,int* pN,int data_enum){ 819 void IoModel::FetchData(IssmDouble** pmatrix,int* pM,int* pN,int data_enum){/*{{{*/ 842 820 843 821 int my_rank; … … 898 876 } 899 877 /*}}}*/ 900 /*FUNCTION IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){{{*/ 901 void IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){ 878 void IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){/*{{{*/ 902 879 903 880 int my_rank; … … 964 941 } 965 942 /*}}}*/ 966 /*FUNCTION IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/ 967 void IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){ 943 void IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){/*{{{*/ 968 944 969 945 int i; … … 1050 1026 } 1051 1027 /*}}}*/ 1052 /*FUNCTION IoModel::FetchData(Option** poption,int data_enum){{{*/ 1053 void IoModel::FetchData(Option** poption,int index){ 1028 void IoModel::FetchData(Option** poption,int index){/*{{{*/ 1054 1029 1055 1030 /*output: */ … … 1096 1071 } 1097 1072 /*}}}*/ 1098 /*FUNCTION IoModel::FetchData(int num,...){{{*/ 1099 void IoModel::FetchData(int num,...){ 1073 void IoModel::FetchData(int num,...){/*{{{*/ 1100 1074 1101 1075 va_list ap; … … 1138 1112 } 1139 1113 /*}}}*/ 1140 /*FUNCTION IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){{{*/ 1141 void IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){ 1114 void IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){/*{{{*/ 1142 1115 1143 1116 int num_instances; … … 1203 1176 } 1204 1177 /*}}}*/ 1205 /*FUNCTION IoModel::FetchMultipleData(int** pvector, int* pM,int data_enum){{{*/ 1206 void IoModel::FetchMultipleData(int** pvector, int* pnum_instances,int data_enum){ 1178 void IoModel::FetchMultipleData(int** pvector, int* pnum_instances,int data_enum){/*{{{*/ 1207 1179 1208 1180 int num_instances; … … 1257 1229 } 1258 1230 /*}}}*/ 1259 /*FUNCTION IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/ 1260 void IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){ 1231 void IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){/*{{{*/ 1261 1232 1262 1233 int num_instances; … … 1362 1333 } 1363 1334 /*}}}*/ 1364 /*FUNCTION IoModel::FetchMultipleData(int*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/ 1365 void IoModel::FetchMultipleData(int*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){ 1335 void IoModel::FetchMultipleData(int*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){/*{{{*/ 1366 1336 1367 1337 int num_instances; … … 1469 1439 } 1470 1440 /*}}}*/ 1471 /*FUNCTION IoModel::FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value){{{*/ 1472 void IoModel::FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value){ 1441 void IoModel::FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value){/*{{{*/ 1473 1442 1474 1443 /*intermediary: */ … … 1495 1464 } 1496 1465 /*}}}*/ 1497 /*FUNCTION IoModel::FetchDataToInput(Elements* elements,int vector_enum){{{*/ 1498 void IoModel::FetchDataToInput(Elements* elements,int vector_enum){ 1466 void IoModel::FetchDataToInput(Elements* elements,int vector_enum){/*{{{*/ 1499 1467 1500 1468 /*intermediary: */ … … 1568 1536 } 1569 1537 /*}}}*/ 1570 /*FUNCTION IoModel::LastIndex{{{*/ 1571 void IoModel::LastIndex(int *pindex){ 1538 void IoModel::LastIndex(int *pindex){/*{{{*/ 1572 1539 1573 1540 int my_rank; … … 1669 1636 } 1670 1637 /*}}}*/ 1671 /*FUNCTION IoModel::SetFilePointersToData{{{*/ 1672 fpos_t* IoModel::SetFilePointersToData(int** pcodes,int** pvector_types, int* pnum_instances, int data_enum){ 1638 fpos_t* IoModel::SetFilePointersToData(int** pcodes,int** pvector_types, int* pnum_instances, int data_enum){/*{{{*/ 1673 1639 1674 1640 int found = 0; -
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r17952 r18064 16 16 17 17 /*Constructors/destructors*/ 18 /*FUNCTION Friction::Friction() {{{*/ 19 Friction::Friction(){ 18 Friction::Friction(){/*{{{*/ 20 19 this->element=NULL; 21 20 this->dim=0; … … 24 23 } 25 24 /*}}}*/ 26 /*FUNCTION Friction::Friction(Element* element,int dim){{{*/ 27 Friction::Friction(Element* element_in,int dim_in){ 25 Friction::Friction(Element* element_in,int dim_in){/*{{{*/ 28 26 29 27 this->element=element_in; … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION Friction::~Friction() {{{*/ 35 Friction::~Friction(){ 32 Friction::~Friction(){/*{{{*/ 36 33 } 37 34 /*}}}*/ 38 35 39 36 /*methods: */ 40 /*FUNCTION Friction::Echo {{{*/ 41 void Friction::Echo(void){ 37 void Friction::Echo(void){/*{{{*/ 42 38 _printf_("Friction:\n"); 43 39 _printf_(" dim: " << this->dim<< "\n"); 44 40 } 45 41 /*}}}*/ 46 /*FUNCTION Friction::GetAlpha2{{{*/ 47 void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){ 42 void Friction::GetAlpha2(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 48 43 49 44 switch(this->law){ … … 59 54 60 55 }/*}}}*/ 61 /*FUNCTION Friction::GetAlpha2{{{*/ 62 void Friction::GetAlpha2Viscous(IssmDouble* palpha2, Gauss* gauss){ 56 void Friction::GetAlpha2Viscous(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 63 57 64 58 /*This routine calculates the basal friction coefficient … … 120 114 *palpha2=alpha2; 121 115 }/*}}}*/ 122 /*FUNCTION Friction::GetAlpha2Weertman{{{*/ 123 void Friction::GetAlpha2Weertman(IssmDouble* palpha2, Gauss* gauss){ 116 void Friction::GetAlpha2Weertman(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 124 117 125 118 /*This routine calculates the basal friction coefficient alpha2= C^-1/m |v|^(1/m-1) */ … … 162 155 *palpha2=alpha2; 163 156 }/*}}}*/ 164 /*FUNCTION Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss,int vxenum,int vyenum,int vzenum) {{{*/ 165 void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){ 157 void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/ 166 158 167 159 /* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. -
issm/trunk-jpl/src/c/classes/Loads/Loads.cpp
r15838 r18064 23 23 24 24 /*Object constructors and destructor*/ 25 /*FUNCTION Loads::Loads(){{{*/ 26 Loads::Loads(){ 25 Loads::Loads(){/*{{{*/ 27 26 enum_type=LoadsEnum; 28 27 return; 29 28 } 30 29 /*}}}*/ 31 /*FUNCTION Loads::~Loads(){{{*/ 32 Loads::~Loads(){ 30 Loads::~Loads(){/*{{{*/ 33 31 return; 34 32 } … … 36 34 37 35 /*Numerics:*/ 38 /*FUNCTION Loads::Configure{{{*/ 39 void Loads::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){ 36 void Loads::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){/*{{{*/ 40 37 41 38 vector<Object*>::iterator object; … … 51 48 } 52 49 /*}}}*/ 53 /*FUNCTION Loads::IsPenalty{{{*/ 54 bool Loads::IsPenalty(int analysis_type){ 50 bool Loads::IsPenalty(int analysis_type){/*{{{*/ 55 51 56 52 int ispenalty=0; … … 76 72 } 77 73 /*}}}*/ 78 /*FUNCTION Loads::MaxNumNodes{{{*/ 79 int Loads::MaxNumNodes(int analysis_type){ 74 int Loads::MaxNumNodes(int analysis_type){/*{{{*/ 80 75 81 76 int max=0; … … 100 95 } 101 96 /*}}}*/ 102 /*FUNCTION Loads::NumberOfLoads(){{{*/ 103 int Loads::NumberOfLoads(void){ 97 int Loads::NumberOfLoads(void){/*{{{*/ 104 98 105 99 int localloads; … … 116 110 } 117 111 /*}}}*/ 118 /*FUNCTION Loads::NumberOfLoads(int analysis){{{*/ 119 int Loads::NumberOfLoads(int analysis_type){ 112 int Loads::NumberOfLoads(int analysis_type){/*{{{*/ 120 113 121 114 int localloads = 0; … … 138 131 } 139 132 /*}}}*/ 140 /*FUNCTION Loads::Size(){{{*/ 141 int Loads::Size(void){ 133 int Loads::Size(void){/*{{{*/ 142 134 143 135 return this->DataSet::Size(); 144 136 } 145 137 /*}}}*/ 146 /*FUNCTION Loads::Size(int analysis){{{*/ 147 int Loads::Size(int analysis_type){ 138 int Loads::Size(int analysis_type){/*{{{*/ 148 139 149 140 int localloads = 0; … … 161 152 } 162 153 /*}}}*/ 163 /*FUNCTION Loads::SetCurrentConfiguration{{{*/ 164 void Loads::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){ 154 void Loads::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){/*{{{*/ 165 155 166 156 vector<Object*>::iterator object; -
issm/trunk-jpl/src/c/classes/Loads/Numericalflux.cpp
r17266 r18064 21 21 22 22 /*Numericalflux constructors and destructor*/ 23 /*FUNCTION Numericalflux::Numericalflux(){{{*/ 24 Numericalflux::Numericalflux(){ 23 Numericalflux::Numericalflux(){/*{{{*/ 25 24 this->parameters = NULL; 26 25 this->helement = NULL; … … 31 30 } 32 31 /*}}}*/ 33 /*FUNCTION Numericalflux::Numericalflux(int id, int i, IoModel* iomodel, int analysis_type) {{{*/ 34 Numericalflux::Numericalflux(int numericalflux_id,int i,int index,IoModel* iomodel, int in_analysis_type){ 32 Numericalflux::Numericalflux(int numericalflux_id,int i,int index,IoModel* iomodel, int in_analysis_type){/*{{{*/ 35 33 36 34 /* Intermediary */ … … 124 122 } 125 123 /*}}}*/ 126 /*FUNCTION Numericalflux::~Numericalflux(){{{*/ 127 Numericalflux::~Numericalflux(){ 124 Numericalflux::~Numericalflux(){/*{{{*/ 128 125 this->parameters=NULL; 129 126 delete helement; … … 134 131 135 132 /*Object virtual functions definitions:*/ 136 /*FUNCTION Numericalflux::Echo {{{*/ 137 void Numericalflux::Echo(void){ 133 void Numericalflux::Echo(void){/*{{{*/ 138 134 _printf_("Numericalflux:\n"); 139 135 _printf_(" id: " << id << "\n"); … … 146 142 } 147 143 /*}}}*/ 148 /*FUNCTION Numericalflux::DeepEcho {{{*/ 149 void Numericalflux::DeepEcho(void){ 144 void Numericalflux::DeepEcho(void){/*{{{*/ 150 145 151 146 _printf_("Numericalflux:\n"); … … 163 158 } 164 159 /*}}}*/ 165 /*FUNCTION Numericalflux::Id {{{*/ 166 int Numericalflux::Id(void){ 160 int Numericalflux::Id(void){/*{{{*/ 167 161 return id; 168 162 } 169 163 /*}}}*/ 170 /*FUNCTION Numericalflux::ObjectEnum{{{*/ 171 int Numericalflux::ObjectEnum(void){ 164 int Numericalflux::ObjectEnum(void){/*{{{*/ 172 165 173 166 return NumericalfluxEnum; … … 175 168 } 176 169 /*}}}*/ 177 /*FUNCTION Numericalflux::copy {{{*/ 178 Object* Numericalflux::copy() { 170 Object* Numericalflux::copy() {/*{{{*/ 179 171 180 172 Numericalflux* numericalflux=NULL; … … 205 197 206 198 /*Load virtual functions definitions:*/ 207 /*FUNCTION Numericalflux::Configure {{{*/ 208 void Numericalflux::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 199 void Numericalflux::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 209 200 210 201 /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective … … 223 214 } 224 215 /*}}}*/ 225 /*FUNCTION Numericalflux::SetCurrentConfiguration {{{*/ 226 void Numericalflux::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 227 228 } 229 /*}}}*/ 230 /*FUNCTION Numericalflux::CreateKMatrix {{{*/ 231 void Numericalflux::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 216 void Numericalflux::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 217 218 } 219 /*}}}*/ 220 void Numericalflux::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){/*{{{*/ 232 221 233 222 /*recover some parameters*/ … … 259 248 } 260 249 /*}}}*/ 261 /*FUNCTION Numericalflux::CreatePVector {{{*/ 262 void Numericalflux::CreatePVector(Vector<IssmDouble>* pf){ 250 void Numericalflux::CreatePVector(Vector<IssmDouble>* pf){/*{{{*/ 263 251 264 252 /*recover some parameters*/ … … 289 277 } 290 278 /*}}}*/ 291 /*FUNCTION Numericalflux::GetNodesSidList{{{*/ 292 void Numericalflux::GetNodesSidList(int* sidlist){ 279 void Numericalflux::GetNodesSidList(int* sidlist){/*{{{*/ 293 280 294 281 _assert_(sidlist); … … 307 294 } 308 295 /*}}}*/ 309 /*FUNCTION Numericalflux::GetNodesLidList{{{*/ 310 void Numericalflux::GetNodesLidList(int* lidlist){ 296 void Numericalflux::GetNodesLidList(int* lidlist){/*{{{*/ 311 297 312 298 _assert_(lidlist); … … 325 311 } 326 312 /*}}}*/ 327 /*FUNCTION Numericalflux::GetNumberOfNodes{{{*/ 328 int Numericalflux::GetNumberOfNodes(void){ 313 int Numericalflux::GetNumberOfNodes(void){/*{{{*/ 329 314 330 315 switch(this->flux_type){ … … 339 324 } 340 325 /*}}}*/ 341 /*FUNCTION Numericalflux::IsPenalty{{{*/ 342 bool Numericalflux::IsPenalty(void){ 326 bool Numericalflux::IsPenalty(void){/*{{{*/ 343 327 return false; 344 328 } 345 329 /*}}}*/ 346 /*FUNCTION Numericalflux::PenaltyCreateKMatrix {{{*/ 347 void Numericalflux::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){ 330 void Numericalflux::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){/*{{{*/ 348 331 349 332 /*No stiffness loads applied, do nothing: */ … … 352 335 } 353 336 /*}}}*/ 354 /*FUNCTION Numericalflux::PenaltyCreatePVector{{{*/ 355 void Numericalflux::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){ 337 void Numericalflux::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){/*{{{*/ 356 338 357 339 /*No penalty loads applied, do nothing: */ … … 360 342 } 361 343 /*}}}*/ 362 /*FUNCTION Numericalflux::InAnalysis{{{*/ 363 bool Numericalflux::InAnalysis(int in_analysis_type){ 344 bool Numericalflux::InAnalysis(int in_analysis_type){/*{{{*/ 364 345 if (in_analysis_type==this->analysis_type) return true; 365 346 else return false; 366 347 } 367 348 /*}}}*/ 368 /*FUNCTION Numericalflux::SetwiseNodeConnectivity{{{*/ 369 void Numericalflux::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){ 349 void Numericalflux::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/ 370 350 371 351 /*Output */ … … 423 403 424 404 /*Numericalflux management*/ 425 /*FUNCTION Numericalflux::CreateKMatrixMasstransport{{{*/ 426 ElementMatrix* Numericalflux::CreateKMatrixMasstransport(void){ 405 ElementMatrix* Numericalflux::CreateKMatrixMasstransport(void){/*{{{*/ 427 406 428 407 switch(this->flux_type){ … … 436 415 } 437 416 /*}}}*/ 438 /*FUNCTION Numericalflux::CreateKMatrixMasstransportInternal {{{*/ 439 ElementMatrix* Numericalflux::CreateKMatrixMasstransportInternal(void){ 417 ElementMatrix* Numericalflux::CreateKMatrixMasstransportInternal(void){/*{{{*/ 440 418 441 419 /* constants*/ … … 501 479 } 502 480 /*}}}*/ 503 /*FUNCTION Numericalflux::CreateKMatrixMasstransportBoundary {{{*/ 504 ElementMatrix* Numericalflux::CreateKMatrixMasstransportBoundary(void){ 481 ElementMatrix* Numericalflux::CreateKMatrixMasstransportBoundary(void){/*{{{*/ 505 482 506 483 /* constants*/ … … 573 550 } 574 551 /*}}}*/ 575 /*FUNCTION Numericalflux::CreateKMatrixBalancethickness{{{*/ 576 ElementMatrix* Numericalflux::CreateKMatrixBalancethickness(void){ 552 ElementMatrix* Numericalflux::CreateKMatrixBalancethickness(void){/*{{{*/ 577 553 578 554 switch(this->flux_type){ … … 586 562 } 587 563 /*}}}*/ 588 /*FUNCTION Numericalflux::CreateKMatrixBalancethicknessInternal {{{*/ 589 ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessInternal(void){ 564 ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessInternal(void){/*{{{*/ 590 565 591 566 /* constants*/ … … 650 625 } 651 626 /*}}}*/ 652 /*FUNCTION Numericalflux::CreateKMatrixBalancethicknessBoundary {{{*/ 653 ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessBoundary(void){ 627 ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessBoundary(void){/*{{{*/ 654 628 655 629 /* constants*/ … … 721 695 } 722 696 /*}}}*/ 723 /*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethickness{{{*/ 724 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethickness(void){ 697 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethickness(void){/*{{{*/ 725 698 726 699 switch(this->flux_type){ … … 734 707 } 735 708 /*}}}*/ 736 /*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessInternal {{{*/ 737 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessInternal(void){ 709 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessInternal(void){/*{{{*/ 738 710 739 711 ElementMatrix* Ke=CreateKMatrixBalancethicknessInternal(); … … 742 714 } 743 715 /*}}}*/ 744 /*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary {{{*/ 745 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary(void){ 716 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary(void){/*{{{*/ 746 717 747 718 ElementMatrix* Ke=CreateKMatrixBalancethicknessBoundary(); … … 750 721 } 751 722 /*}}}*/ 752 /*FUNCTION Numericalflux::CreatePVectorMasstransport{{{*/ 753 ElementVector* Numericalflux::CreatePVectorMasstransport(void){ 723 ElementVector* Numericalflux::CreatePVectorMasstransport(void){/*{{{*/ 754 724 755 725 switch(this->flux_type){ … … 763 733 } 764 734 /*}}}*/ 765 /*FUNCTION Numericalflux::CreatePVectorMasstransportInternal{{{*/ 766 ElementVector* Numericalflux::CreatePVectorMasstransportInternal(void){ 735 ElementVector* Numericalflux::CreatePVectorMasstransportInternal(void){/*{{{*/ 767 736 768 737 /*Nothing added to PVector*/ … … 771 740 } 772 741 /*}}}*/ 773 /*FUNCTION Numericalflux::CreatePVectorMasstransportBoundary{{{*/ 774 ElementVector* Numericalflux::CreatePVectorMasstransportBoundary(void){ 742 ElementVector* Numericalflux::CreatePVectorMasstransportBoundary(void){/*{{{*/ 775 743 776 744 /* constants*/ … … 841 809 } 842 810 /*}}}*/ 843 /*FUNCTION Numericalflux::CreatePVectorBalancethickness{{{*/ 844 ElementVector* Numericalflux::CreatePVectorBalancethickness(void){ 811 ElementVector* Numericalflux::CreatePVectorBalancethickness(void){/*{{{*/ 845 812 846 813 switch(this->flux_type){ … … 854 821 } 855 822 /*}}}*/ 856 /*FUNCTION Numericalflux::CreatePVectorBalancethicknessInternal{{{*/ 857 ElementVector* Numericalflux::CreatePVectorBalancethicknessInternal(void){ 823 ElementVector* Numericalflux::CreatePVectorBalancethicknessInternal(void){/*{{{*/ 858 824 859 825 /*Nothing added to PVector*/ … … 862 828 } 863 829 /*}}}*/ 864 /*FUNCTION Numericalflux::CreatePVectorBalancethicknessBoundary{{{*/ 865 ElementVector* Numericalflux::CreatePVectorBalancethicknessBoundary(void){ 830 ElementVector* Numericalflux::CreatePVectorBalancethicknessBoundary(void){/*{{{*/ 866 831 867 832 /* constants*/ … … 929 894 } 930 895 /*}}}*/ 931 /*FUNCTION Numericalflux::CreatePVectorAdjointBalancethickness{{{*/ 932 ElementVector* Numericalflux::CreatePVectorAdjointBalancethickness(void){ 896 ElementVector* Numericalflux::CreatePVectorAdjointBalancethickness(void){/*{{{*/ 933 897 934 898 /*No PVector for the Adjoint*/ … … 936 900 } 937 901 /*}}}*/ 938 /*FUNCTION Numericalflux::GetNormal {{{*/ 939 void Numericalflux:: GetNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]){ 902 void Numericalflux:: GetNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]){/*{{{*/ 940 903 941 904 /*Build unit outward pointing vector*/ -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r17964 r18064 20 20 21 21 /*Pengrid constructors and destructor*/ 22 /*FUNCTION Pengrid::Pengrid(){{{*/ 23 Pengrid::Pengrid(){ 22 Pengrid::Pengrid(){/*{{{*/ 24 23 this->parameters=NULL; 25 24 this->hnode=NULL; … … 36 35 } 37 36 /*}}}*/ 38 /*FUNCTION Pengrid::Pengrid(int index, int id, IoModel* iomodel,int analysis_type){{{*/ 39 Pengrid::Pengrid(int id, int index, IoModel* iomodel, int in_analysis_type){ //i is the element index 37 Pengrid::Pengrid(int id, int index, IoModel* iomodel, int in_analysis_type){ //i is the element index/*{{{*/ 40 38 41 39 int pengrid_node_id; … … 74 72 } 75 73 /*}}}*/ 76 /*FUNCTION Pengrid::~Pengrid(){{{*/ 77 Pengrid::~Pengrid(){ 74 Pengrid::~Pengrid(){/*{{{*/ 78 75 delete hnode; 79 76 delete helement; … … 84 81 85 82 /*Object virtual functions definitions:*/ 86 /*FUNCTION Pengrid::Echo {{{*/ 87 void Pengrid::Echo(void){ 83 void Pengrid::Echo(void){/*{{{*/ 88 84 this->DeepEcho(); 89 85 } 90 86 /*}}}*/ 91 /*FUNCTION Pengrid::DeepEcho{{{*/ 92 void Pengrid::DeepEcho(void){ 87 void Pengrid::DeepEcho(void){/*{{{*/ 93 88 94 89 _printf_("Pengrid:\n"); … … 104 99 } 105 100 /*}}}*/ 106 /*FUNCTION Pengrid::Id {{{*/ 107 int Pengrid::Id(void){ return id; } 108 /*}}}*/ 109 /*FUNCTION Pengrid::ObjectEnum{{{*/ 110 int Pengrid::ObjectEnum(void){ 101 int Pengrid::Id(void){ return id; }/*{{{*/ 102 /*}}}*/ 103 int Pengrid::ObjectEnum(void){/*{{{*/ 111 104 112 105 return PengridEnum; 113 106 } 114 107 /*}}}*/ 115 /*FUNCTION Icefront::copy {{{*/ 116 Object* Pengrid::copy() { 108 Object* Pengrid::copy() {/*{{{*/ 117 109 118 110 Pengrid* pengrid=NULL; … … 147 139 148 140 /*Load virtual functions definitions:*/ 149 /*FUNCTION Pengrid::Configure {{{*/ 150 void Pengrid::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 141 void Pengrid::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 151 142 152 143 /*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective … … 165 156 } 166 157 /*}}}*/ 167 /*FUNCTION Pengrid::SetCurrentConfiguration {{{*/ 168 void Pengrid::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 169 170 } 171 /*}}}*/ 172 /*FUNCTION Pengrid::CreateKMatrix {{{*/ 173 void Pengrid::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 158 void Pengrid::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 159 160 } 161 /*}}}*/ 162 void Pengrid::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){/*{{{*/ 174 163 175 164 /*No loads applied, do nothing: */ … … 178 167 } 179 168 /*}}}*/ 180 /*FUNCTION Pengrid::CreatePVector {{{*/ 181 void Pengrid::CreatePVector(Vector<IssmDouble>* pf){ 169 void Pengrid::CreatePVector(Vector<IssmDouble>* pf){/*{{{*/ 182 170 183 171 ElementVector* pe=NULL; … … 201 189 } 202 190 /*}}}*/ 203 /*FUNCTION Pengrid::GetNodesSidList{{{*/ 204 void Pengrid::GetNodesSidList(int* sidlist){ 191 void Pengrid::GetNodesSidList(int* sidlist){/*{{{*/ 205 192 206 193 _assert_(sidlist); … … 210 197 } 211 198 /*}}}*/ 212 /*FUNCTION Pengrid::GetNodesLidList{{{*/ 213 void Pengrid::GetNodesLidList(int* lidlist){ 199 void Pengrid::GetNodesLidList(int* lidlist){/*{{{*/ 214 200 215 201 _assert_(lidlist); … … 219 205 } 220 206 /*}}}*/ 221 /*FUNCTION Pengrid::GetNumberOfNodes{{{*/ 222 int Pengrid::GetNumberOfNodes(void){ 207 int Pengrid::GetNumberOfNodes(void){/*{{{*/ 223 208 224 209 return NUMVERTICES; 225 210 } 226 211 /*}}}*/ 227 /*FUNCTION Pengrid::PenaltyCreateMatrix {{{*/ 228 void Pengrid::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){ 212 void Pengrid::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){/*{{{*/ 229 213 230 214 /*Retrieve parameters: */ … … 254 238 } 255 239 /*}}}*/ 256 /*FUNCTION Pengrid::PenaltyCreatePVector {{{*/ 257 void Pengrid::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){ 240 void Pengrid::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){/*{{{*/ 258 241 259 242 /*Retrieve parameters: */ … … 285 268 } 286 269 /*}}}*/ 287 /*FUNCTION Pengrid::InAnalysis{{{*/ 288 bool Pengrid::InAnalysis(int in_analysis_type){ 270 bool Pengrid::InAnalysis(int in_analysis_type){/*{{{*/ 289 271 if (in_analysis_type==this->analysis_type)return true; 290 272 else return false; 291 273 } 292 274 /*}}}*/ 293 /*FUNCTION Pengrid::IsPenalty{{{*/ 294 bool Pengrid::IsPenalty(void){ 275 bool Pengrid::IsPenalty(void){/*{{{*/ 295 276 return true; 296 277 } 297 278 /*}}}*/ 298 /*FUNCTION Pengrid::SetwiseNodeConnectivity{{{*/ 299 void Pengrid::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){ 279 void Pengrid::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/ 300 280 301 281 /*Output */ … … 349 329 350 330 /*Update virtual functions definitions:*/ 351 /*FUNCTION Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/ 352 void Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 331 void Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 353 332 /*Nothing updated yet*/ 354 333 } 355 334 /*}}}*/ 356 /*FUNCTION Pengrid::InputUpdateFromMatrixDakota(IssmDouble* vector, int nrows, int ncols, int name, int type) {{{*/ 357 void Pengrid::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ 335 void Pengrid::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*{{{*/ 358 336 /*Nothing updated yet*/ 359 337 } 360 338 /*}}}*/ 361 /*FUNCTION Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/ 362 void Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 339 void Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/ 363 340 /*Nothing updated yet*/ 364 341 } 365 342 /*}}}*/ 366 /*FUNCTION Pengrid::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 367 void Pengrid::InputUpdateFromConstant(IssmDouble constant, int name){ 343 void Pengrid::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/ 368 344 /*Nothing*/ 369 345 } 370 346 /*}}}*/ 371 /*FUNCTION Pengrid::InputUpdateFromConstant(int constant, int name) {{{*/ 372 void Pengrid::InputUpdateFromConstant(int constant, int name){ 347 void Pengrid::InputUpdateFromConstant(int constant, int name){/*{{{*/ 373 348 /*Nothing updated yet*/ 374 349 } 375 350 /*}}}*/ 376 /*FUNCTION Pengrid::InputUpdateFromConstant(bool constant, int name) {{{*/ 377 void Pengrid::InputUpdateFromConstant(bool constant, int name){ 351 void Pengrid::InputUpdateFromConstant(bool constant, int name){/*{{{*/ 378 352 379 353 switch(name){ … … 388 362 389 363 /*Pengrid management:*/ 390 /*FUNCTION Pengrid::ConstraintActivate {{{*/ 391 void Pengrid::ConstraintActivate(int* punstable){ 364 void Pengrid::ConstraintActivate(int* punstable){/*{{{*/ 392 365 393 366 int analysis_type; … … 417 390 } 418 391 /*}}}*/ 419 /*FUNCTION Pengrid::ConstraintActivateThermal {{{*/ 420 void Pengrid::ConstraintActivateThermal(int* punstable){ 392 void Pengrid::ConstraintActivateThermal(int* punstable){/*{{{*/ 421 393 422 394 // The penalty is stable if it doesn't change during to successive iterations. … … 481 453 } 482 454 /*}}}*/ 483 /*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{*/ 484 ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(IssmDouble kmax){ 455 ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(IssmDouble kmax){/*{{{*/ 485 456 486 457 IssmDouble pressure,temperature,t_pmp; … … 510 481 } 511 482 /*}}}*/ 512 /*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{*/ 513 ElementMatrix* Pengrid::PenaltyCreateKMatrixThermal(IssmDouble kmax){ 483 ElementMatrix* Pengrid::PenaltyCreateKMatrixThermal(IssmDouble kmax){/*{{{*/ 514 484 515 485 IssmDouble penalty_factor; … … 528 498 } 529 499 /*}}}*/ 530 /*FUNCTION Pengrid::PenaltyCreatePVectorMelting {{{*/ 531 ElementVector* Pengrid::PenaltyCreatePVectorMelting(IssmDouble kmax){ 500 ElementVector* Pengrid::PenaltyCreatePVectorMelting(IssmDouble kmax){/*{{{*/ 532 501 533 502 IssmDouble pressure; … … 570 539 } 571 540 /*}}}*/ 572 /*FUNCTION Pengrid::PenaltyCreatePVectorThermal {{{*/ 573 ElementVector* Pengrid::PenaltyCreatePVectorThermal(IssmDouble kmax){ 541 ElementVector* Pengrid::PenaltyCreatePVectorThermal(IssmDouble kmax){/*{{{*/ 574 542 575 543 IssmDouble pressure; … … 596 564 } 597 565 /*}}}*/ 598 /*FUNCTION Pengrid::ConstraintActivateHydrologyDCInefficient{{{*/ 599 void Pengrid::ConstraintActivateHydrologyDCInefficient(int* punstable){ 566 void Pengrid::ConstraintActivateHydrologyDCInefficient(int* punstable){/*{{{*/ 600 567 601 568 // The penalty is stable if it doesn't change during two consecutive iterations. … … 657 624 } 658 625 /*}}}*/ 659 /*FUNCTION Pengrid::PenaltyCreateKMatrixHydrologyDCInefficient {{{*/ 660 ElementMatrix* Pengrid::PenaltyCreateKMatrixHydrologyDCInefficient(IssmDouble kmax){ 626 ElementMatrix* Pengrid::PenaltyCreateKMatrixHydrologyDCInefficient(IssmDouble kmax){/*{{{*/ 661 627 IssmDouble penalty_factor; 662 628 … … 674 640 } 675 641 /*}}}*/ 676 /*FUNCTION Pengrid::PenaltyCreatePVectorHydrologyDCInefficient {{{*/ 677 ElementVector* Pengrid::PenaltyCreatePVectorHydrologyDCInefficient(IssmDouble kmax){ 642 ElementVector* Pengrid::PenaltyCreatePVectorHydrologyDCInefficient(IssmDouble kmax){/*{{{*/ 678 643 679 644 IssmDouble h_max; … … 699 664 } 700 665 /*}}}*/ 701 /*FUNCTION Pengrid::CreatePVectorHydrologyDCInefficient {{{*/ 702 ElementVector* Pengrid::CreatePVectorHydrologyDCInefficient(void){ 666 ElementVector* Pengrid::CreatePVectorHydrologyDCInefficient(void){/*{{{*/ 703 667 704 668 IssmDouble moulin_load,dt; … … 716 680 } 717 681 /*}}}*/ 718 /*FUNCTION Pengrid::ResetConstraint {{{*/ 719 void Pengrid::ResetConstraint(void){ 682 void Pengrid::ResetConstraint(void){/*{{{*/ 720 683 active = 0; 721 684 zigzag_counter = 0; -
issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp
r16125 r18064 19 19 20 20 /*Penpair constructors and destructor*/ 21 /*FUNCTION Penpair::constructor {{{*/ 22 Penpair::Penpair(){ 21 Penpair::Penpair(){/*{{{*/ 23 22 24 23 this->hnodes=NULL; … … 28 27 } 29 28 /*}}}*/ 30 /*FUNCTION Penpair::creation {{{*/ 31 Penpair::Penpair(int penpair_id, int* penpair_node_ids,int in_analysis_type){ 29 Penpair::Penpair(int penpair_id, int* penpair_node_ids,int in_analysis_type){/*{{{*/ 32 30 33 31 this->id=penpair_id; … … 40 38 } 41 39 /*}}}*/ 42 /*FUNCTION Penpair::destructor {{{*/ 43 Penpair::~Penpair(){ 40 Penpair::~Penpair(){/*{{{*/ 44 41 delete hnodes; 45 42 return; … … 48 45 49 46 /*Object virtual functions definitions:*/ 50 /*FUNCTION Penpair::Echo {{{*/ 51 void Penpair::Echo(void){ 47 void Penpair::Echo(void){/*{{{*/ 52 48 53 49 _printf_("Penpair:\n"); … … 59 55 } 60 56 /*}}}*/ 61 /*FUNCTION Penpair::DeepEcho {{{*/ 62 void Penpair::DeepEcho(void){ 57 void Penpair::DeepEcho(void){/*{{{*/ 63 58 64 59 _printf_("Penpair:\n"); … … 70 65 } 71 66 /*}}}*/ 72 /*FUNCTION Penpair::Id {{{*/ 73 int Penpair::Id(void){ return id; } 74 /*}}}*/ 75 /*FUNCTION Penpair::ObjectEnum{{{*/ 76 int Penpair::ObjectEnum(void){ 67 int Penpair::Id(void){ return id; }/*{{{*/ 68 /*}}}*/ 69 int Penpair::ObjectEnum(void){/*{{{*/ 77 70 78 71 return PenpairEnum; 79 72 } 80 73 /*}}}*/ 81 /*FUNCTION Penpair::copy {{{*/ 82 Object* Penpair::copy() { 74 Object* Penpair::copy() {/*{{{*/ 83 75 84 76 Penpair* penpair=NULL; … … 103 95 104 96 /*Load virtual functions definitions:*/ 105 /*FUNCTION Penpair::Configure {{{*/ 106 void Penpair::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 97 void Penpair::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 107 98 108 99 /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective … … 118 109 } 119 110 /*}}}*/ 120 /*FUNCTION Penpair::SetCurrentConfiguration {{{*/ 121 void Penpair::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 122 123 } 124 /*}}}*/ 125 /*FUNCTION Penpair::CreateKMatrix {{{*/ 126 void Penpair::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 111 void Penpair::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 112 113 } 114 /*}}}*/ 115 void Penpair::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){/*{{{*/ 127 116 /*If you code this piece, don't forget that a penalty will be inactive if it is dealing with clone nodes*/ 128 117 /*No loads applied, do nothing: */ … … 131 120 } 132 121 /*}}}*/ 133 /*FUNCTION Penpair::CreatePVector {{{*/ 134 void Penpair::CreatePVector(Vector<IssmDouble>* pf){ 122 void Penpair::CreatePVector(Vector<IssmDouble>* pf){/*{{{*/ 135 123 136 124 /*No loads applied, do nothing: */ … … 139 127 } 140 128 /*}}}*/ 141 /*FUNCTION Penpair::CreateJacobianMatrix{{{*/ 142 void Penpair::CreateJacobianMatrix(Matrix<IssmDouble>* Jff){ 129 void Penpair::CreateJacobianMatrix(Matrix<IssmDouble>* Jff){/*{{{*/ 143 130 this->CreateKMatrix(Jff,NULL); 144 131 } 145 132 /*}}}*/ 146 /*FUNCTION Penpair::GetNodesSidList{{{*/ 147 void Penpair::GetNodesSidList(int* sidlist){ 133 void Penpair::GetNodesSidList(int* sidlist){/*{{{*/ 148 134 149 135 _assert_(sidlist); … … 153 139 } 154 140 /*}}}*/ 155 /*FUNCTION Penpair::GetNodesLidList{{{*/ 156 void Penpair::GetNodesLidList(int* lidlist){ 141 void Penpair::GetNodesLidList(int* lidlist){/*{{{*/ 157 142 158 143 _assert_(lidlist); … … 162 147 } 163 148 /*}}}*/ 164 /*FUNCTION Penpair::GetNumberOfNodes{{{*/ 165 int Penpair::GetNumberOfNodes(void){ 149 int Penpair::GetNumberOfNodes(void){/*{{{*/ 166 150 167 151 return NUMVERTICES; 168 152 } 169 153 /*}}}*/ 170 /*FUNCTION Penpair::IsPenalty{{{*/ 171 bool Penpair::IsPenalty(void){ 154 bool Penpair::IsPenalty(void){/*{{{*/ 172 155 return true; 173 156 } 174 157 /*}}}*/ 175 /*FUNCTION Penpair::PenaltyCreateKMatrix {{{*/ 176 void Penpair::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){ 158 void Penpair::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){/*{{{*/ 177 159 178 160 /*Retrieve parameters: */ … … 199 181 } 200 182 /*}}}*/ 201 /*FUNCTION Penpair::PenaltyCreatePVector {{{*/ 202 void Penpair::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){ 183 void Penpair::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){/*{{{*/ 203 184 /*No loads applied, do nothing: */ 204 185 return; 205 186 } 206 187 /*}}}*/ 207 /*FUNCTION Penpair::PenaltyCreateJacobianMatrix{{{*/ 208 void Penpair::PenaltyCreateJacobianMatrix(Matrix<IssmDouble>* Jff,IssmDouble kmax){ 188 void Penpair::PenaltyCreateJacobianMatrix(Matrix<IssmDouble>* Jff,IssmDouble kmax){/*{{{*/ 209 189 this->PenaltyCreateKMatrix(Jff,NULL,kmax); 210 190 } 211 191 /*}}}*/ 212 /*FUNCTION Penpair::InAnalysis{{{*/ 213 bool Penpair::InAnalysis(int in_analysis_type){ 192 bool Penpair::InAnalysis(int in_analysis_type){/*{{{*/ 214 193 if (in_analysis_type==this->analysis_type)return true; 215 194 else return false; 216 195 } 217 196 /*}}}*/ 218 /*FUNCTION Penpair::SetwiseNodeConnectivity{{{*/ 219 void Penpair::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){ 197 void Penpair::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/ 220 198 221 199 /*Output */ … … 273 251 274 252 /*Update virtual functions definitions:*/ 275 /*FUNCTION Penpair::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 276 void Penpair::InputUpdateFromConstant(IssmDouble constant, int name){ 253 void Penpair::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/ 277 254 /*Nothing updated yet*/ 278 255 } 279 256 /*}}}*/ 280 /*FUNCTION Penpair::InputUpdateFromConstant(int constant, int name) {{{*/ 281 void Penpair::InputUpdateFromConstant(int constant, int name){ 257 void Penpair::InputUpdateFromConstant(int constant, int name){/*{{{*/ 282 258 /*Nothing updated yet*/ 283 259 } 284 260 /*}}}*/ 285 /*FUNCTION Penpair::InputUpdateFromConstant(bool constant, int name) {{{*/ 286 void Penpair::InputUpdateFromConstant(bool constant, int name){ 261 void Penpair::InputUpdateFromConstant(bool constant, int name){/*{{{*/ 287 262 /*Nothing updated yet*/ 288 263 } 289 264 /*}}}*/ 290 /*FUNCTION Penpair::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/ 291 void Penpair::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 265 void Penpair::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 292 266 /*Nothing updated yet*/ 293 267 } … … 295 269 296 270 /*Penpair management:*/ 297 /*FUNCTION Penpair::PenaltyCreateKMatrixStressbalanceHoriz{{{*/ 298 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceHoriz(IssmDouble kmax){ 271 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceHoriz(IssmDouble kmax){/*{{{*/ 299 272 300 273 int approximation0=nodes[0]->GetApproximation(); … … 329 302 } 330 303 /*}}}*/ 331 /*FUNCTION Penpair::PenaltyCreateKMatrixStressbalanceSSAHO {{{*/ 332 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceSSAHO(IssmDouble kmax){ 304 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceSSAHO(IssmDouble kmax){/*{{{*/ 333 305 334 306 const int numdof=NUMVERTICES*NDOF2; … … 356 328 } 357 329 /*}}}*/ 358 /*FUNCTION Penpair::PenaltyCreateKMatrixStressbalanceFS {{{*/ 359 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceFS(IssmDouble kmax){ 330 ElementMatrix* Penpair::PenaltyCreateKMatrixStressbalanceFS(IssmDouble kmax){/*{{{*/ 360 331 361 332 const int numdof=NUMVERTICES*NDOF3; … … 388 359 } 389 360 /*}}}*/ 390 /*FUNCTION Penpair::PenaltyCreateKMatrixMasstransport {{{*/ 391 ElementMatrix* Penpair::PenaltyCreateKMatrixMasstransport(IssmDouble kmax){ 361 ElementMatrix* Penpair::PenaltyCreateKMatrixMasstransport(IssmDouble kmax){/*{{{*/ 392 362 393 363 const int numdof=NUMVERTICES*NDOF1; -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp
r17924 r18064 20 20 21 21 /*Riftfront constructors and destructor*/ 22 /*FUNCTION Riftfront::Riftfront(){{{*/ 23 Riftfront::Riftfront(){ 22 Riftfront::Riftfront(){/*{{{*/ 24 23 this->parameters=NULL; 25 24 this->hnodes=NULL; … … 31 30 } 32 31 /*}}}*/ 33 /*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel,int analysis_type){{{*/ 34 Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel,int riftfront_analysis_type){ 32 Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel,int riftfront_analysis_type){/*{{{*/ 35 33 36 34 /*data: */ … … 101 99 } 102 100 /*}}}*/ 103 /*FUNCTION Riftfront::~Riftfront(){{{*/ 104 Riftfront::~Riftfront(){ 101 Riftfront::~Riftfront(){/*{{{*/ 105 102 this->parameters=NULL; 106 103 delete hnodes; … … 111 108 112 109 /*Object virtual functions definitions:*/ 113 /*FUNCTION Riftfront::Echo {{{*/ 114 void Riftfront::Echo(void){ 110 void Riftfront::Echo(void){/*{{{*/ 115 111 116 112 _printf_("Riftfront:\n"); … … 138 134 } 139 135 /*}}}*/ 140 /*FUNCTION Riftfront::DeepEcho{{{*/ 141 void Riftfront::DeepEcho(void){ 136 void Riftfront::DeepEcho(void){/*{{{*/ 142 137 143 138 _printf_("Riftfront:\n"); … … 151 146 } 152 147 /*}}}*/ 153 /*FUNCTION Riftfront::Id {{{*/ 154 int Riftfront::Id(void){ return id; } 155 /*}}}*/ 156 /*FUNCTION Riftfront::ObjectEnum{{{*/ 157 int Riftfront::ObjectEnum(void){ 148 int Riftfront::Id(void){ return id; }/*{{{*/ 149 /*}}}*/ 150 int Riftfront::ObjectEnum(void){/*{{{*/ 158 151 159 152 return RiftfrontEnum; … … 161 154 } 162 155 /*}}}*/ 163 /*FUNCTION Riftfront::copy {{{*/ 164 Object* Riftfront::copy() { 156 Object* Riftfront::copy() {/*{{{*/ 165 157 166 158 Riftfront* riftfront=NULL; … … 209 201 210 202 /*Update virtual functions definitions:*/ 211 /*FUNCTION Riftfront::InputUpdateFromConstant(bool constant,int name) {{{*/ 212 void Riftfront::InputUpdateFromConstant(bool constant,int name){ 213 } 214 /*}}}*/ 215 /*FUNCTION Riftfront::InputUpdateFromConstant(IssmDouble constant,int name) {{{*/ 216 void Riftfront::InputUpdateFromConstant(IssmDouble constant,int name){ 217 218 } 219 /*}}}*/ 220 /*FUNCTION Riftfront::InputUpdateFromVector(IssmDouble* constant,int name) {{{*/ 221 void Riftfront::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 203 void Riftfront::InputUpdateFromConstant(bool constant,int name){/*{{{*/ 204 } 205 /*}}}*/ 206 void Riftfront::InputUpdateFromConstant(IssmDouble constant,int name){/*{{{*/ 207 208 } 209 /*}}}*/ 210 void Riftfront::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 222 211 223 212 _error_("not implemented yet"); … … 227 216 228 217 /*Load virtual functions definitions:*/ 229 /*FUNCTION Riftfront::Configure {{{*/ 230 void Riftfront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 218 void Riftfront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 231 219 232 220 /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective … … 246 234 } 247 235 /*}}}*/ 248 /*FUNCTION Riftfront::IsPenalty{{{*/ 249 bool Riftfront::IsPenalty(void){ 236 bool Riftfront::IsPenalty(void){/*{{{*/ 250 237 return true; 251 238 } 252 239 /*}}}*/ 253 /*FUNCTION Riftfront::SetCurrentConfiguration {{{*/ 254 void Riftfront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 255 256 } 257 /*}}}*/ 258 /*FUNCTION Riftfront::PenaltyCreateKMatrix {{{*/ 259 void Riftfront::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){ 240 void Riftfront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 241 242 } 243 /*}}}*/ 244 void Riftfront::PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,IssmDouble kmax){/*{{{*/ 260 245 261 246 /*Retrieve parameters: */ … … 282 267 } 283 268 /*}}}*/ 284 /*FUNCTION Riftfront::PenaltyCreatePVector {{{*/ 285 void Riftfront::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){ 269 void Riftfront::PenaltyCreatePVector(Vector<IssmDouble>* pf,IssmDouble kmax){/*{{{*/ 286 270 287 271 /*Retrieve parameters: */ … … 308 292 } 309 293 /*}}}*/ 310 /*FUNCTION Riftfront::CreateKMatrix {{{*/ 311 void Riftfront::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 294 void Riftfront::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){/*{{{*/ 312 295 /*do nothing: */ 313 296 return; 314 297 } 315 298 /*}}}*/ 316 /*FUNCTION Riftfront::CreatePVector {{{*/ 317 void Riftfront::CreatePVector(Vector<IssmDouble>* pf){ 299 void Riftfront::CreatePVector(Vector<IssmDouble>* pf){/*{{{*/ 318 300 /*do nothing: */ 319 301 return; 320 302 } 321 303 /*}}}*/ 322 /*FUNCTION Riftfront::GetNodesSidList{{{*/ 323 void Riftfront::GetNodesSidList(int* sidlist){ 304 void Riftfront::GetNodesSidList(int* sidlist){/*{{{*/ 324 305 325 306 _assert_(sidlist); … … 329 310 } 330 311 /*}}}*/ 331 /*FUNCTION Riftfront::GetNodesLidList{{{*/ 332 void Riftfront::GetNodesLidList(int* lidlist){ 312 void Riftfront::GetNodesLidList(int* lidlist){/*{{{*/ 333 313 334 314 _assert_(lidlist); … … 338 318 } 339 319 /*}}}*/ 340 /*FUNCTION Riftfront::GetNumberOfNodes{{{*/ 341 int Riftfront::GetNumberOfNodes(void){ 320 int Riftfront::GetNumberOfNodes(void){/*{{{*/ 342 321 343 322 return NUMVERTICES; 344 323 } 345 324 /*}}}*/ 346 /*FUNCTION Riftfront::InAnalysis{{{*/ 347 bool Riftfront::InAnalysis(int in_analysis_type){ 325 bool Riftfront::InAnalysis(int in_analysis_type){/*{{{*/ 348 326 if (in_analysis_type==this->analysis_type) return true; 349 327 else return false; 350 328 } 351 329 /*}}}*/ 352 /*FUNCTION Riftfront::SetwiseNodeConnectivity{{{*/ 353 void Riftfront::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){ 330 void Riftfront::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/ 354 331 355 332 /*Output */ … … 407 384 408 385 /*Riftfront numerics*/ 409 /*FUNCTION Riftfront::PenaltyCreateKMatrixStressbalanceHoriz {{{*/ 410 ElementMatrix* Riftfront::PenaltyCreateKMatrixStressbalanceHoriz(IssmDouble kmax){ 386 ElementMatrix* Riftfront::PenaltyCreateKMatrixStressbalanceHoriz(IssmDouble kmax){/*{{{*/ 411 387 412 388 const int numdof = NDOF2*NUMVERTICES; … … 485 461 } 486 462 /*}}}*/ 487 /*FUNCTION Riftfront::PenaltyCreatePVectorStressbalanceHoriz {{{*/ 488 ElementVector* Riftfront::PenaltyCreatePVectorStressbalanceHoriz(IssmDouble kmax){ 463 ElementVector* Riftfront::PenaltyCreatePVectorStressbalanceHoriz(IssmDouble kmax){/*{{{*/ 489 464 490 465 int j; … … 580 555 } 581 556 /*}}}*/ 582 /*FUNCTION Riftfront::Constrain {{{*/583 557 #define _ZIGZAGCOUNTER_ 584 585 int Riftfront::Constrain(int* punstable){ 558 int Riftfront::Constrain(int* punstable){/*{{{*/ 586 559 587 560 IssmDouble penetration; … … 664 637 } 665 638 /*}}}*/ 666 /*FUNCTION Riftfront::FreezeConstraints{{{*/ 667 void Riftfront::FreezeConstraints(void){ 639 void Riftfront::FreezeConstraints(void){/*{{{*/ 668 640 669 641 /*Just set frozen flag to 1: */ … … 672 644 } 673 645 /*}}}*/ 674 /*FUNCTION Riftfront::IsFrozen{{{*/ 675 bool Riftfront::IsFrozen(void){ 646 bool Riftfront::IsFrozen(void){/*{{{*/ 676 647 677 648 /*Just set frozen flag to 1: */ -
issm/trunk-jpl/src/c/classes/Massfluxatgate.h
r17924 r18064 29 29 30 30 /*Massfluxatgate constructors, destructors :*/ 31 /*FUNCTION Massfluxatgate() {{{*/ 32 Massfluxatgate(){ 31 Massfluxatgate(){/*{{{*/ 33 32 this->name = 0; 34 33 this->numsegments = 0; … … 36 35 } 37 36 /*}}}*/ 38 /*FUNCTION Massfluxatgate(char* name, int numsegments, doubletype* segments) {{{*/ 39 Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_segments) { 37 Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_segments) {/*{{{*/ 40 38 41 39 int i; … … 63 61 } 64 62 /*}}}*/ 65 /*FUNCTION Massfluxatgate(char* name, int numsegments, doubletype* x1, doubletype* y1, doubletype* x2, doubletype* y2,int* elements) {{{*/ 66 Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_x1, doubletype* in_y1, doubletype* in_x2, doubletype* in_y2,int* in_elements){ 63 Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_x1, doubletype* in_y1, doubletype* in_x2, doubletype* in_y2,int* in_elements){/*{{{*/ 67 64 68 65 this->name = xNew<char>(strlen(in_name)+1); … … 81 78 } 82 79 /*}}}*/ 83 /*FUNCTION ~Massfluxatgate() {{{*/ 84 ~Massfluxatgate(){ 80 ~Massfluxatgate(){/*{{{*/ 85 81 xDelete<doubletype>(this->x1); 86 82 xDelete<doubletype>(this->y1); … … 93 89 94 90 /*Object virtual function resolutoin: */ 95 /*FUNCTION Echo(){{{*/ 96 void Echo(void){ 91 void Echo(void){/*{{{*/ 97 92 _printf_(" Massfluxatgate: " << name << "\n"); 98 93 _printf_(" numsegments: " << numsegments << "\n"); … … 105 100 } 106 101 /*}}}*/ 107 /*FUNCTION DeepEcho(){{{*/ 108 void DeepEcho(void){ 102 void DeepEcho(void){/*{{{*/ 109 103 this->Echo(); 110 104 } 111 105 /*}}}*/ 112 /*FUNCTION Id(){{{*/ 113 int Id(void){ 106 int Id(void){/*{{{*/ 114 107 return -1; 115 108 } 116 109 /*}}}*/ 117 /*FUNCTION ObjectEnum{{{*/ 118 int ObjectEnum(void){ 110 int ObjectEnum(void){/*{{{*/ 119 111 return MassfluxatgateEnum; 120 112 } 121 113 /*}}}*/ 122 /*FUNCTION copy {{{*/ 123 Object* copy() { 114 Object* copy() {/*{{{*/ 124 115 return new Massfluxatgate(this->name,this->numsegments,this->x1,this->y1,this->x2,this->y2,this->elements); 125 116 } 126 117 /*}}}*/ 127 118 /*Definition virtual function resolutoin: */ 128 /*FUNCTION char* Name() {{{*/ 129 char* Name(){ 119 char* Name(){/*{{{*/ 130 120 131 121 char* name2=xNew<char>(strlen(this->name)+1); … … 135 125 } 136 126 /*}}}*/ 137 /*FUNCTION doubletype* Response(FemModel* femmodel) {{{*/ 138 IssmDouble Response(FemModel* femmodel){ 127 IssmDouble Response(FemModel* femmodel){/*{{{*/ 139 128 140 129 int i,j; -
issm/trunk-jpl/src/c/classes/Materials/Materials.cpp
r17275 r18064 19 19 20 20 /*Object constructors and destructor*/ 21 /*FUNCTION Materials::Materials(){{{*/ 22 Materials::Materials(){ 21 Materials::Materials(){/*{{{*/ 23 22 enum_type=MaterialsEnum; 24 23 return; 25 24 } 26 25 /*}}}*/ 27 /*FUNCTION Materials::~Materials(){{{*/ 28 Materials::~Materials(){ 26 Materials::~Materials(){/*{{{*/ 29 27 return; 30 28 } … … 32 30 33 31 /*Object management*/ 34 /*FUNCTION Materials::Configure{{{*/ 35 void Materials::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){ 32 void Materials::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){/*{{{*/ 36 33 37 34 vector<Object*>::iterator object; -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r18060 r18064 27 27 28 28 /*Matice constructors and destructor*/ 29 /*FUNCTION Matice::Matice(){{{*/ 30 Matice::Matice(){ 29 Matice::Matice(){/*{{{*/ 31 30 this->helement=NULL; 32 31 this->element=NULL; … … 34 33 } 35 34 /*}}}*/ 36 /*FUNCTION Matice::Matice(int id, int index, IoModel* iomodel, int num_vertices){{{*/ 37 Matice::Matice(int matice_mid,int index, IoModel* iomodel){ 35 Matice::Matice(int matice_mid,int index, IoModel* iomodel){/*{{{*/ 38 36 39 37 /*Intermediaries:*/ … … 59 57 } 60 58 /*}}}*/ 61 /*FUNCTION Matice::~Matice(){{{*/ 62 Matice::~Matice(){ 59 Matice::~Matice(){/*{{{*/ 63 60 delete helement; 64 61 return; … … 67 64 68 65 /*Object virtual functions definitions:*/ 69 /*FUNCTION Matice::Echo {{{*/ 70 void Matice::Echo(void){ 66 void Matice::Echo(void){/*{{{*/ 71 67 72 68 _printf_("Matice:\n"); … … 76 72 } 77 73 /*}}}*/ 78 /*FUNCTION Matice::DeepEcho {{{*/ 79 void Matice::DeepEcho(void){ 74 void Matice::DeepEcho(void){/*{{{*/ 80 75 81 76 _printf_("Matice:\n"); … … 85 80 } 86 81 /*}}}*/ 87 /*FUNCTION Matice::Id {{{*/ 88 int Matice::Id(void){ return mid; } 89 /*}}}*/ 90 /*FUNCTION Matice::ObjectEnum{{{*/ 91 int Matice::ObjectEnum(void){ 82 int Matice::Id(void){ return mid; }/*{{{*/ 83 /*}}}*/ 84 int Matice::ObjectEnum(void){/*{{{*/ 92 85 93 86 return MaticeEnum; … … 95 88 } 96 89 /*}}}*/ 97 /*FUNCTION Matice::copy() {{{*/ 98 Object* Matice::copy() { 90 Object* Matice::copy() {/*{{{*/ 99 91 100 92 /*Output*/ … … 113 105 } 114 106 /*}}}*/ 115 /*FUNCTION Matice::copy2(Element* element) {{{*/ 116 Material* Matice::copy2(Element* element_in) { 107 Material* Matice::copy2(Element* element_in) {/*{{{*/ 117 108 118 109 /*Output*/ … … 133 124 134 125 /*Matice management*/ 135 /*FUNCTION Matice::Configure {{{*/ 136 void Matice::Configure(Elements* elementsin){ 126 void Matice::Configure(Elements* elementsin){/*{{{*/ 137 127 138 128 /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective … … 142 132 } 143 133 /*}}}*/ 144 /*FUNCTION Matice::SetCurrentConfiguration {{{*/ 145 void Matice::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 146 147 } 148 /*}}}*/ 149 /*FUNCTION Matice::GetA {{{*/ 150 IssmDouble Matice::GetA(){ 134 void Matice::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){/*{{{*/ 135 136 } 137 /*}}}*/ 138 IssmDouble Matice::GetA(){/*{{{*/ 151 139 /* 152 140 * A = 1/B^n … … 161 149 } 162 150 /*}}}*/ 163 /*FUNCTION Matice::GetAbar {{{*/ 164 IssmDouble Matice::GetAbar(){ 151 IssmDouble Matice::GetAbar(){/*{{{*/ 165 152 /* 166 153 * A = 1/B^n … … 175 162 } 176 163 /*}}}*/ 177 /*FUNCTION Matice::GetB {{{*/ 178 IssmDouble Matice::GetB(){ 164 IssmDouble Matice::GetB(){/*{{{*/ 179 165 180 166 /*Output*/ … … 185 171 } 186 172 /*}}}*/ 187 /*FUNCTION Matice::GetBbar {{{*/ 188 IssmDouble Matice::GetBbar(){ 173 IssmDouble Matice::GetBbar(){/*{{{*/ 189 174 190 175 /*Output*/ … … 195 180 } 196 181 /*}}}*/ 197 /*FUNCTION Matice::GetN {{{*/ 198 IssmDouble Matice::GetN(){ 182 IssmDouble Matice::GetN(){/*{{{*/ 199 183 200 184 /*Output*/ … … 205 189 } 206 190 /*}}}*/ 207 /*FUNCTION Matice::GetD {{{*/ 208 IssmDouble Matice::GetD(){ 191 IssmDouble Matice::GetD(){/*{{{*/ 209 192 210 193 _assert_(this->isdamaged); … … 215 198 } 216 199 /*}}}*/ 217 /*FUNCTION Matice::GetDbar {{{*/ 218 IssmDouble Matice::GetDbar(){ 200 IssmDouble Matice::GetDbar(){/*{{{*/ 219 201 220 202 _assert_(this->isdamaged); … … 225 207 } 226 208 /*}}}*/ 227 /*FUNCTION Matice::IsDamage() {{{*/ 228 bool Matice::IsDamage(){ 209 bool Matice::IsDamage(){/*{{{*/ 229 210 230 211 return this->isdamaged; 231 212 } 232 213 /*}}}*/ 233 /*FUNCTION Matice::GetViscosity {{{*/ 234 void Matice::GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){ 214 void Matice::GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){/*{{{*/ 235 215 /*From a string tensor and a material object, return viscosity, using Glen's flow law. 236 216 (1-D) B … … 284 264 } 285 265 /*}}}*/ 286 /*FUNCTION Matice::GetViscosity_B {{{*/ 287 void Matice::GetViscosity_B(IssmDouble* pdmudB,IssmDouble eps_eff){ 266 void Matice::GetViscosity_B(IssmDouble* pdmudB,IssmDouble eps_eff){/*{{{*/ 288 267 289 268 /*output: */ … … 313 292 } 314 293 /*}}}*/ 315 /*FUNCTION Matice::GetViscosity_D {{{*/ 316 void Matice::GetViscosity_D(IssmDouble* pdmudD,IssmDouble eps_eff){ 294 void Matice::GetViscosity_D(IssmDouble* pdmudD,IssmDouble eps_eff){/*{{{*/ 317 295 318 296 /*output: */ … … 340 318 } 341 319 /*}}}*/ 342 /*FUNCTION Matice::GetViscosityBar {{{*/ 343 void Matice::GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){ 320 void Matice::GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){/*{{{*/ 344 321 /*From a string tensor and a material object, return viscosity, using Glen's flow law. 345 322 (1-D) B … … 392 369 } 393 370 /*}}}*/ 394 /*FUNCTION Matice::GetViscosityComplement {{{*/ 395 void Matice::GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* epsilon){ 371 void Matice::GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* epsilon){/*{{{*/ 396 372 /*Return viscosity accounting for steady state power law creep [Thomas and SSA, 1982]: 397 373 * … … 451 427 } 452 428 /*}}}*/ 453 /*FUNCTION Matice::GetViscosityDComplement {{{*/ 454 void Matice::GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* epsilon){ 429 void Matice::GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* epsilon){/*{{{*/ 455 430 /*Return viscosity derivative for control method d(mu)/dD: 456 431 * … … 507 482 } 508 483 /*}}}*/ 509 /*FUNCTION Matice::GetViscosityDerivativeEpsSquare{{{*/ 510 void Matice::GetViscosityDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){ 484 void Matice::GetViscosityDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){/*{{{*/ 511 485 512 486 /*output: */ … … 541 515 } 542 516 /*}}}*/ 543 /*FUNCTION Matice::GetViscosity2dDerivativeEpsSquare{{{*/ 544 void Matice::GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){ 517 void Matice::GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){/*{{{*/ 545 518 546 519 /*output: */ … … 570 543 } 571 544 /*}}}*/ 572 /*FUNCTION Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/ 573 void Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 574 575 } 576 /*}}}*/ 577 /*FUNCTION Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/ 578 void Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 579 580 } 581 /*}}}*/ 582 /*FUNCTION Matice::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/ 583 void Matice::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){ 545 void Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 546 547 } 548 /*}}}*/ 549 void Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/ 550 551 } 552 /*}}}*/ 553 void Matice::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){/*{{{*/ 584 554 /*Nothing updated yet*/ 585 555 } 586 556 /*}}}*/ 587 /*FUNCTION Matice::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 588 void Matice::InputUpdateFromConstant(IssmDouble constant, int name){ 557 void Matice::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/ 589 558 /*Nothing updated yet*/ 590 559 } 591 560 /*}}}*/ 592 /*FUNCTION Matice::InputUpdateFromConstant(int constant, int name) {{{*/ 593 void Matice::InputUpdateFromConstant(int constant, int name){ 561 void Matice::InputUpdateFromConstant(int constant, int name){/*{{{*/ 594 562 /*Nothing updated yet*/ 595 563 } 596 564 /*}}}*/ 597 /*FUNCTION Matice::InputUpdateFromConstant(bool constant, int name) {{{*/ 598 void Matice::InputUpdateFromConstant(bool constant, int name){ 565 void Matice::InputUpdateFromConstant(bool constant, int name){/*{{{*/ 599 566 /*Nothing updated yet*/ 600 567 } -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r18001 r18064 13 13 14 14 /*Matpar constructors and destructor*/ 15 /*FUNCTION Matpar::Matpar() {{{*/ 16 Matpar::Matpar(){ 15 Matpar::Matpar(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{*/ 21 Matpar::Matpar(int matpar_mid, IoModel* iomodel){ 19 Matpar::Matpar(int matpar_mid, IoModel* iomodel){/*{{{*/ 22 20 23 21 bool isefficientlayer; … … 94 92 } 95 93 /*}}}*/ 96 /*FUNCTION Matpar::~Matpar() {{{*/ 97 Matpar::~Matpar(){ 94 Matpar::~Matpar(){/*{{{*/ 98 95 return; 99 96 } … … 101 98 102 99 /*Object virtual functions definitions:*/ 103 /*FUNCTION Matpar::Echo {{{*/ 104 void Matpar::Echo(void){ 100 void Matpar::Echo(void){/*{{{*/ 105 101 106 102 _printf_("Matpar:\n"); … … 125 121 } 126 122 /*}}}*/ 127 /*FUNCTION Matpar::DeepEcho {{{*/ 128 void Matpar::DeepEcho(void){ 123 void Matpar::DeepEcho(void){/*{{{*/ 129 124 130 125 this->Echo(); 131 126 } 132 127 /*}}}*/ 133 /*FUNCTION Matpar::Id {{{*/ 134 int Matpar::Id(void){ return mid; } 135 /*}}}*/ 136 /*FUNCTION Matpar::ObjectEnum{{{*/ 137 int Matpar::ObjectEnum(void){ 128 int Matpar::Id(void){ return mid; }/*{{{*/ 129 /*}}}*/ 130 int Matpar::ObjectEnum(void){/*{{{*/ 138 131 139 132 return MatparEnum; … … 141 134 } 142 135 /*}}}*/ 143 /*FUNCTION Matpar::copy {{{*/ 144 Object* Matpar::copy() { 136 Object* Matpar::copy() {/*{{{*/ 145 137 return new Matpar(*this); 146 138 } … … 148 140 149 141 /*Update virtual functions definitions:*/ 150 /*FUNCTION Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/ 151 void Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 142 void Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 152 143 /*Nothing updated yet*/ 153 144 } 154 145 /*}}}*/ 155 /*FUNCTION Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/ 156 void Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 146 void Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/ 157 147 /*Nothing updated yet*/ 158 148 } 159 149 /*}}}*/ 160 /*FUNCTION Matpar::InputUpdateFromMatrixDakota(IssmDouble* vector, int name, int type) {{{*/ 161 void Matpar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){ 150 void Matpar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){/*{{{*/ 162 151 /*Nothing updated yet*/ 163 152 } 164 153 /*}}}*/ 165 /*FUNCTION Matpar::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 166 void Matpar::InputUpdateFromConstant(IssmDouble constant, int name){ 154 void Matpar::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/ 167 155 168 156 switch(name){ … … 221 209 } 222 210 /*}}}*/ 223 /*FUNCTION Matpar::InputUpdateFromConstant(int constant, int name) {{{*/ 224 void Matpar::InputUpdateFromConstant(int constant, int name){ 211 void Matpar::InputUpdateFromConstant(int constant, int name){/*{{{*/ 225 212 /*Nothing updated yet*/ 226 213 } 227 214 /*}}}*/ 228 /*FUNCTION Matpar::InputUpdateFromConstant(bool constant, int name) {{{*/ 229 void Matpar::InputUpdateFromConstant(bool constant, int name){ 215 void Matpar::InputUpdateFromConstant(bool constant, int name){/*{{{*/ 230 216 /*Nothing updated yet*/ 231 217 } … … 233 219 234 220 /*Matpar management: */ 235 /*FUNCTION Matpar::Configure {{{*/ 236 void Matpar::Configure(Elements* elementsin){ 221 void Matpar::Configure(Elements* elementsin){/*{{{*/ 237 222 238 223 /*nothing done yet!*/ … … 240 225 } 241 226 /*}}}*/ 242 /*FUNCTION Matpar::Configure {{{*/ 243 IssmDouble Matpar::GetMaterialParameter(int enum_in){ 227 IssmDouble Matpar::GetMaterialParameter(int enum_in){/*{{{*/ 244 228 245 229 switch(enum_in){ … … 272 256 } 273 257 /*}}}*/ 274 /*FUNCTION Matpar::GetBeta {{{*/ 275 IssmDouble Matpar::GetBeta(){ 258 IssmDouble Matpar::GetBeta(){/*{{{*/ 276 259 return beta; 277 260 } 278 261 /*}}}*/ 279 /*FUNCTION Matpar::GetG {{{*/ 280 IssmDouble Matpar::GetG(){ 262 IssmDouble Matpar::GetG(){/*{{{*/ 281 263 return g; 282 264 } 283 265 /*}}}*/ 284 /*FUNCTION Matpar::GetMeltingPoint {{{*/ 285 IssmDouble Matpar::GetMeltingPoint(){ 266 IssmDouble Matpar::GetMeltingPoint(){/*{{{*/ 286 267 return meltingpoint; 287 268 } 288 269 /*}}}*/ 289 /*FUNCTION Matpar::GetRhoIce {{{*/ 290 IssmDouble Matpar::GetRhoIce(){ 270 IssmDouble Matpar::GetRhoIce(){/*{{{*/ 291 271 292 272 return rho_ice; 293 273 } 294 274 /*}}}*/ 295 /*FUNCTION Matpar::GetRhoWater {{{*/ 296 IssmDouble Matpar::GetRhoWater(){ 275 IssmDouble Matpar::GetRhoWater(){/*{{{*/ 297 276 return rho_water; 298 277 } 299 278 /*}}}*/ 300 /*FUNCTION Matpar::GetRhoFreshwater {{{*/ 301 IssmDouble Matpar::GetRhoFreshwater(){ 279 IssmDouble Matpar::GetRhoFreshwater(){/*{{{*/ 302 280 return rho_freshwater; 303 281 } 304 282 /*}}}*/ 305 /*FUNCTION Matpar::GetDesFac {{{*/ 306 IssmDouble Matpar::GetDesFac(){ 283 IssmDouble Matpar::GetDesFac(){/*{{{*/ 307 284 return desfac; 308 285 } 309 286 /*}}}*/ 310 /*FUNCTION Matpar::GetS0p {{{*/ 311 IssmDouble Matpar::GetS0p(){ 287 IssmDouble Matpar::GetS0p(){/*{{{*/ 312 288 return s0p; 313 289 } 314 290 /*}}}*/ 315 /*FUNCTION Matpar::TMeltingPoint {{{*/ 316 IssmDouble Matpar::TMeltingPoint(IssmDouble pressure){ 291 IssmDouble Matpar::TMeltingPoint(IssmDouble pressure){/*{{{*/ 317 292 return meltingpoint-beta*pressure; 318 293 } 319 294 /*}}}*/ 320 /*FUNCTION Matpar::PureIceEnthalpy{{{*/ 321 IssmDouble Matpar::PureIceEnthalpy(IssmDouble pressure){ 295 IssmDouble Matpar::PureIceEnthalpy(IssmDouble pressure){/*{{{*/ 322 296 return heatcapacity*(TMeltingPoint(pressure)-referencetemperature); 323 297 } 324 298 /*}}}*/ 325 /*FUNCTION Matpar::GetEnthalpyDiffusionParameter{{{*/ 326 IssmDouble Matpar::GetEnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure){ 299 IssmDouble Matpar::GetEnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure){/*{{{*/ 327 300 if (enthalpy<PureIceEnthalpy(pressure)) 328 301 return thermalconductivity/heatcapacity; … … 331 304 } 332 305 /*}}}*/ 333 /*FUNCTION Matpar::GetEnthalpyDiffusionParameterVolume{{{*/ 334 IssmDouble Matpar::GetEnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure){ 306 IssmDouble Matpar::GetEnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure){/*{{{*/ 335 307 336 308 int iv; … … 378 350 } 379 351 /*}}}*/ 380 /*FUNCTION Matpar::EnthalpyToThermal {{{*/ 381 void Matpar::EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){ 352 void Matpar::EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){/*{{{*/ 382 353 383 354 /*Ouput*/ … … 398 369 } 399 370 /*}}}*/ 400 /*FUNCTION Matpar::ThermalToEnthalpy {{{*/ 401 void Matpar::ThermalToEnthalpy(IssmDouble * penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure){ 371 void Matpar::ThermalToEnthalpy(IssmDouble * penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure){/*{{{*/ 402 372 403 373 /*Ouput*/ … … 415 385 } 416 386 /*}}}*/ 417 /*FUNCTION Matpar::GetLithosphereShearModulus {{{*/ 418 IssmDouble Matpar::GetLithosphereShearModulus(){ 387 IssmDouble Matpar::GetLithosphereShearModulus(){ /*{{{*/ 419 388 return lithosphere_shear_modulus; 420 389 } 421 390 /*}}}*/ 422 /*FUNCTION Matpar::GetLithosphereDensity {{{*/ 423 IssmDouble Matpar::GetLithosphereDensity(){ 391 IssmDouble Matpar::GetLithosphereDensity(){ /*{{{*/ 424 392 return lithosphere_density; 425 393 } 426 394 /*}}}*/ 427 /*FUNCTION Matpar::GetMantleDensity {{{*/ 428 IssmDouble Matpar::GetMantleDensity(){ 395 IssmDouble Matpar::GetMantleDensity(){ /*{{{*/ 429 396 return mantle_density; 430 397 } 431 398 /*}}}*/ 432 /*FUNCTION Matpar::GetMantleShearModulus {{{*/ 433 IssmDouble Matpar::GetMantleShearModulus(){ 399 IssmDouble Matpar::GetMantleShearModulus(){ /*{{{*/ 434 400 return mantle_shear_modulus; 435 401 } -
issm/trunk-jpl/src/c/classes/Misfit.h
r17294 r18064 31 31 32 32 /*Misfit constructors, destructors :*/ 33 /*FUNCTION Misfit() {{{*/ 34 Misfit(){ 33 Misfit(){/*{{{*/ 35 34 36 35 this->name = NULL; … … 44 43 } 45 44 /*}}}*/ 46 /*FUNCTION Misfit(char* in_name, int in_model_enum, int in_observation_enum char* in_timeinterpolation, int in_weights_enum) {{{*/ 47 Misfit(char* in_name, int in_model_enum, int in_observation_enum, char* in_timeinterpolation, int in_weights_enum){ 45 Misfit(char* in_name, int in_model_enum, int in_observation_enum, char* in_timeinterpolation, int in_weights_enum){/*{{{*/ 48 46 49 47 this->name = xNew<char>(strlen(in_name)+1); … … 61 59 } 62 60 /*}}}*/ 63 /*FUNCTION ~Misfit() {{{*/ 64 ~Misfit(){ 61 ~Misfit(){/*{{{*/ 65 62 if(this->name)xDelete(this->name); 66 63 if(this->timeinterpolation)xDelete(this->timeinterpolation); … … 70 67 /*}}}*/ 71 68 /*Object virtual function resolutoin: */ 72 /*FUNCTION Echo(){{{*/ 73 void Echo(void){ 69 void Echo(void){/*{{{*/ 74 70 _printf_(" Misfit: " << name << "\n"); 75 71 _printf_(" model_enum: " << model_enum << " " << EnumToStringx(model_enum) << "\n"); … … 79 75 } 80 76 /*}}}*/ 81 /*FUNCTION DeepEcho(){{{*/ 82 void DeepEcho(void){ 77 void DeepEcho(void){/*{{{*/ 83 78 this->Echo(); 84 79 } 85 80 /*}}}*/ 86 /*FUNCTION Id(){{{*/ 87 int Id(void){ 81 int Id(void){/*{{{*/ 88 82 return -1; 89 83 } 90 84 /*}}}*/ 91 /*FUNCTION ObjectEnum{{{*/ 92 int ObjectEnum(void){ 85 int ObjectEnum(void){/*{{{*/ 93 86 return MisfitEnum; 94 87 } 95 88 /*}}}*/ 96 /*FUNCTION copy {{{*/ 97 Object* copy() { 89 Object* copy() {/*{{{*/ 98 90 return new Misfit(this->name,this->model_enum,this->observation_enum,this->timeinterpolation,this->weights_enum); 99 91 } 100 92 /*}}}*/ 101 93 /*Definition virtual function resolutoin: */ 102 /*FUNCTION char* Name() {{{*/ 103 char* Name(){ 94 char* Name(){/*{{{*/ 104 95 105 96 char* name2=xNew<char>(strlen(this->name)+1); … … 109 100 } 110 101 /*}}}*/ 111 /*FUNCTION IssmDouble Response(FemModel* femmodel) {{{*/ 112 IssmDouble Response(FemModel* femmodel){ 102 IssmDouble Response(FemModel* femmodel){/*{{{*/ 113 103 114 104 int i; -
issm/trunk-jpl/src/c/classes/Node.cpp
r17700 r18064 17 17 18 18 /*Node constructors and destructors:*/ 19 /*FUNCTION Node::Node() default constructor {{{*/ 20 Node::Node(){ 19 Node::Node(){/*{{{*/ 21 20 this->approximation=0; 22 21 } 23 22 /*}}}*/ 24 /*FUNCTION Node::Node(int node_id,int node_sid,int node_lid,int io_index, IoModel* iomodel,int analysis_enum,int approximation) {{{*/ 25 Node::Node(int node_id,int node_sid,int node_lid,int io_index, IoModel* iomodel,int analysis_enum,int in_approximation){ 23 Node::Node(int node_id,int node_sid,int node_lid,int io_index, IoModel* iomodel,int analysis_enum,int in_approximation){/*{{{*/ 26 24 27 25 /*Intermediary*/ … … 123 121 } 124 122 /*}}}*/ 125 /*FUNCTION Node::~Node(){{{*/ 126 Node::~Node(){ 123 Node::~Node(){/*{{{*/ 127 124 return; 128 125 } … … 130 127 131 128 /*Object virtual functions definitions:*/ 132 /*FUNCTION Node::Echo{{{*/ 133 void Node::Echo(void){ 129 void Node::Echo(void){/*{{{*/ 134 130 135 131 _printf_("Node:\n"); … … 143 139 } 144 140 /*}}}*/ 145 /*FUNCTION Node::DeepEcho{{{*/ 146 void Node::DeepEcho(void){ 141 void Node::DeepEcho(void){/*{{{*/ 147 142 148 143 _printf_("Node:\n"); … … 156 151 } 157 152 /*}}}*/ 158 /*FUNCTION Node::Id{{{*/ 159 int Node::Id(void){ return id; } 160 /*}}}*/ 161 /*FUNCTION Node::ObjectEnum{{{*/ 162 int Node::ObjectEnum(void){ 153 int Node::Id(void){ return id; }/*{{{*/ 154 /*}}}*/ 155 int Node::ObjectEnum(void){/*{{{*/ 163 156 164 157 return NodeEnum; … … 168 161 169 162 /*Node management:*/ 170 /*FUNCTION Node::GetDof {{{*/ 171 int Node::GetDof(int dofindex,int setenum){ 163 int Node::GetDof(int dofindex,int setenum){/*{{{*/ 172 164 173 165 _assert_(!this->indexingupdate); … … 187 179 188 180 } /*}}}*/ 189 /*FUNCTION Node::GetDofList{{{*/ 190 void Node::GetDofList(int* outdoflist,int approximation_enum,int setenum){ 181 void Node::GetDofList(int* outdoflist,int approximation_enum,int setenum){/*{{{*/ 191 182 int i; 192 183 int count=0; … … 251 242 } 252 243 /*}}}*/ 253 /*FUNCTION Node::GetLocalDofList{{{*/ 254 void Node::GetLocalDofList(int* outdoflist,int approximation_enum,int setenum){ 244 void Node::GetLocalDofList(int* outdoflist,int approximation_enum,int setenum){/*{{{*/ 255 245 int i; 256 246 int count=0; … … 352 342 } 353 343 /*}}}*/ 354 /*FUNCTION Node::Sid{{{*/ 355 int Node::Sid(void){ 344 int Node::Sid(void){/*{{{*/ 356 345 return sid; 357 346 } 358 347 /*}}}*/ 359 /*FUNCTION Node::Lid{{{*/ 360 int Node::Lid(void){ 348 int Node::Lid(void){/*{{{*/ 361 349 return lid; 362 350 } 363 351 /*}}}*/ 364 /*FUNCTION Node::GetCoordinateSystem{{{*/ 365 void Node::GetCoordinateSystem(IssmDouble* coord_system_out){ 352 void Node::GetCoordinateSystem(IssmDouble* coord_system_out){/*{{{*/ 366 353 367 354 /*Copy coord_system*/ … … 370 357 } 371 358 /*}}}*/ 372 /*FUNCTION Node::InAnalysis{{{*/ 373 bool Node::InAnalysis(int in_analysis_enum){ 359 bool Node::InAnalysis(int in_analysis_enum){/*{{{*/ 374 360 if (in_analysis_enum==this->analysis_enum) return true; 375 361 else return false; … … 378 364 379 365 /*Node numerics:*/ 380 /*FUNCTION Node::ApplyConstraints{{{*/ 381 void Node::ApplyConstraint(int dof,IssmDouble value){ 366 void Node::ApplyConstraint(int dof,IssmDouble value){/*{{{*/ 382 367 383 368 /*Dof should be added in the s set, describing which … … 387 372 } 388 373 /*}}}*/ 389 /*FUNCTION Node::RequiresDofReindexing{{{*/ 390 bool Node::RequiresDofReindexing(void){ 374 bool Node::RequiresDofReindexing(void){/*{{{*/ 391 375 392 376 return this->indexingupdate; … … 394 378 } 395 379 /*}}}*/ 396 /*FUNCTION Node::ReindexingDone{{{*/ 397 void Node::ReindexingDone(void){ 380 void Node::ReindexingDone(void){/*{{{*/ 398 381 399 382 this->indexingupdate = false; … … 401 384 } 402 385 /*}}}*/ 403 /*FUNCTION Node::RelaxConstraint{{{*/ 404 void Node::RelaxConstraint(int dof){ 386 void Node::RelaxConstraint(int dof){/*{{{*/ 405 387 406 388 /*Dof should be added to the f-set, and taken out of the s-set:*/ … … 409 391 } 410 392 /*}}}*/ 411 /*FUNCTION Node::CreateNodalConstraints{{{*/ 412 void Node::CreateNodalConstraints(Vector<IssmDouble>* ys){ 393 void Node::CreateNodalConstraints(Vector<IssmDouble>* ys){/*{{{*/ 413 394 414 395 int i; … … 437 418 } 438 419 /*}}}*/ 439 /*FUNCTION Node::DofInSSet {{{*/ 440 void Node::DofInSSet(int dof){ 420 void Node::DofInSSet(int dof){/*{{{*/ 441 421 442 422 /*Put dof for this node into the s set (ie, this dof will be constrained … … 451 431 } 452 432 /*}}}*/ 453 /*FUNCTION Node::DofInFSet {{{*/ 454 void Node::DofInFSet(int dof){ 433 void Node::DofInFSet(int dof){/*{{{*/ 455 434 456 435 /*Put dof for this node into the f set (ie, this dof will NOT be constrained … … 465 444 } 466 445 /*}}}*/ 467 /*FUNCTION Node::FreezeDof{{{*/ 468 void Node::FreezeDof(int dof){ 446 void Node::FreezeDof(int dof){/*{{{*/ 469 447 470 448 DofInSSet(dof); //with 0 displacement for this dof. … … 472 450 } 473 451 /*}}}*/ 474 /*FUNCTION Node::Deactivate{{{*/ 475 void Node::Deactivate(void){ 452 void Node::Deactivate(void){/*{{{*/ 476 453 477 454 if(IsActive()){ … … 482 459 } 483 460 /*}}}*/ 484 /*FUNCTION Node::Activate{{{*/ 485 void Node::Activate(void){ 461 void Node::Activate(void){/*{{{*/ 486 462 487 463 if(!IsActive()){ … … 492 468 } 493 469 /*}}}*/ 494 /*FUNCTION Node::IsActive{{{*/ 495 bool Node::IsActive(void){ 470 bool Node::IsActive(void){/*{{{*/ 496 471 497 472 return indexing.active; … … 499 474 } 500 475 /*}}}*/ 501 /*FUNCTION Node::GetApproximation {{{*/ 502 int Node::GetApproximation(){ 476 int Node::GetApproximation(){/*{{{*/ 503 477 504 478 return approximation; 505 479 } 506 480 /*}}}*/ 507 /*FUNCTION Node::GetNumberOfDofs{{{*/ 508 int Node::GetNumberOfDofs(int approximation_enum,int setenum){ 481 int Node::GetNumberOfDofs(int approximation_enum,int setenum){/*{{{*/ 509 482 510 483 /*Get number of degrees of freedom in a node, for a certain set (g,f or s-set) … … 553 526 } 554 527 /*}}}*/ 555 /*FUNCTION Node::IsClone {{{*/ 556 int Node::IsClone(){ 528 int Node::IsClone(){/*{{{*/ 557 529 558 530 return indexing.clone; … … 560 532 } 561 533 /*}}}*/ 562 /*FUNCTION Node::VecMerge {{{*/ 563 void Node::VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum){ 534 void Node::VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum){/*{{{*/ 564 535 565 536 IssmDouble *values = NULL; … … 611 582 } 612 583 /*}}}*/ 613 /*FUNCTION Node::VecReduce {{{*/ 614 void Node::VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setenum){ 584 void Node::VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setenum){/*{{{*/ 615 585 616 586 IssmDouble* values=NULL; … … 658 628 659 629 /* indexing routines:*/ 660 /*FUNCTION Node::DistributeDofs{{{*/ 661 void Node::DistributeDofs(int* pdofcount,int setenum){ 630 void Node::DistributeDofs(int* pdofcount,int setenum){/*{{{*/ 662 631 663 632 int i; … … 700 669 } 701 670 /*}}}*/ 702 /*FUNCTION Node::OffsetDofs{{{*/ 703 void Node::OffsetDofs(int dofcount,int setenum){ 671 void Node::OffsetDofs(int dofcount,int setenum){/*{{{*/ 704 672 705 673 int i; … … 723 691 } 724 692 /*}}}*/ 725 /*FUNCTION Node::ShowTrueDofs{{{*/ 726 void Node::ShowTrueDofs(int* truedofs, int ncols,int setenum){ 693 void Node::ShowTrueDofs(int* truedofs, int ncols,int setenum){/*{{{*/ 727 694 728 695 int j; … … 748 715 } 749 716 /*}}}*/ 750 /*FUNCTION Node::UpdateCloneDofs{{{*/ 751 void Node::UpdateCloneDofs(int* alltruedofs,int ncols,int setenum){ 717 void Node::UpdateCloneDofs(int* alltruedofs,int ncols,int setenum){/*{{{*/ 752 718 753 719 int j; … … 773 739 } 774 740 /*}}}*/ 775 /*FUNCTION Node::SetClone {{{*/ 776 void Node::SetClone(int* minranks){ 741 void Node::SetClone(int* minranks){/*{{{*/ 777 742 778 743 int my_rank; -
issm/trunk-jpl/src/c/classes/Options/OptionUtilities.cpp
r15012 r18064 15 15 /*}}}*/ 16 16 17 /*FUNCTION ColumnWiseDimsFromIndex{{{*/ 18 int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){ 17 int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){/*{{{*/ 19 18 20 19 int i; … … 34 33 return(0); 35 34 }/*}}}*/ 36 /*FUNCTION IndexFromColumnWiseDims{{{*/ 37 int IndexFromColumnWiseDims(int* dims, int* size, int ndims) { 35 int IndexFromColumnWiseDims(int* dims, int* size, int ndims) {/*{{{*/ 38 36 39 37 int i; … … 53 51 return(index); 54 52 }/*}}}*/ 55 /*FUNCTION RowWiseDimsFromIndex{{{*/ 56 int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) { 53 int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) {/*{{{*/ 57 54 58 55 int i; … … 72 69 return(0); 73 70 }/*}}}*/ 74 /*FUNCTION IndexFromRowWiseDims{{{*/ 75 int IndexFromRowWiseDims(int* dims, int* size, int ndims) { 71 int IndexFromRowWiseDims(int* dims, int* size, int ndims) {/*{{{*/ 76 72 77 73 int i; … … 91 87 return(index); 92 88 }/*}}}*/ 93 /*FUNCTION StringFromDims{{{*/ 94 int StringFromDims(char* cstr, int* dims, int ndims) { 89 int StringFromDims(char* cstr, int* dims, int ndims) {/*{{{*/ 95 90 96 91 sprintf(&cstr[0],"["); … … 100 95 return(0); 101 96 }/*}}}*/ 102 /*FUNCTION StringFromSize{{{*/ 103 int StringFromSize(char* cstr, int* size, int ndims) { 97 int StringFromSize(char* cstr, int* size, int ndims) {/*{{{*/ 104 98 105 99 sprintf(&cstr[0],"["); -
issm/trunk-jpl/src/c/classes/Options/Options.cpp
r15067 r18064 21 21 22 22 /*Object constructors and destructor*/ 23 /*FUNCTION Options::Options(){{{*/ 24 Options::Options(){ 23 Options::Options(){/*{{{*/ 25 24 return; 26 25 } 27 26 /*}}}*/ 28 /*FUNCTION Options::~Options(){{{*/ 29 Options::~Options(){ 27 Options::~Options(){/*{{{*/ 30 28 return; 31 29 } … … 33 31 34 32 /*Object management*/ 35 /*FUNCTION Options::AddOption{{{*/ 36 int Options::AddOption(Option* in_option){ 33 int Options::AddOption(Option* in_option){/*{{{*/ 37 34 38 35 char* name=NULL; … … 68 65 } 69 66 /*}}}*/ 70 /*FUNCTION Options::GetOption{{{*/ 71 Option* Options::GetOption(const char* name){ 67 Option* Options::GetOption(const char* name){/*{{{*/ 72 68 73 69 vector<Object*>::iterator object; -
issm/trunk-jpl/src/c/classes/Params/BoolParam.cpp
r16655 r18064 16 16 17 17 /*BoolParam constructors and destructor*/ 18 /*FUNCTION BoolParam::BoolParam(){{{*/ 19 BoolParam::BoolParam(){ 18 BoolParam::BoolParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION BoolParam::BoolParam(int enum_type,bool value){{{*/ 24 BoolParam::BoolParam(int in_enum_type,bool in_value){ 22 BoolParam::BoolParam(int in_enum_type,bool in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 28 26 } 29 27 /*}}}*/ 30 /*FUNCTION BoolParam::~BoolParam(){{{*/ 31 BoolParam::~BoolParam(){ 28 BoolParam::~BoolParam(){/*{{{*/ 32 29 return; 33 30 } … … 35 32 36 33 /*Object virtual functions definitions:*/ 37 /*FUNCTION BoolParam::Echo {{{*/ 38 void BoolParam::Echo(void){ 34 void BoolParam::Echo(void){/*{{{*/ 39 35 this->DeepEcho(); 40 36 } 41 37 /*}}}*/ 42 /*FUNCTION BoolParam::DeepEcho{{{*/ 43 void BoolParam::DeepEcho(void){ 38 void BoolParam::DeepEcho(void){/*{{{*/ 44 39 _printf_(setw(22)<<" BoolParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<(value?"true":"false")<<"\n"); 45 40 } 46 41 /*}}}*/ 47 /*FUNCTION BoolParam::Id{{{*/ 48 int BoolParam::Id(void){ return -1; } 42 int BoolParam::Id(void){ return -1; }/*{{{*/ 49 43 /*}}}*/ 50 /*FUNCTION BoolParam::ObjectEnum{{{*/ 51 int BoolParam::ObjectEnum(void){ 44 int BoolParam::ObjectEnum(void){/*{{{*/ 52 45 53 46 return BoolParamEnum; … … 55 48 } 56 49 /*}}}*/ 57 /*FUNCTION BoolParam::copy{{{*/ 58 Object* BoolParam::copy() { 50 Object* BoolParam::copy() {/*{{{*/ 59 51 60 52 return new BoolParam(this->enum_type,this->value); -
issm/trunk-jpl/src/c/classes/Params/DataSetParam.cpp
r16655 r18064 16 16 17 17 /*DataSetParam constructors and destructor*/ 18 /*FUNCTION DataSetParam::DataSetParam(){{{*/ 19 DataSetParam::DataSetParam(){ 18 DataSetParam::DataSetParam(){/*{{{*/ 20 19 value=NULL; 21 20 return; 22 21 } 23 22 /*}}}*/ 24 /*FUNCTION DataSetParam::DataSetParam(int enum_type,DataSet *value){{{*/ 25 DataSetParam::DataSetParam(int in_enum_type,DataSet* in_value){ 23 DataSetParam::DataSetParam(int in_enum_type,DataSet* in_value){/*{{{*/ 26 24 27 25 enum_type=in_enum_type; … … 29 27 } 30 28 /*}}}*/ 31 /*FUNCTION DataSetParam::~DataSetParam(){{{*/ 32 DataSetParam::~DataSetParam(){ 29 DataSetParam::~DataSetParam(){/*{{{*/ 33 30 delete value; 34 31 } … … 36 33 37 34 /*Object virtual functions definitions:*/ 38 /*FUNCTION DataSetParam::Echo {{{*/ 39 void DataSetParam::Echo(void){ 35 void DataSetParam::Echo(void){/*{{{*/ 40 36 this->DeepEcho(); 41 37 } 42 38 /*}}}*/ 43 /*FUNCTION DataSetParam::DeepEcho{{{*/ 44 void DataSetParam::DeepEcho(void){ 39 void DataSetParam::DeepEcho(void){/*{{{*/ 45 40 46 41 _printf_(setw(22)<<" DataSetParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" ----- begin\n"); … … 49 44 } 50 45 /*}}}*/ 51 /*FUNCTION DataSetParam::Id{{{*/ 52 int DataSetParam::Id(void){ return -1; } 46 int DataSetParam::Id(void){ return -1; }/*{{{*/ 53 47 /*}}}*/ 54 /*FUNCTION DataSetParam::ObjectEnum{{{*/ 55 int DataSetParam::ObjectEnum(void){ 48 int DataSetParam::ObjectEnum(void){/*{{{*/ 56 49 57 50 return DataSetParamEnum; … … 59 52 } 60 53 /*}}}*/ 61 /*FUNCTION DataSetParam::copy{{{*/ 62 Object* DataSetParam::copy() { 54 Object* DataSetParam::copy() {/*{{{*/ 63 55 64 56 return new DataSetParam(this->enum_type,this->value); … … 68 60 69 61 /*DataSetParam virtual functions definitions: */ 70 /*FUNCTION DataSetParam::GetParameterValue{{{*/ 71 void DataSetParam::GetParameterValue(DataSet** pdataset){ 62 void DataSetParam::GetParameterValue(DataSet** pdataset){/*{{{*/ 72 63 *pdataset=value->Copy(); 73 64 } -
issm/trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.cpp
r16233 r18064 16 16 17 17 /*DoubleMatArrayParam constructors and destructor*/ 18 /*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(){{{*/ 19 DoubleMatArrayParam::DoubleMatArrayParam(){ 18 DoubleMatArrayParam::DoubleMatArrayParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/ 24 DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){ 22 DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){/*{{{*/ 25 23 26 24 int i; … … 59 57 } 60 58 /*}}}*/ 61 /*FUNCTION DoubleMatArrayParam::~DoubleMatArrayParam(){{{*/ 62 DoubleMatArrayParam::~DoubleMatArrayParam(){ 59 DoubleMatArrayParam::~DoubleMatArrayParam(){/*{{{*/ 63 60 64 61 int i; … … 79 76 80 77 /*Object virtual functions definitions:*/ 81 /*FUNCTION DoubleMatArrayParam::Echo {{{*/ 82 void DoubleMatArrayParam::Echo(void){ 78 void DoubleMatArrayParam::Echo(void){/*{{{*/ 83 79 84 80 _printf_("DoubleMatArrayParam:\n"); … … 89 85 } 90 86 /*}}}*/ 91 /*FUNCTION DoubleMatArrayParam::DeepEcho{{{*/ 92 void DoubleMatArrayParam::DeepEcho(void){ 87 void DoubleMatArrayParam::DeepEcho(void){/*{{{*/ 93 88 94 89 int i,j,k; … … 113 108 } 114 109 /*}}}*/ 115 /*FUNCTION DoubleMatArrayParam::Id{{{*/ 116 int DoubleMatArrayParam::Id(void){ return -1; } 117 /*}}}*/ 118 /*FUNCTION DoubleMatArrayParam::ObjectEnum{{{*/ 119 int DoubleMatArrayParam::ObjectEnum(void){ 110 int DoubleMatArrayParam::Id(void){ return -1; }/*{{{*/ 111 /*}}}*/ 112 int DoubleMatArrayParam::ObjectEnum(void){/*{{{*/ 120 113 121 114 return DoubleMatArrayParamEnum; … … 123 116 } 124 117 /*}}}*/ 125 /*FUNCTION DoubleMatArrayParam::copy{{{*/ 126 Object* DoubleMatArrayParam::copy() { 118 Object* DoubleMatArrayParam::copy() {/*{{{*/ 127 119 128 120 return new DoubleMatArrayParam(this->enum_type,this->array, this->M, this->mdim_array,this->ndim_array); … … 132 124 133 125 /*DoubleMatArrayParam virtual functions definitions: */ 134 /*FUNCTION DoubleMatArrayParam::GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){{{*/ 135 void DoubleMatArrayParam::GetParameterValue(IssmDouble*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){ 126 void DoubleMatArrayParam::GetParameterValue(IssmDouble*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){/*{{{*/ 136 127 137 128 int i,m,n; … … 183 174 } 184 175 /*}}}*/ 185 /*FUNCTION DoubleMatArrayParam::SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/ 186 void DoubleMatArrayParam::SetValue(IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){ 176 void DoubleMatArrayParam::SetValue(IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){/*{{{*/ 187 177 188 178 int i,m,n; -
issm/trunk-jpl/src/c/classes/Params/DoubleMatParam.cpp
r16233 r18064 16 16 17 17 /*DoubleMatParam constructors and destructor*/ 18 /*FUNCTION DoubleMatParam::DoubleMatParam(){{{*/ 19 DoubleMatParam::DoubleMatParam(){ 18 DoubleMatParam::DoubleMatParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{*/ 24 DoubleMatParam::DoubleMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N){ 22 DoubleMatParam::DoubleMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION DoubleMatParam::~DoubleMatParam(){{{*/ 35 DoubleMatParam::~DoubleMatParam(){ 32 DoubleMatParam::~DoubleMatParam(){/*{{{*/ 36 33 xDelete<IssmDouble>(value); 37 34 return; … … 40 37 41 38 /*Object virtual functions definitions:*/ 42 /*FUNCTION DoubleMatParam::Echo {{{*/ 43 void DoubleMatParam::Echo(void){ 39 void DoubleMatParam::Echo(void){/*{{{*/ 44 40 45 41 _printf_("DoubleMatParam:\n"); … … 49 45 } 50 46 /*}}}*/ 51 /*FUNCTION DoubleMatParam::DeepEcho{{{*/ 52 void DoubleMatParam::DeepEcho(void){ 47 void DoubleMatParam::DeepEcho(void){/*{{{*/ 53 48 54 49 int i,j; … … 64 59 } 65 60 /*}}}*/ 66 /*FUNCTION DoubleMatParam::Id{{{*/ 67 int DoubleMatParam::Id(void){ return -1; } 61 int DoubleMatParam::Id(void){ return -1; }/*{{{*/ 68 62 /*}}}*/ 69 /*FUNCTION DoubleMatParam::ObjectEnum{{{*/ 70 int DoubleMatParam::ObjectEnum(void){ 63 int DoubleMatParam::ObjectEnum(void){/*{{{*/ 71 64 72 65 return DoubleMatParamEnum; … … 74 67 } 75 68 /*}}}*/ 76 /*FUNCTION DoubleMatParam::copy{{{*/ 77 Object* DoubleMatParam::copy() { 69 Object* DoubleMatParam::copy() {/*{{{*/ 78 70 79 71 return new DoubleMatParam(this->enum_type,this->value,this->M,this->N); … … 83 75 84 76 /*DoubleMatParam virtual functions definitions: */ 85 /*FUNCTION DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/ 86 void DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){ 77 void DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){/*{{{*/ 87 78 IssmDouble* output=NULL; 88 79 … … 96 87 } 97 88 /*}}}*/ 98 /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/ 99 void DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){ 89 void DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){/*{{{*/ 100 90 _error_("DoubleMat of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int"); 101 91 } 102 92 /*}}}*/ 103 /*FUNCTION DoubleMatParam::SetValue{{{*/ 104 void DoubleMatParam::SetValue(IssmDouble* IssmDoublearray,int in_M,int in_N){ 93 void DoubleMatParam::SetValue(IssmDouble* IssmDoublearray,int in_M,int in_N){/*{{{*/ 105 94 106 95 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/Params/DoubleParam.cpp
r16655 r18064 13 13 14 14 /*DoubleParam constructors and destructor*/ 15 /*FUNCTION DoubleParam::DoubleParam(){{{*/ 16 DoubleParam::DoubleParam(){ 15 DoubleParam::DoubleParam(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION DoubleParam::DoubleParam(int enum_type,IssmDouble value){{{*/ 21 DoubleParam::DoubleParam(int in_enum_type,IssmDouble in_value){ 19 DoubleParam::DoubleParam(int in_enum_type,IssmDouble in_value){/*{{{*/ 22 20 23 21 enum_type=in_enum_type; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION DoubleParam::~DoubleParam(){{{*/ 28 DoubleParam::~DoubleParam(){ 25 DoubleParam::~DoubleParam(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION DoubleParam::Echo {{{*/ 35 void DoubleParam::Echo(void){ 31 void DoubleParam::Echo(void){/*{{{*/ 36 32 this->DeepEcho(); 37 33 } 38 34 /*}}}*/ 39 /*FUNCTION DoubleParam::DeepEcho{{{*/ 40 void DoubleParam::DeepEcho(void){ 35 void DoubleParam::DeepEcho(void){/*{{{*/ 41 36 42 37 _printf_(setw(22)<<" DoubleParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 43 38 } 44 39 /*}}}*/ 45 /*FUNCTION DoubleParam::Id{{{*/ 46 int DoubleParam::Id(void){ return -1; } 40 int DoubleParam::Id(void){ return -1; }/*{{{*/ 47 41 /*}}}*/ 48 /*FUNCTION DoubleParam::ObjectEnum{{{*/ 49 int DoubleParam::ObjectEnum(void){ 42 int DoubleParam::ObjectEnum(void){/*{{{*/ 50 43 51 44 return DoubleParamEnum; … … 53 46 } 54 47 /*}}}*/ 55 /*FUNCTION DoubleParam::copy{{{*/ 56 Object* DoubleParam::copy() { 48 Object* DoubleParam::copy() {/*{{{*/ 57 49 58 50 return new DoubleParam(this->enum_type,this->value); … … 62 54 63 55 /*DoubleParam virtual functions definitions: */ 64 /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/ 65 void DoubleParam::GetParameterValue(int* pinteger){ 56 void DoubleParam::GetParameterValue(int* pinteger){/*{{{*/ 66 57 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer"); 67 58 } 68 59 /*}}}*/ 69 /*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/ 70 void DoubleParam::GetParameterValue(bool* pbool){ 60 void DoubleParam::GetParameterValue(bool* pbool){/*{{{*/ 71 61 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool"); 72 62 } 73 63 /*}}}*/ 74 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/ 75 void DoubleParam::GetParameterValue(int** pintarray,int* pM){ 64 void DoubleParam::GetParameterValue(int** pintarray,int* pM){/*{{{*/ 76 65 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers"); 77 66 } 78 67 /*}}}*/ 79 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/ 80 void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){ 68 void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){/*{{{*/ 81 69 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers"); 82 70 } 83 71 /*}}}*/ 84 /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/ 85 void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){ 72 void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){/*{{{*/ 86 73 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble"); 87 74 } 88 75 /*}}}*/ 89 /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/ 90 void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){ 76 void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){/*{{{*/ 91 77 _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble"); 92 78 } -
issm/trunk-jpl/src/c/classes/Params/DoubleTransientMatParam.cpp
r15128 r18064 15 15 /*}}}*/ 16 16 17 /*FUNCTION DoubleTransientMatParam::DoubleTransientMatParam(int enum_type,IssmDoubleMat value){{{*/ 18 DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){ 17 DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){/*{{{*/ 19 18 } 20 19 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Params/DoubleVecParam.cpp
r16655 r18064 16 16 17 17 /*DoubleVecParam constructors and destructor*/ 18 /*FUNCTION DoubleVecParam::DoubleVecParam(){{{*/ 19 DoubleVecParam::DoubleVecParam(){ 18 DoubleVecParam::DoubleVecParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec values,int M){{{*/ 24 DoubleVecParam::DoubleVecParam(int in_enum_type,IssmDouble* in_values, int in_M){ 22 DoubleVecParam::DoubleVecParam(int in_enum_type,IssmDouble* in_values, int in_M){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 31 29 } 32 30 /*}}}*/ 33 /*FUNCTION DoubleVecParam::~DoubleVecParam(){{{*/ 34 DoubleVecParam::~DoubleVecParam(){ 31 DoubleVecParam::~DoubleVecParam(){/*{{{*/ 35 32 xDelete<IssmDouble>(values); 36 33 return; … … 39 36 40 37 /*Object virtual functions definitions:*/ 41 /*FUNCTION DoubleVecParam::Echo {{{*/ 42 void DoubleVecParam::Echo(void){ 38 void DoubleVecParam::Echo(void){/*{{{*/ 43 39 44 40 _printf_(setw(22)<<" DoubleVecParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" size: "<<this->M<<"\n"); … … 46 42 } 47 43 /*}}}*/ 48 /*FUNCTION DoubleVecParam::DeepEcho{{{*/ 49 void DoubleVecParam::DeepEcho(void){ 44 void DoubleVecParam::DeepEcho(void){/*{{{*/ 50 45 _printf_(setw(22)<<" DoubleVecParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<"["); 51 46 for(int i=0;i<this->M;i++) _printf_(" "<< this->values[i]); … … 53 48 } 54 49 /*}}}*/ 55 /*FUNCTION DoubleVecParam::Id{{{*/ 56 int DoubleVecParam::Id(void){ return -1; } 50 int DoubleVecParam::Id(void){ return -1; }/*{{{*/ 57 51 /*}}}*/ 58 /*FUNCTION DoubleVecParam::ObjectEnum{{{*/ 59 int DoubleVecParam::ObjectEnum(void){ 52 int DoubleVecParam::ObjectEnum(void){/*{{{*/ 60 53 61 54 return DoubleVecParamEnum; … … 63 56 } 64 57 /*}}}*/ 65 /*FUNCTION DoubleVecParam::copy{{{*/ 66 Object* DoubleVecParam::copy() { 58 Object* DoubleVecParam::copy() {/*{{{*/ 67 59 68 60 return new DoubleVecParam(this->enum_type,this->values,this->M); … … 72 64 73 65 /*DoubleVecParam virtual functions definitions: */ 74 /*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/ 75 void DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){ 66 void DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){/*{{{*/ 76 67 IssmDouble* output=NULL; 77 68 int M; … … 86 77 } 87 78 /*}}}*/ 88 /*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/ 89 void DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){ 79 void DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){/*{{{*/ 90 80 IssmDouble* output=NULL; 91 81 int M; … … 103 93 } 104 94 /*}}}*/ 105 /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/ 106 void DoubleVecParam::GetParameterValue(int** pintarray,int* pM){ 95 void DoubleVecParam::GetParameterValue(int** pintarray,int* pM){/*{{{*/ 107 96 _error_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int"); 108 97 } 109 98 /*}}}*/ 110 /*FUNCTION DoubleVecParam::SetValue{{{*/ 111 void DoubleVecParam::SetValue(IssmDouble* IssmDoublearray,int in_M){ 99 void DoubleVecParam::SetValue(IssmDouble* IssmDoublearray,int in_M){/*{{{*/ 112 100 113 101 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/Params/FileParam.cpp
r16655 r18064 16 16 17 17 /*FileParam constructors and destructor*/ 18 /*FUNCTION FileParam::FileParam(){{{*/ 19 FileParam::FileParam(){ 18 FileParam::FileParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION FileParam::FileParam(int enum_type,FILE *value){{{*/ 24 FileParam::FileParam(int in_enum_type,FILE* in_value){ 22 FileParam::FileParam(int in_enum_type,FILE* in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 28 26 } 29 27 /*}}}*/ 30 /*FUNCTION FileParam::~FileParam(){{{*/ 31 FileParam::~FileParam(){ 28 FileParam::~FileParam(){/*{{{*/ 32 29 return; 33 30 } … … 35 32 36 33 /*Object virtual functions definitions:*/ 37 /*FUNCTION FileParam::Echo {{{*/ 38 void FileParam::Echo(void){ 34 void FileParam::Echo(void){/*{{{*/ 39 35 this->DeepEcho(); 40 36 } 41 37 /*}}}*/ 42 /*FUNCTION FileParam::DeepEcho{{{*/ 43 void FileParam::DeepEcho(void){ 38 void FileParam::DeepEcho(void){/*{{{*/ 44 39 45 40 _printf_(setw(22)<<" FileParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 46 41 } 47 42 /*}}}*/ 48 /*FUNCTION FileParam::Id{{{*/ 49 int FileParam::Id(void){ return -1; } 43 int FileParam::Id(void){ return -1; }/*{{{*/ 50 44 /*}}}*/ 51 /*FUNCTION FileParam::ObjectEnum{{{*/ 52 int FileParam::ObjectEnum(void){ 45 int FileParam::ObjectEnum(void){/*{{{*/ 53 46 54 47 return FileParamEnum; … … 56 49 } 57 50 /*}}}*/ 58 /*FUNCTION FileParam::copy{{{*/ 59 Object* FileParam::copy() { 51 Object* FileParam::copy() {/*{{{*/ 60 52 61 53 return new FileParam(this->enum_type,this->value); -
issm/trunk-jpl/src/c/classes/Params/IntMatParam.cpp
r16233 r18064 16 16 17 17 /*IntMatParam constructors and destructor*/ 18 /*FUNCTION IntMatParam::IntMatParam(){{{*/ 19 IntMatParam::IntMatParam(){ 18 IntMatParam::IntMatParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION IntMatParam::IntMatParam(int enum_type,IssmIntMat value){{{*/ 24 IntMatParam::IntMatParam(int in_enum_type,int* in_value, int in_M,int in_N){ 22 IntMatParam::IntMatParam(int in_enum_type,int* in_value, int in_M,int in_N){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION IntMatParam::~IntMatParam(){{{*/ 35 IntMatParam::~IntMatParam(){ 32 IntMatParam::~IntMatParam(){/*{{{*/ 36 33 xDelete<int>(value); 37 34 return; … … 40 37 41 38 /*Object virtual functions definitions:*/ 42 /*FUNCTION IntMatParam::Echo {{{*/ 43 void IntMatParam::Echo(void){ 39 void IntMatParam::Echo(void){/*{{{*/ 44 40 45 41 _printf_("IntMatParam:\n"); … … 49 45 } 50 46 /*}}}*/ 51 /*FUNCTION IntMatParam::DeepEcho{{{*/ 52 void IntMatParam::DeepEcho(void){ 47 void IntMatParam::DeepEcho(void){/*{{{*/ 53 48 54 49 int i,j; … … 64 59 } 65 60 /*}}}*/ 66 /*FUNCTION IntMatParam::Id{{{*/ 67 int IntMatParam::Id(void){ return -1; } 61 int IntMatParam::Id(void){ return -1; }/*{{{*/ 68 62 /*}}}*/ 69 /*FUNCTION IntMatParam::ObjectEnum{{{*/ 70 int IntMatParam::ObjectEnum(void){ 63 int IntMatParam::ObjectEnum(void){/*{{{*/ 71 64 72 65 return IntMatParamEnum; … … 74 67 } 75 68 /*}}}*/ 76 /*FUNCTION IntMatParam::copy{{{*/ 77 Object* IntMatParam::copy() { 69 Object* IntMatParam::copy() {/*{{{*/ 78 70 79 71 return new IntMatParam(this->enum_type,this->value,this->M,this->N); … … 83 75 84 76 /*IntMatParam virtual functions definitions: */ 85 /*FUNCTION IntMatParam::GetParameterValue{{{*/ 86 void IntMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){ 77 void IntMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){/*{{{*/ 87 78 int* output=NULL; 88 79 … … 96 87 } 97 88 /*}}}*/ 98 /*FUNCTION IntMatParam::SetValue{{{*/ 99 void IntMatParam::SetValue(int* intarray,int in_M,int in_N){ 89 void IntMatParam::SetValue(int* intarray,int in_M,int in_N){/*{{{*/ 100 90 101 91 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/Params/IntParam.cpp
r16655 r18064 16 16 17 17 /*IntParam constructors and destructor*/ 18 /*FUNCTION IntParam::IntParam(){{{*/ 19 IntParam::IntParam(){ 18 IntParam::IntParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{*/ 24 IntParam::IntParam(int in_enum_type,IssmInt in_value){ 22 IntParam::IntParam(int in_enum_type,IssmInt in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 28 26 } 29 27 /*}}}*/ 30 /*FUNCTION IntParam::~IntParam(){{{*/ 31 IntParam::~IntParam(){ 28 IntParam::~IntParam(){/*{{{*/ 32 29 return; 33 30 } … … 35 32 36 33 /*Object virtual functions definitions:*/ 37 /*FUNCTION IntParam::Echo {{{*/ 38 void IntParam::Echo(void){ 34 void IntParam::Echo(void){/*{{{*/ 39 35 this->DeepEcho(); 40 36 } 41 37 /*}}}*/ 42 /*FUNCTION IntParam::DeepEcho{{{*/ 43 void IntParam::DeepEcho(void){ 38 void IntParam::DeepEcho(void){/*{{{*/ 44 39 45 40 _printf_(setw(22)<<" IntParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 46 41 } 47 42 /*}}}*/ 48 /*FUNCTION IntParam::Id{{{*/ 49 int IntParam::Id(void){ return -1; } 43 int IntParam::Id(void){ return -1; }/*{{{*/ 50 44 /*}}}*/ 51 /*FUNCTION IntParam::ObjectEnum{{{*/ 52 int IntParam::ObjectEnum(void){ 45 int IntParam::ObjectEnum(void){/*{{{*/ 53 46 54 47 return IntParamEnum; … … 56 49 } 57 50 /*}}}*/ 58 /*FUNCTION IntParam::copy{{{*/ 59 Object* IntParam::copy() { 51 Object* IntParam::copy() {/*{{{*/ 60 52 61 53 return new IntParam(this->enum_type,this->value); -
issm/trunk-jpl/src/c/classes/Params/IntVecParam.cpp
r16233 r18064 16 16 17 17 /*IntVecParam constructors and destructor*/ 18 /*FUNCTION IntVecParam::IntVecParam(){{{*/ 19 IntVecParam::IntVecParam(){ 18 IntVecParam::IntVecParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION IntVecParam::IntVecParam(int enum_type,int* values,int M){{{*/ 24 IntVecParam::IntVecParam(int in_enum_type,int* in_values, int in_M){ 22 IntVecParam::IntVecParam(int in_enum_type,int* in_values, int in_M){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 34 32 } 35 33 /*}}}*/ 36 /*FUNCTION IntVecParam::IntVecParam(int enum_type,IssmDouble* values,int M){{{*/ 37 IntVecParam::IntVecParam(int in_enum_type,IssmDouble* in_values, int in_M){ 34 IntVecParam::IntVecParam(int in_enum_type,IssmDouble* in_values, int in_M){/*{{{*/ 38 35 39 36 enum_type=in_enum_type; … … 47 44 } 48 45 /*}}}*/ 49 /*FUNCTION IntVecParam::~IntVecParam(){{{*/ 50 IntVecParam::~IntVecParam(){ 46 IntVecParam::~IntVecParam(){/*{{{*/ 51 47 xDelete<int>(values); 52 48 return; … … 55 51 56 52 /*Object virtual functions definitions:*/ 57 /*FUNCTION IntVecParam::Echo {{{*/ 58 void IntVecParam::Echo(void){ 53 void IntVecParam::Echo(void){/*{{{*/ 59 54 60 55 _printf_("IntVecParam:\n"); … … 64 59 } 65 60 /*}}}*/ 66 /*FUNCTION IntVecParam::DeepEcho{{{*/ 67 void IntVecParam::DeepEcho(void){ 61 void IntVecParam::DeepEcho(void){/*{{{*/ 68 62 69 63 int i; … … 77 71 } 78 72 /*}}}*/ 79 /*FUNCTION IntVecParam::Id{{{*/ 80 int IntVecParam::Id(void){ return -1; } 73 int IntVecParam::Id(void){ return -1; }/*{{{*/ 81 74 /*}}}*/ 82 /*FUNCTION IntVecParam::ObjectEnum{{{*/ 83 int IntVecParam::ObjectEnum(void){ 75 int IntVecParam::ObjectEnum(void){/*{{{*/ 84 76 85 77 return IntVecParamEnum; … … 87 79 } 88 80 /*}}}*/ 89 /*FUNCTION IntVecParam::copy{{{*/ 90 Object* IntVecParam::copy() { 81 Object* IntVecParam::copy() {/*{{{*/ 91 82 92 83 return new IntVecParam(this->enum_type,this->values,this->M); … … 96 87 97 88 /*IntVecParam virtual functions definitions: */ 98 /*FUNCTION IntVecParam::GetParameterValue{{{*/ 99 void IntVecParam::GetParameterValue(int** pintarray,int* pM){ 89 void IntVecParam::GetParameterValue(int** pintarray,int* pM){/*{{{*/ 100 90 int* output=NULL; 101 91 … … 110 100 } 111 101 /*}}}*/ 112 /*FUNCTION IntVecParam::SetValue{{{*/ 113 void IntVecParam::SetValue(int* intarray,int in_M){ 102 void IntVecParam::SetValue(int* intarray,int in_M){/*{{{*/ 114 103 115 104 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/Params/MatrixParam.cpp
r16233 r18064 16 16 17 17 /*MatrixParam constructors and destructor*/ 18 /*FUNCTION MatrixParam::MatrixParam(){{{*/ 19 MatrixParam::MatrixParam(){ 18 MatrixParam::MatrixParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION MatrixParam::MatrixParam(int enum_type,Matrix<IssmDouble>* value){{{*/ 24 MatrixParam::MatrixParam(int in_enum_type,Matrix<IssmDouble>* in_value){ 22 MatrixParam::MatrixParam(int in_enum_type,Matrix<IssmDouble>* in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 32 30 } 33 31 /*}}}*/ 34 /*FUNCTION MatrixParam::~MatrixParam(){{{*/ 35 MatrixParam::~MatrixParam(){ 32 MatrixParam::~MatrixParam(){/*{{{*/ 36 33 delete value; 37 34 } … … 39 36 40 37 /*Object virtual functions definitions:*/ 41 /*FUNCTION MatrixParam::Echo {{{*/ 42 void MatrixParam::Echo(void){ 38 void MatrixParam::Echo(void){/*{{{*/ 43 39 44 40 _printf_("MatrixParam:\n"); … … 47 43 } 48 44 /*}}}*/ 49 /*FUNCTION MatrixParam::DeepEcho{{{*/ 50 void MatrixParam::DeepEcho(void){ 45 void MatrixParam::DeepEcho(void){/*{{{*/ 51 46 52 47 _printf_("MatrixParam:\n"); … … 55 50 } 56 51 /*}}}*/ 57 /*FUNCTION MatrixParam::Id{{{*/ 58 int MatrixParam::Id(void){ return -1; } 52 int MatrixParam::Id(void){ return -1; }/*{{{*/ 59 53 /*}}}*/ 60 /*FUNCTION MatrixParam::ObjectEnum{{{*/ 61 int MatrixParam::ObjectEnum(void){ 54 int MatrixParam::ObjectEnum(void){/*{{{*/ 62 55 63 56 return MatrixParamEnum; … … 65 58 } 66 59 /*}}}*/ 67 /*FUNCTION MatrixParam::copy{{{*/ 68 Object* MatrixParam::copy() { 60 Object* MatrixParam::copy() {/*{{{*/ 69 61 70 62 return new MatrixParam(this->enum_type,this->value); … … 74 66 75 67 /*MatrixParam virtual functions definitions: */ 76 /*FUNCTION MatrixParam::GetParameterValue{{{*/ 77 void MatrixParam::GetParameterValue(Matrix<IssmDouble>** poutput){ 68 void MatrixParam::GetParameterValue(Matrix<IssmDouble>** poutput){/*{{{*/ 78 69 Matrix<IssmDouble>* output=NULL; 79 70 … … 84 75 } 85 76 /*}}}*/ 86 /*FUNCTION MatrixParam::SetValue{{{*/ 87 void MatrixParam::SetValue(Matrix<IssmDouble>* matrix){ 77 void MatrixParam::SetValue(Matrix<IssmDouble>* matrix){/*{{{*/ 88 78 89 79 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
r16792 r18064 40 40 41 41 /*Object constructors and destructor*/ 42 /*FUNCTION Parameters::Parameters(){{{*/ 43 Parameters::Parameters(){ 42 Parameters::Parameters(){/*{{{*/ 44 43 enum_type=ParametersEnum; 45 44 return; 46 45 } 47 46 /*}}}*/ 48 /*FUNCTION Parameters::~Parameters(){{{*/ 49 Parameters::~Parameters(){ 47 Parameters::~Parameters(){/*{{{*/ 50 48 return; 51 49 } … … 53 51 54 52 /*Object management*/ 55 /*FUNCTION Parameters::Exist{{{*/ 56 bool Parameters::Exist(int enum_type){ 53 bool Parameters::Exist(int enum_type){/*{{{*/ 57 54 58 55 vector<Object*>::iterator object; … … 66 63 } 67 64 /*}}}*/ 68 /*FUNCTION Parameters::FindParam(bool* pbool,int enum_type){{{*/ 69 void Parameters::FindParam(bool* pbool,int enum_type){ _assert_(this); 65 void Parameters::FindParam(bool* pbool,int enum_type){ _assert_(this);/*{{{*/ 70 66 71 67 vector<Object*>::iterator object; … … 83 79 } 84 80 /*}}}*/ 85 /*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{*/ 86 void Parameters::FindParam(int* pinteger,int enum_type){ _assert_(this); 81 void Parameters::FindParam(int* pinteger,int enum_type){ _assert_(this);/*{{{*/ 87 82 88 83 vector<Object*>::iterator object; … … 100 95 } 101 96 /*}}}*/ 102 /*FUNCTION Parameters::FindParam(IssmDouble* pscalar, int enum_type){{{*/ 103 void Parameters::FindParam(IssmDouble* pscalar, int enum_type){ _assert_(this); 97 void Parameters::FindParam(IssmDouble* pscalar, int enum_type){ _assert_(this);/*{{{*/ 104 98 105 99 vector<Object*>::iterator object; … … 117 111 } 118 112 /*}}}*/ 119 /*FUNCTION Parameters::FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time){{{*/ 120 void Parameters::FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time){ _assert_(this); 113 void Parameters::FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time){ _assert_(this);/*{{{*/ 121 114 122 115 vector<Object*>::iterator object; … … 134 127 } 135 128 /*}}}*/ 136 /*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{*/ 137 void Parameters::FindParam(char** pstring,int enum_type){ _assert_(this); 129 void Parameters::FindParam(char** pstring,int enum_type){ _assert_(this);/*{{{*/ 138 130 139 131 vector<Object*>::iterator object; … … 152 144 } 153 145 /*}}}*/ 154 /*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{*/ 155 void Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){ _assert_(this); 146 void Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){ _assert_(this);/*{{{*/ 156 147 157 148 vector<Object*>::iterator object; … … 170 161 } 171 162 /*}}}*/ 172 /*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int enum_type){{{*/ 173 void Parameters::FindParam(int** pintarray,int* pM, int enum_type){ _assert_(this); 163 void Parameters::FindParam(int** pintarray,int* pM, int enum_type){ _assert_(this);/*{{{*/ 174 164 175 165 vector<Object*>::iterator object; … … 188 178 } 189 179 /*}}}*/ 190 /*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int* pN,int enum_type){{{*/ 191 void Parameters::FindParam(int** pintarray,int* pM,int *pN,int enum_type){ _assert_(this); 180 void Parameters::FindParam(int** pintarray,int* pM,int *pN,int enum_type){ _assert_(this);/*{{{*/ 192 181 193 182 vector<Object*>::iterator object; … … 206 195 } 207 196 /*}}}*/ 208 /*FUNCTION Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type){{{*/ 209 void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int enum_type){ _assert_(this); 197 void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int enum_type){ _assert_(this);/*{{{*/ 210 198 211 199 vector<Object*>::iterator object; … … 224 212 } 225 213 /*}}}*/ 226 /*FUNCTION Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int* pN,int enum_type){{{*/ 227 void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int* pN,int enum_type){ _assert_(this); 214 void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int* pN,int enum_type){ _assert_(this);/*{{{*/ 228 215 229 216 vector<Object*>::iterator object; … … 242 229 } 243 230 /*}}}*/ 244 /*FUNCTION Parameters::FindParam(IssmDouble*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{*/ 245 void Parameters::FindParam(IssmDouble*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this); 231 void Parameters::FindParam(IssmDouble*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this);/*{{{*/ 246 232 247 233 vector<Object*>::iterator object; … … 259 245 } 260 246 /*}}}*/ 261 /*FUNCTION Parameters::FindParam(Vector<IssmDouble>** pvec,int enum_type){{{*/ 262 void Parameters::FindParam(Vector<IssmDouble>** pvec,int enum_type){ _assert_(this); 247 void Parameters::FindParam(Vector<IssmDouble>** pvec,int enum_type){ _assert_(this);/*{{{*/ 263 248 264 249 vector<Object*>::iterator object; … … 277 262 } 278 263 /*}}}*/ 279 /*FUNCTION Parameters::FindParam(Matrix<IssmDouble>** pmat,int enum_type){{{*/ 280 void Parameters::FindParam(Matrix<IssmDouble>** pmat,int enum_type){ _assert_(this); 264 void Parameters::FindParam(Matrix<IssmDouble>** pmat,int enum_type){ _assert_(this);/*{{{*/ 281 265 282 266 vector<Object*>::iterator object; … … 295 279 } 296 280 /*}}}*/ 297 /*FUNCTION Parameters::FindParam(FILE** pfid,int enum_type){{{*/ 298 void Parameters::FindParam(FILE** pfid,int enum_type){ _assert_(this); 281 void Parameters::FindParam(FILE** pfid,int enum_type){ _assert_(this);/*{{{*/ 299 282 300 283 vector<Object*>::iterator object; … … 312 295 } 313 296 /*}}}*/ 314 /*FUNCTION Parameters::FindParam(DataSet** pdataset,int enum_type){{{*/ 315 void Parameters::FindParam(DataSet** pdataset,int enum_type){ 297 void Parameters::FindParam(DataSet** pdataset,int enum_type){ /*{{{*/ 316 298 _assert_(this); 317 299 … … 331 313 /*}}}*/ 332 314 333 /*FUNCTION Parameters::SetParam(bool boolean,int enum_type);{{{*/ 334 void Parameters::SetParam(bool boolean,int enum_type){ 315 void Parameters::SetParam(bool boolean,int enum_type){/*{{{*/ 335 316 336 317 Param* param=NULL; … … 343 324 } 344 325 /*}}}*/ 345 /*FUNCTION Parameters::SetParam(int integer,int enum_type);{{{*/ 346 void Parameters::SetParam(int integer,int enum_type){ 326 void Parameters::SetParam(int integer,int enum_type){/*{{{*/ 347 327 348 328 Param* param=NULL; … … 355 335 } 356 336 /*}}}*/ 357 /*FUNCTION Parameters::SetParam(IssmDouble scalar,int enum_type);{{{*/ 358 void Parameters::SetParam(IssmDouble scalar,int enum_type){ 337 void Parameters::SetParam(IssmDouble scalar,int enum_type){/*{{{*/ 359 338 360 339 Param* param=NULL; … … 367 346 } 368 347 /*}}}*/ 369 /*FUNCTION Parameters::SetParam(char* string,int enum_type);{{{*/ 370 void Parameters::SetParam(char* string,int enum_type){ 348 void Parameters::SetParam(char* string,int enum_type){/*{{{*/ 371 349 372 350 Param* param=NULL; … … 379 357 } 380 358 /*}}}*/ 381 /*FUNCTION Parameters::SetParam(char** stringarray,int M, int enum_type);{{{*/ 382 void Parameters::SetParam(char** stringarray,int M, int enum_type){ 359 void Parameters::SetParam(char** stringarray,int M, int enum_type){/*{{{*/ 383 360 384 361 Param* param=NULL; … … 391 368 } 392 369 /*}}}*/ 393 /*FUNCTION Parameters::SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);{{{*/ 394 void Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int enum_type){ 370 void Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int enum_type){/*{{{*/ 395 371 396 372 Param* param=NULL; … … 403 379 } 404 380 /*}}}*/ 405 /*FUNCTION Parameters::SetParam(IssmDouble* IssmDoublearray,int M,int N, int enum_type);{{{*/ 406 void Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int N, int enum_type){ 381 void Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int N, int enum_type){/*{{{*/ 407 382 408 383 Param* param=NULL; … … 415 390 } 416 391 /*}}}*/ 417 /*FUNCTION Parameters::SetParam(int* intarray,int M,int enum_type);{{{*/ 418 void Parameters::SetParam(int* intarray,int M, int enum_type){ 392 void Parameters::SetParam(int* intarray,int M, int enum_type){/*{{{*/ 419 393 420 394 Param* param=NULL; … … 427 401 } 428 402 /*}}}*/ 429 /*FUNCTION Parameters::SetParam(int* intarray,int M,int N, int enum_type);{{{*/ 430 void Parameters::SetParam(int* intarray,int M, int N, int enum_type){ 403 void Parameters::SetParam(int* intarray,int M, int N, int enum_type){/*{{{*/ 431 404 432 405 Param* param=NULL; … … 439 412 } 440 413 /*}}}*/ 441 /*FUNCTION Parameters::SetParam(Vector<IssmDouble>* vector,int enum_type);{{{*/ 442 void Parameters::SetParam(Vector<IssmDouble>* vector,int enum_type){ 414 void Parameters::SetParam(Vector<IssmDouble>* vector,int enum_type){/*{{{*/ 443 415 444 416 Param* param=NULL; … … 451 423 } 452 424 /*}}}*/ 453 /*FUNCTION Parameters::SetParam(Matrix<IssmDouble>* matrix,int enum_type);{{{*/ 454 void Parameters::SetParam(Matrix<IssmDouble>* matrix,int enum_type){ 425 void Parameters::SetParam(Matrix<IssmDouble>* matrix,int enum_type){/*{{{*/ 455 426 456 427 Param* param=NULL; … … 463 434 } 464 435 /*}}}*/ 465 /*FUNCTION Parameters::SetParam(FILE* fid,int enum_type);{{{*/ 466 void Parameters::SetParam(FILE* fid,int enum_type){ 436 void Parameters::SetParam(FILE* fid,int enum_type){/*{{{*/ 467 437 468 438 Param* param=NULL; … … 475 445 } 476 446 /*}}}*/ 477 /*FUNCTION Parameters::SetParam(DataSet* dataset, int enum_type);{{{*/ 478 void Parameters::SetParam(DataSet* dataset,int enum_type){ 447 void Parameters::SetParam(DataSet* dataset,int enum_type){/*{{{*/ 479 448 480 449 Param* param=NULL; … … 488 457 /*}}}*/ 489 458 490 /*FUNCTION Parameters::FindParamObject{{{*/ 491 Object* Parameters::FindParamObject(int enum_type){ 459 Object* Parameters::FindParamObject(int enum_type){/*{{{*/ 492 460 493 461 vector<Object*>::iterator object; -
issm/trunk-jpl/src/c/classes/Params/StringArrayParam.cpp
r16655 r18064 16 16 17 17 /*StringArrayParam constructors and destructor*/ 18 /*FUNCTION StringArrayParam::StringArrayParam(){{{*/ 19 StringArrayParam::StringArrayParam(){ 18 StringArrayParam::StringArrayParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION StringArrayParam::StringArrayParam(int enum_type,char** in_values,int in_numstrings){{{*/ 24 StringArrayParam::StringArrayParam(int in_enum_type,char** in_values, int in_numstrings){ 22 StringArrayParam::StringArrayParam(int in_enum_type,char** in_values, int in_numstrings){/*{{{*/ 25 23 26 24 int i; … … 44 42 } 45 43 /*}}}*/ 46 /*FUNCTION StringArrayParam::~StringArrayParam(){{{*/ 47 StringArrayParam::~StringArrayParam(){ 44 StringArrayParam::~StringArrayParam(){/*{{{*/ 48 45 49 46 int i; … … 59 56 60 57 /*Object virtual functions definitions:*/ 61 /*FUNCTION StringArrayParam::Echo {{{*/ 62 void StringArrayParam::Echo(void){ 58 void StringArrayParam::Echo(void){/*{{{*/ 63 59 this->DeepEcho(); 64 60 } 65 61 /*}}}*/ 66 /*FUNCTION StringArrayParam::DeepEcho{{{*/ 67 void StringArrayParam::DeepEcho(void){ 62 void StringArrayParam::DeepEcho(void){/*{{{*/ 68 63 69 64 _printf_(setw(22)<<" StringArrayParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" {"); … … 72 67 } 73 68 /*}}}*/ 74 /*FUNCTION StringArrayParam::Id{{{*/ 75 int StringArrayParam::Id(void){ return -1; } 69 int StringArrayParam::Id(void){ return -1; }/*{{{*/ 76 70 /*}}}*/ 77 /*FUNCTION StringArrayParam::ObjectEnum{{{*/ 78 int StringArrayParam::ObjectEnum(void){ 71 int StringArrayParam::ObjectEnum(void){/*{{{*/ 79 72 80 73 return StringArrayParamEnum; … … 82 75 } 83 76 /*}}}*/ 84 /*FUNCTION StringArrayParam::copy{{{*/ 85 Object* StringArrayParam::copy() { 77 Object* StringArrayParam::copy() {/*{{{*/ 86 78 87 79 return new StringArrayParam(this->enum_type,this->value,this->numstrings); … … 91 83 92 84 /*StringArrayParam virtual functions definitions: */ 93 /*FUNCTION StringArrayParam::GetParameterValue{{{*/ 94 void StringArrayParam::GetParameterValue(char*** pstringarray,int* pM){ 85 void StringArrayParam::GetParameterValue(char*** pstringarray,int* pM){/*{{{*/ 95 86 96 87 int i; … … 122 113 } 123 114 /*}}}*/ 124 /*FUNCTION StringArrayParam::SetValue{{{*/ 125 void StringArrayParam::SetValue(char** stringarray,int M){ 115 void StringArrayParam::SetValue(char** stringarray,int M){/*{{{*/ 126 116 127 117 int i; -
issm/trunk-jpl/src/c/classes/Params/StringParam.cpp
r16655 r18064 16 16 17 17 /*StringParam constructors and destructor*/ 18 /*FUNCTION StringParam::StringParam(){{{*/ 19 StringParam::StringParam(){ 18 StringParam::StringParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION StringParam::StringParam(int enum_type,IssmString value){{{*/ 24 StringParam::StringParam(int in_enum_type,char* in_value){ 22 StringParam::StringParam(int in_enum_type,char* in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 30 28 } 31 29 /*}}}*/ 32 /*FUNCTION StringParam::~StringParam(){{{*/ 33 StringParam::~StringParam(){ 30 StringParam::~StringParam(){/*{{{*/ 34 31 xDelete<char>(value); 35 32 } … … 37 34 38 35 /*Object virtual functions definitions:*/ 39 /*FUNCTION StringParam::Echo {{{*/ 40 void StringParam::Echo(void){ 36 void StringParam::Echo(void){/*{{{*/ 41 37 this->DeepEcho(); 42 38 } 43 39 /*}}}*/ 44 /*FUNCTION StringParam::DeepEcho{{{*/ 45 void StringParam::DeepEcho(void){ 40 void StringParam::DeepEcho(void){/*{{{*/ 46 41 _printf_(setw(22)<<" StringParam "<<setw(35)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 47 42 } 48 43 /*}}}*/ 49 /*FUNCTION StringParam::Id{{{*/ 50 int StringParam::Id(void){ return -1; } 44 int StringParam::Id(void){ return -1; }/*{{{*/ 51 45 /*}}}*/ 52 /*FUNCTION StringParam::ObjectEnum{{{*/ 53 int StringParam::ObjectEnum(void){ 46 int StringParam::ObjectEnum(void){/*{{{*/ 54 47 55 48 return StringParamEnum; … … 57 50 } 58 51 /*}}}*/ 59 /*FUNCTION StringParam::copy{{{*/ 60 Object* StringParam::copy() { 52 Object* StringParam::copy() {/*{{{*/ 61 53 62 54 return new StringParam(this->enum_type,this->value); … … 66 58 67 59 /*StringParam virtual functions definitions: */ 68 /*FUNCTION StringParam::GetParameterValue{{{*/ 69 void StringParam::GetParameterValue(char** pstring){ 60 void StringParam::GetParameterValue(char** pstring){/*{{{*/ 70 61 71 62 char* outstring=NULL; … … 81 72 } 82 73 /*}}}*/ 83 /*FUNCTION StringParam::SetValue{{{*/ 84 void StringParam::SetValue(char* string){ 74 void StringParam::SetValue(char* string){/*{{{*/ 85 75 86 76 int stringsize; -
issm/trunk-jpl/src/c/classes/Params/TransientParam.cpp
r16233 r18064 16 16 17 17 /*TransientParam constructors and destructor*/ 18 /*FUNCTION TransientParam::TransientParam(){{{*/ 19 TransientParam::TransientParam(){ 18 TransientParam::TransientParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION TransientParam::TransientParam(int enum_type,IssmDoubleMat value){{{*/ 24 TransientParam::TransientParam(int in_enum_type,IssmDouble* in_values,IssmDouble* in_time,int in_N){ 22 TransientParam::TransientParam(int in_enum_type,IssmDouble* in_values,IssmDouble* in_time,int in_N){/*{{{*/ 25 23 26 24 _assert_(in_values && in_time); … … 36 34 } 37 35 /*}}}*/ 38 /*FUNCTION TransientParam::~TransientParam(){{{*/ 39 TransientParam::~TransientParam(){ 36 TransientParam::~TransientParam(){/*{{{*/ 40 37 xDelete<IssmDouble>(values); 41 38 xDelete<IssmDouble>(timesteps); … … 44 41 45 42 /*Object virtual functions definitions:*/ 46 /*FUNCTION TransientParam::Echo {{{*/ 47 void TransientParam::Echo(void){ 43 void TransientParam::Echo(void){/*{{{*/ 48 44 49 45 _printf_("TransientParam:\n"); … … 53 49 } 54 50 /*}}}*/ 55 /*FUNCTION TransientParam::DeepEcho{{{*/ 56 void TransientParam::DeepEcho(void){ 51 void TransientParam::DeepEcho(void){/*{{{*/ 57 52 58 53 _printf_("TransientParam:\n"); … … 64 59 } 65 60 /*}}}*/ 66 /*FUNCTION TransientParam::Id{{{*/ 67 int TransientParam::Id(void){ return -1; } 61 int TransientParam::Id(void){ return -1; }/*{{{*/ 68 62 /*}}}*/ 69 /*FUNCTION TransientParam::ObjectEnum{{{*/ 70 int TransientParam::ObjectEnum(void){ 63 int TransientParam::ObjectEnum(void){/*{{{*/ 71 64 72 65 return TransientParamEnum; … … 74 67 } 75 68 /*}}}*/ 76 /*FUNCTION TransientParam::copy{{{*/ 77 Object* TransientParam::copy() { 69 Object* TransientParam::copy() {/*{{{*/ 78 70 79 71 return new TransientParam(this->enum_type,this->values,this->timesteps,this->N); … … 83 75 84 76 /*TransientParam virtual functions definitions: */ 85 /*FUNCTION TransientParam::GetParameterValue(IssmDouble* pdouble,IssmDouble time){{{*/ 86 void TransientParam::GetParameterValue(IssmDouble* pdouble,IssmDouble time){ 77 void TransientParam::GetParameterValue(IssmDouble* pdouble,IssmDouble time){/*{{{*/ 87 78 88 79 IssmDouble output; -
issm/trunk-jpl/src/c/classes/Params/VectorParam.cpp
r16233 r18064 16 16 17 17 /*VectorParam constructors and destructor*/ 18 /*FUNCTION VectorParam::VectorParam(){{{*/ 19 VectorParam::VectorParam(){ 18 VectorParam::VectorParam(){/*{{{*/ 20 19 return; 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION VectorParam::VectorParam(int enum_type,IssmVector value){{{*/ 24 VectorParam::VectorParam(int in_enum_type,Vector<IssmDouble>* in_value){ 22 VectorParam::VectorParam(int in_enum_type,Vector<IssmDouble>* in_value){/*{{{*/ 25 23 26 24 enum_type=in_enum_type; … … 34 32 } 35 33 /*}}}*/ 36 /*FUNCTION VectorParam::~VectorParam(){{{*/ 37 VectorParam::~VectorParam(){ 34 VectorParam::~VectorParam(){/*{{{*/ 38 35 delete value; 39 36 } … … 41 38 42 39 /*Object virtual functions definitions:*/ 43 /*FUNCTION VectorParam::Echo {{{*/ 44 void VectorParam::Echo(void){ 40 void VectorParam::Echo(void){/*{{{*/ 45 41 46 42 _printf_("VectorParam:\n"); … … 49 45 } 50 46 /*}}}*/ 51 /*FUNCTION VectorParam::DeepEcho{{{*/ 52 void VectorParam::DeepEcho(void){ 47 void VectorParam::DeepEcho(void){/*{{{*/ 53 48 54 49 _printf_("VectorParam:\n"); … … 57 52 } 58 53 /*}}}*/ 59 /*FUNCTION VectorParam::Id{{{*/ 60 int VectorParam::Id(void){ return -1; } 54 int VectorParam::Id(void){ return -1; }/*{{{*/ 61 55 /*}}}*/ 62 /*FUNCTION VectorParam::ObjectEnum{{{*/ 63 int VectorParam::ObjectEnum(void){ 56 int VectorParam::ObjectEnum(void){/*{{{*/ 64 57 65 58 return VectorParamEnum; … … 67 60 } 68 61 /*}}}*/ 69 /*FUNCTION VectorParam::copy{{{*/ 70 Object* VectorParam::copy() { 62 Object* VectorParam::copy() {/*{{{*/ 71 63 72 64 return new VectorParam(this->enum_type,this->value); … … 76 68 77 69 /*VectorParam virtual functions definitions: */ 78 /*FUNCTION VectorParam::GetParameterValue{{{*/ 79 void VectorParam::GetParameterValue(Vector<IssmDouble>** poutput){ 70 void VectorParam::GetParameterValue(Vector<IssmDouble>** poutput){/*{{{*/ 80 71 Vector<IssmDouble>* output=NULL; 81 72 … … 87 78 } 88 79 /*}}}*/ 89 /*FUNCTION VectorParam::SetValue{{{*/ 90 void VectorParam::SetValue(Vector<IssmDouble>* vector){ 80 void VectorParam::SetValue(Vector<IssmDouble>* vector){/*{{{*/ 91 81 92 82 /*avoid leak: */ -
issm/trunk-jpl/src/c/classes/gauss/GaussPenta.cpp
r17504 r18064 13 13 14 14 /*GaussPenta constructors and destructors:*/ 15 /*FUNCTION GaussPenta::GaussPenta() {{{*/ 16 GaussPenta::GaussPenta(){ 15 GaussPenta::GaussPenta(){/*{{{*/ 17 16 18 17 numgauss=-1; … … 31 30 } 32 31 /*}}}*/ 33 /*FUNCTION GaussPenta::GaussPenta(int order_horiz,int order_vert) {{{*/ 34 GaussPenta::GaussPenta(int order_horiz,int order_vert){ 32 GaussPenta::GaussPenta(int order_horiz,int order_vert){/*{{{*/ 35 33 36 34 /*Intermediaries*/ … … 85 83 } 86 84 /*}}}*/ 87 /*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int order){{{*/ 88 GaussPenta::GaussPenta(int index1, int index2,int order){ 85 GaussPenta::GaussPenta(int index1, int index2,int order){/*{{{*/ 89 86 90 87 /*Intermediaties*/ … … 142 139 } 143 140 /*}}}*/ 144 /*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int order){{{*/ 145 GaussPenta::GaussPenta(int index1, int index2, int index3, int order){ 141 GaussPenta::GaussPenta(int index1, int index2, int index3, int order){/*{{{*/ 146 142 147 143 /*Basal Tria*/ … … 171 167 } 172 168 /*}}}*/ 173 /*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){{{*/ 174 GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){ 169 GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){/*{{{*/ 175 170 176 171 /*Intermediaties*/ … … 238 233 } 239 234 /*}}}*/ 240 /*FUNCTION GaussPenta::GaussPenta(int index,double r1,double r2,int order) {{{*/ 241 GaussPenta::GaussPenta(int index,IssmDouble r1,IssmDouble r2,bool mainlyfloating,int order){ 235 GaussPenta::GaussPenta(int index,IssmDouble r1,IssmDouble r2,bool mainlyfloating,int order){/*{{{*/ 242 236 243 237 /* … … 400 394 } 401 395 /*}}}*/ 402 /*FUNCTION GaussPenta::GaussPenta(IssmDouble area_coordinates[4][3],int order_horiz,int order_vert){{{*/ 403 GaussPenta::GaussPenta(IssmDouble area_coordinates[4][3],int order_horiz,int order_vert){ 396 GaussPenta::GaussPenta(IssmDouble area_coordinates[4][3],int order_horiz,int order_vert){/*{{{*/ 404 397 405 398 /*Intermediaties*/ … … 439 432 } 440 433 /*}}}*/ 441 /*FUNCTION GaussPenta::~GaussPenta(){{{*/ 442 GaussPenta::~GaussPenta(){ 434 GaussPenta::~GaussPenta(){/*{{{*/ 443 435 xDelete<IssmDouble>(weights); 444 436 xDelete<IssmDouble>(coords1); … … 450 442 451 443 /*Methods*/ 452 /*FUNCTION GaussPenta::Echo{{{*/ 453 void GaussPenta::Echo(void){ 444 void GaussPenta::Echo(void){/*{{{*/ 454 445 455 446 _printf_("GaussPenta:\n"); … … 495 486 } 496 487 /*}}}*/ 497 /*FUNCTION GaussPenta::Enum{{{*/ 498 int GaussPenta::Enum(void){ 488 int GaussPenta::Enum(void){/*{{{*/ 499 489 return GaussPentaEnum; 500 490 } 501 491 /*}}}*/ 502 /*FUNCTION GaussPenta::GaussPoint{{{*/ 503 void GaussPenta::GaussPoint(int ig){ 492 void GaussPenta::GaussPoint(int ig){/*{{{*/ 504 493 505 494 /*Check input in debugging mode*/ … … 515 504 } 516 505 /*}}}*/ 517 /*FUNCTION GaussPenta::GaussVertex{{{*/ 518 void GaussPenta::GaussVertex(int iv){ 506 void GaussPenta::GaussVertex(int iv){/*{{{*/ 519 507 520 508 /*in debugging mode: check that the default constructor has been called*/ … … 535 523 } 536 524 /*}}}*/ 537 /*FUNCTION GaussPenta::GaussFaceTria{{{*/ 538 void GaussPenta::GaussFaceTria(int index1, int index2, int index3, int order){ 525 void GaussPenta::GaussFaceTria(int index1, int index2, int index3, int order){/*{{{*/ 539 526 540 527 /*in debugging mode: check that the default constructor has been called*/ … … 553 540 } 554 541 /*}}}*/ 555 /*FUNCTION GaussPenta::GaussNode{{{*/ 556 void GaussPenta::GaussNode(int finiteelement,int iv){ 542 void GaussPenta::GaussNode(int finiteelement,int iv){/*{{{*/ 557 543 558 544 /*in debugging mode: check that the default constructor has been called*/ … … 705 691 } 706 692 /*}}}*/ 707 /*FUNCTION GaussPenta::begin{{{*/ 708 int GaussPenta::begin(void){ 693 int GaussPenta::begin(void){/*{{{*/ 709 694 710 695 /*Check that this has been initialized*/ … … 720 705 } 721 706 /*}}}*/ 722 /*FUNCTION GaussPenta::end{{{*/ 723 int GaussPenta::end(void){ 707 int GaussPenta::end(void){/*{{{*/ 724 708 725 709 /*Check that this has been initialized*/ … … 735 719 } 736 720 /*}}}*/ 737 /*FUNCTION GaussPenta::SynchronizeGaussBase{{{*/ 738 void GaussPenta::SynchronizeGaussBase(Gauss* gauss){ 721 void GaussPenta::SynchronizeGaussBase(Gauss* gauss){/*{{{*/ 739 722 740 723 _assert_(gauss->Enum()==GaussTriaEnum); -
issm/trunk-jpl/src/c/classes/gauss/GaussSeg.cpp
r17315 r18064 12 12 13 13 /*GaussSeg constructors and destructors:*/ 14 /*FUNCTION GaussSeg::GaussSeg() {{{*/ 15 GaussSeg::GaussSeg(){ 14 GaussSeg::GaussSeg(){/*{{{*/ 16 15 17 16 numgauss=-1; … … 24 23 } 25 24 /*}}}*/ 26 /*FUNCTION GaussSeg::GaussSeg(int order) {{{*/ 27 GaussSeg::GaussSeg(int order){ 25 GaussSeg::GaussSeg(int order){/*{{{*/ 28 26 29 27 IssmPDouble* pcoords1=NULL; … … 52 50 } 53 51 /*}}}*/ 54 /*FUNCTION GaussSeg::GaussSeg(IssmDouble position) {{{*/ 55 GaussSeg::GaussSeg(IssmDouble position){ 52 GaussSeg::GaussSeg(IssmDouble position){/*{{{*/ 56 53 57 54 /*Get gauss points*/ … … 70 67 } 71 68 /*}}}*/ 72 /*FUNCTION GaussSeg::~GaussSeg(){{{*/ 73 GaussSeg::~GaussSeg(){ 69 GaussSeg::~GaussSeg(){/*{{{*/ 74 70 xDelete<IssmDouble>(weights); 75 71 xDelete<IssmDouble>(coords1); … … 78 74 79 75 /*Methods*/ 80 /*FUNCTION GaussSeg::Echo{{{*/ 81 void GaussSeg::Echo(void){ 76 void GaussSeg::Echo(void){/*{{{*/ 82 77 83 78 _printf_("GaussSeg:\n"); … … 100 95 } 101 96 /*}}}*/ 102 /*FUNCTION GaussSeg::Enum{{{*/ 103 int GaussSeg::Enum(void){ 97 int GaussSeg::Enum(void){/*{{{*/ 104 98 return GaussSegEnum; 105 99 } 106 100 /*}}}*/ 107 /*FUNCTION GaussSeg::GaussPoint{{{*/ 108 void GaussSeg::GaussPoint(int ig){ 101 void GaussSeg::GaussPoint(int ig){/*{{{*/ 109 102 110 103 /*Check input in debugging mode*/ … … 116 109 } 117 110 /*}}}*/ 118 /*FUNCTION GaussSeg::GaussVertex{{{*/ 119 void GaussSeg::GaussVertex(int iv){ 111 void GaussSeg::GaussVertex(int iv){/*{{{*/ 120 112 121 113 /*in debugging mode: check that the default constructor has been called*/ … … 130 122 } 131 123 /*}}}*/ 132 /*FUNCTION GaussSeg::GaussNode{{{*/ 133 void GaussSeg::GaussNode(int finiteelement,int iv){ 124 void GaussSeg::GaussNode(int finiteelement,int iv){/*{{{*/ 134 125 135 126 /*in debugging mode: check that the default constructor has been called*/ … … 150 141 } 151 142 /*}}}*/ 152 /*FUNCTION GaussSeg::begin{{{*/ 153 int GaussSeg::begin(void){ 143 int GaussSeg::begin(void){/*{{{*/ 154 144 155 145 /*Check that this has been initialized*/ … … 162 152 } 163 153 /*}}}*/ 164 /*FUNCTION GaussSeg::end{{{*/ 165 int GaussSeg::end(void){ 154 int GaussSeg::end(void){/*{{{*/ 166 155 167 156 /*Check that this has been initialized*/ … … 174 163 } 175 164 /*}}}*/ 176 /*FUNCTION GaussSeg::SynchronizeGaussBase{{{*/ 177 void GaussSeg::SynchronizeGaussBase(Gauss* gauss){ 165 void GaussSeg::SynchronizeGaussBase(Gauss* gauss){/*{{{*/ 178 166 179 167 _error_("not supported"); -
issm/trunk-jpl/src/c/classes/gauss/GaussTetra.cpp
r17866 r18064 13 13 14 14 /*GaussTetra constructors and destructors:*/ 15 /*FUNCTION GaussTetra::GaussTetra() {{{*/ 16 GaussTetra::GaussTetra(){ 15 GaussTetra::GaussTetra(){/*{{{*/ 17 16 18 17 numgauss=-1; … … 31 30 } 32 31 /*}}}*/ 33 /*FUNCTION GaussTetra::GaussTetra(int order) {{{*/ 34 GaussTetra::GaussTetra(int order){ 32 GaussTetra::GaussTetra(int order){/*{{{*/ 35 33 36 34 /*Get gauss points*/ … … 58 56 } 59 57 /*}}}*/ 60 /*FUNCTION GaussTetra::GaussTetra(int index1,int index2,int index3,int order) {{{*/ 61 GaussTetra::GaussTetra(int index1,int index2,int index3,int order){ 58 GaussTetra::GaussTetra(int index1,int index2,int index3,int order){/*{{{*/ 62 59 63 60 /*Basal Tria*/ … … 87 84 } 88 85 /*}}}*/ 89 /*FUNCTION GaussTetra::~GaussTetra(){{{*/ 90 GaussTetra::~GaussTetra(){ 86 GaussTetra::~GaussTetra(){/*{{{*/ 91 87 xDelete<IssmDouble>(weights); 92 88 xDelete<IssmDouble>(coords1); … … 98 94 99 95 /*Methods*/ 100 /*FUNCTION GaussTetra::Echo{{{*/ 101 void GaussTetra::Echo(void){ 96 void GaussTetra::Echo(void){/*{{{*/ 102 97 103 98 _printf_("GaussTetra:\n"); … … 143 138 } 144 139 /*}}}*/ 145 /*FUNCTION GaussTetra::Enum{{{*/ 146 int GaussTetra::Enum(void){ 140 int GaussTetra::Enum(void){/*{{{*/ 147 141 return GaussTetraEnum; 148 142 } 149 143 /*}}}*/ 150 /*FUNCTION GaussTetra::GaussPoint{{{*/ 151 void GaussTetra::GaussPoint(int ig){ 144 void GaussTetra::GaussPoint(int ig){/*{{{*/ 152 145 153 146 /*Check input in debugging mode*/ … … 163 156 } 164 157 /*}}}*/ 165 /*FUNCTION GaussTetra::GaussVertex{{{*/ 166 void GaussTetra::GaussVertex(int iv){ 158 void GaussTetra::GaussVertex(int iv){/*{{{*/ 167 159 168 160 /*in debugging mode: check that the default constructor has been called*/ … … 181 173 } 182 174 /*}}}*/ 183 /*FUNCTION GaussTetra::GaussNode{{{*/ 184 void GaussTetra::GaussNode(int finiteelement,int iv){ 175 void GaussTetra::GaussNode(int finiteelement,int iv){/*{{{*/ 185 176 186 177 /*in debugging mode: check that the default constructor has been called*/ … … 229 220 } 230 221 /*}}}*/ 231 /*FUNCTION GaussTetra::begin{{{*/ 232 int GaussTetra::begin(void){ 222 int GaussTetra::begin(void){/*{{{*/ 233 223 234 224 /*Check that this has been initialized*/ … … 244 234 } 245 235 /*}}}*/ 246 /*FUNCTION GaussTetra::end{{{*/ 247 int GaussTetra::end(void){ 236 int GaussTetra::end(void){/*{{{*/ 248 237 249 238 /*Check that this has been initialized*/ … … 259 248 } 260 249 /*}}}*/ 261 /*FUNCTION GaussTetra::SynchronizeGaussBase{{{*/ 262 void GaussTetra::SynchronizeGaussBase(Gauss* gauss){ 250 void GaussTetra::SynchronizeGaussBase(Gauss* gauss){/*{{{*/ 263 251 264 252 _error_("not supported"); -
issm/trunk-jpl/src/c/classes/gauss/GaussTria.cpp
r18039 r18064 7 7 8 8 /*GaussTria constructors and destructors:*/ 9 /*FUNCTION GaussTria::GaussTria() {{{*/ 10 GaussTria::GaussTria(){ 9 GaussTria::GaussTria(){/*{{{*/ 11 10 12 11 numgauss=-1; … … 23 22 } 24 23 /*}}}*/ 25 /*FUNCTION GaussTria::GaussTria(int order) {{{*/ 26 GaussTria::GaussTria(int order){ 24 GaussTria::GaussTria(int order){/*{{{*/ 27 25 28 26 /*Get gauss points*/ … … 37 35 } 38 36 /*}}}*/ 39 /*FUNCTION GaussTria::GaussTria(int index1,int index2,int order) {{{*/ 40 GaussTria::GaussTria(int index1,int index2,int order){ 37 GaussTria::GaussTria(int index1,int index2,int order){/*{{{*/ 41 38 42 39 /*Intermediaties*/ … … 100 97 } 101 98 /*}}}*/ 102 /*FUNCTION GaussTria::GaussTria(IssmDouble area_coordinates,int order) {{{*/ 103 GaussTria::GaussTria(IssmDouble area_coordinates[2][3],int order){ 99 GaussTria::GaussTria(IssmDouble area_coordinates[2][3],int order){/*{{{*/ 104 100 105 101 /*Intermediaties*/ … … 136 132 } 137 133 /*}}}*/ 138 /*FUNCTION GaussTria::GaussTria(int index,double r1,double r2,int order) {{{*/ 139 GaussTria::GaussTria(int index,IssmDouble r1,IssmDouble r2,bool mainlyfloating,int order){ 134 GaussTria::GaussTria(int index,IssmDouble r1,IssmDouble r2,bool mainlyfloating,int order){/*{{{*/ 140 135 141 136 /* … … 292 287 } 293 288 /*}}}*/ 294 /*FUNCTION GaussTria::~GaussTria(){{{*/ 295 GaussTria::~GaussTria(){ 289 GaussTria::~GaussTria(){/*{{{*/ 296 290 xDelete<IssmDouble>(weights); 297 291 xDelete<IssmDouble>(coords3); … … 303 297 304 298 /*Methods*/ 305 /*FUNCTION GaussTria::Echo{{{*/ 306 void GaussTria::Echo(void){ 299 void GaussTria::Echo(void){/*{{{*/ 307 300 308 301 _printf_("GaussTria:\n"); … … 341 334 } 342 335 /*}}}*/ 343 /*FUNCTION GaussTria::Enum{{{*/ 344 int GaussTria::Enum(void){ 336 int GaussTria::Enum(void){/*{{{*/ 345 337 return GaussTriaEnum; 346 338 } 347 339 /*}}}*/ 348 /*FUNCTION GaussTria::GaussEdgeCenter{{{*/ 349 void GaussTria::GaussEdgeCenter(int index1,int index2){ 340 void GaussTria::GaussEdgeCenter(int index1,int index2){/*{{{*/ 350 341 351 342 int index3; … … 377 368 } 378 369 /*}}}*/ 379 /*FUNCTION GaussTria::GaussPoint{{{*/ 380 void GaussTria::GaussPoint(int ig){ 370 void GaussTria::GaussPoint(int ig){/*{{{*/ 381 371 382 372 /*Check input in debugging mode*/ … … 391 381 } 392 382 /*}}}*/ 393 /*FUNCTION GaussTria::GaussFromCoords{{{*/ 394 void GaussTria::GaussFromCoords(IssmDouble x,IssmDouble y,IssmDouble* xyz_list){ 383 void GaussTria::GaussFromCoords(IssmDouble x,IssmDouble y,IssmDouble* xyz_list){/*{{{*/ 395 384 396 385 /*Intermediaries*/ … … 418 407 } 419 408 /*}}}*/ 420 /*FUNCTION GaussTria::GaussVertex{{{*/ 421 void GaussTria::GaussVertex(int iv){ 409 void GaussTria::GaussVertex(int iv){/*{{{*/ 422 410 423 411 /*in debugging mode: check that the default constructor has been called*/ … … 434 422 } 435 423 /*}}}*/ 436 /*FUNCTION GaussTria::GaussNode{{{*/ 437 void GaussTria::GaussNode(int finiteelement,int iv){ 424 void GaussTria::GaussNode(int finiteelement,int iv){/*{{{*/ 438 425 439 426 /*in debugging mode: check that the default constructor has been called*/ … … 481 468 } 482 469 /*}}}*/ 483 /*FUNCTION GaussTria::begin{{{*/ 484 int GaussTria::begin(void){ 470 int GaussTria::begin(void){/*{{{*/ 485 471 486 472 /*Check that this has been initialized*/ … … 495 481 } 496 482 /*}}}*/ 497 /*FUNCTION GaussTria::end{{{*/ 498 int GaussTria::end(void){ 483 int GaussTria::end(void){/*{{{*/ 499 484 500 485 /*Check that this has been initialized*/ … … 509 494 } 510 495 /*}}}*/ 511 /*FUNCTION GaussTria::SynchronizeGaussBase{{{*/ 512 void GaussTria::SynchronizeGaussBase(Gauss* gauss){ 496 void GaussTria::SynchronizeGaussBase(Gauss* gauss){/*{{{*/ 513 497 514 498 _error_("not supported"); -
issm/trunk-jpl/src/c/classes/kriging/ExponentialVariogram.cpp
r15741 r18064 13 13 14 14 /*ExponentialVariogram constructors and destructor*/ 15 /*FUNCTION ExponentialVariogram::ExponentialVariogram(){{{*/ 16 ExponentialVariogram::ExponentialVariogram(){ 15 ExponentialVariogram::ExponentialVariogram(){/*{{{*/ 17 16 this->nugget = 0.2; 18 17 this->sill = 1; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION ExponentialVariogram::ExponentialVariogram(Options* options){{{*/ 24 ExponentialVariogram::ExponentialVariogram(Options* options){ 22 ExponentialVariogram::ExponentialVariogram(Options* options){/*{{{*/ 25 23 26 24 /*Defaults*/ … … 38 36 } 39 37 /*}}}*/ 40 /*FUNCTION ExponentialVariogram::~ExponentialVariogram(){{{*/ 41 ExponentialVariogram::~ExponentialVariogram(){ 38 ExponentialVariogram::~ExponentialVariogram(){/*{{{*/ 42 39 return; 43 40 } … … 45 42 46 43 /*Object virtual functions definitions:*/ 47 /*FUNCTION ExponentialVariogram::Echo {{{*/ 48 void ExponentialVariogram::Echo(void){ 44 void ExponentialVariogram::Echo(void){/*{{{*/ 49 45 _printf_("ExponentialVariogram\n"); 50 46 _printf_(" nugget: " << this->nugget << "\n"); … … 55 51 56 52 /*Variogram function*/ 57 /*FUNCTION ExponentialVariogram::Covariance{{{*/ 58 double ExponentialVariogram::Covariance(double deltax,double deltay){ 53 double ExponentialVariogram::Covariance(double deltax,double deltay){/*{{{*/ 59 54 /*The covariance can be deduced from the variogram from the following 60 55 * relationship: … … 76 71 } 77 72 /*}}}*/ 78 /*FUNCTION ExponentialVariogram::SemiVariogram{{{*/ 79 double ExponentialVariogram::SemiVariogram(double deltax,double deltay){ 73 double ExponentialVariogram::SemiVariogram(double deltax,double deltay){/*{{{*/ 80 74 /*http://en.wikipedia.org/wiki/Variogram*/ 81 75 double h,a,gamma; -
issm/trunk-jpl/src/c/classes/kriging/GaussianVariogram.cpp
r15741 r18064 13 13 14 14 /*GaussianVariogram constructors and destructor*/ 15 /*FUNCTION GaussianVariogram::GaussianVariogram(){{{*/ 16 GaussianVariogram::GaussianVariogram(){ 15 GaussianVariogram::GaussianVariogram(){/*{{{*/ 17 16 this->nugget = 0.2; 18 17 this->sill = 1; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION GaussianVariogram::GaussianVariogram(Options* options){{{*/ 24 GaussianVariogram::GaussianVariogram(Options* options){ 22 GaussianVariogram::GaussianVariogram(Options* options){/*{{{*/ 25 23 26 24 /*Defaults*/ … … 38 36 } 39 37 /*}}}*/ 40 /*FUNCTION GaussianVariogram::~GaussianVariogram(){{{*/ 41 GaussianVariogram::~GaussianVariogram(){ 38 GaussianVariogram::~GaussianVariogram(){/*{{{*/ 42 39 return; 43 40 } … … 45 42 46 43 /*Object virtual functions definitions:*/ 47 /*FUNCTION GaussianVariogram::Echo {{{*/ 48 void GaussianVariogram::Echo(void){ 44 void GaussianVariogram::Echo(void){/*{{{*/ 49 45 _printf_("GaussianVariogram\n"); 50 46 _printf_(" nugget: " << this->nugget << "\n"); … … 55 51 56 52 /*Variogram function*/ 57 /*FUNCTION GaussianVariogram::Covariance{{{*/ 58 double GaussianVariogram::Covariance(double deltax,double deltay){ 53 double GaussianVariogram::Covariance(double deltax,double deltay){/*{{{*/ 59 54 /*The covariance can be deduced from the variogram from the following 60 55 * relationship: … … 77 72 } 78 73 /*}}}*/ 79 /*FUNCTION GaussianVariogram::SemiVariogram{{{*/ 80 double GaussianVariogram::SemiVariogram(double deltax,double deltay){ 74 double GaussianVariogram::SemiVariogram(double deltax,double deltay){/*{{{*/ 81 75 /*http://en.wikipedia.org/wiki/Variogram*/ 82 76 double h2,a,gamma; -
issm/trunk-jpl/src/c/classes/kriging/Observation.cpp
r15104 r18064 7 7 8 8 /*Observation constructors and destructor*/ 9 /*FUNCTION Observation::Observation(){{{*/ 10 Observation::Observation(){ 9 Observation::Observation(){/*{{{*/ 11 10 return; 12 11 } 13 12 /*}}}*/ 14 /*FUNCTION Observation::Observation(double x,double y,int xi,int yi,int index,double value){{{*/ 15 Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in){ 13 Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in){/*{{{*/ 16 14 17 15 this->x = x_in; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION Observation::~Observation(){{{*/ 28 Observation::~Observation(){ 25 Observation::~Observation(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION Observation::Echo {{{*/ 35 void Observation::Echo(void){ 31 void Observation::Echo(void){/*{{{*/ 36 32 37 33 _printf_("Observation\n"); … … 47 43 48 44 /*Observations functions*/ 49 /*FUNCTION Observation::WriteXYObs(double* px,double* py,double* pobs){{{*/ 50 void Observation::WriteXYObs(double* px,double* py,double* pobs){ 45 void Observation::WriteXYObs(double* px,double* py,double* pobs){/*{{{*/ 51 46 *px = this->x; 52 47 *py = this->y; -
issm/trunk-jpl/src/c/classes/kriging/Observations.cpp
r17924 r18064 30 30 31 31 /*Object constructors and destructor*/ 32 /*FUNCTION Observations::Observations(){{{*/ 33 Observations::Observations(){ 32 Observations::Observations(){/*{{{*/ 34 33 this->quadtree = NULL; 35 34 return; 36 35 } 37 36 /*}}}*/ 38 /*FUNCTION Observations::Observations(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){{{*/ 39 Observations::Observations(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){ 37 Observations::Observations(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/ 40 38 41 39 /*Intermediaries*/ … … 112 110 } 113 111 /*}}}*/ 114 /*FUNCTION Observations::~Observations(){{{*/ 115 Observations::~Observations(){ 112 Observations::~Observations(){/*{{{*/ 116 113 delete quadtree; 117 114 return; … … 120 117 121 118 /*Methods*/ 122 /*FUNCTION Observations::ClosestObservation{{{*/ 123 void Observations::ClosestObservation(IssmPDouble *px,IssmPDouble *py,IssmPDouble *pobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){ 119 void Observations::ClosestObservation(IssmPDouble *px,IssmPDouble *py,IssmPDouble *pobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ 124 120 125 121 /*Output and Intermediaries*/ … … 172 168 173 169 }/*}}}*/ 174 /*FUNCTION Observations::Distances{{{*/ 175 void Observations::Distances(IssmPDouble* distances,IssmPDouble *x,IssmPDouble *y,int n,IssmPDouble radius){ 170 void Observations::Distances(IssmPDouble* distances,IssmPDouble *x,IssmPDouble *y,int n,IssmPDouble radius){/*{{{*/ 176 171 177 172 IssmPDouble xi,yi,obs; … … 187 182 } 188 183 }/*}}}*/ 189 /*FUNCTION Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int maxdata){{{*/ 190 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int maxdata){ 184 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int maxdata){/*{{{*/ 191 185 192 186 /*Output and Intermediaries*/ … … 270 264 *pnobs=nobs; 271 265 }/*}}}*/ 272 /*FUNCTION Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs){{{*/ 273 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs){ 266 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs){/*{{{*/ 274 267 275 268 /*Output and Intermediaries*/ … … 298 291 *pnobs=nobs; 299 292 }/*}}}*/ 300 /*FUNCTION Observations::InterpolationIDW{{{*/ 301 void Observations::InterpolationIDW(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata,IssmPDouble power){ 293 void Observations::InterpolationIDW(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata,IssmPDouble power){/*{{{*/ 302 294 303 295 /*Intermediaries*/ … … 347 339 xDelete<IssmPDouble>(obs); 348 340 }/*}}}*/ 349 /*FUNCTION Observations::InterpolationKriging{{{*/ 350 void Observations::InterpolationKriging(IssmPDouble *pprediction,IssmPDouble *perror,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata,Variogram* variogram){ 341 void Observations::InterpolationKriging(IssmPDouble *pprediction,IssmPDouble *perror,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata,Variogram* variogram){/*{{{*/ 351 342 352 343 /*Intermediaries*/ … … 424 415 425 416 }/*}}}*/ 426 /*FUNCTION Observations::InterpolationNearestNeighbor{{{*/ 427 void Observations::InterpolationNearestNeighbor(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){ 417 void Observations::InterpolationNearestNeighbor(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ 428 418 429 419 /*Intermediaries*/ … … 436 426 *pprediction = obs; 437 427 }/*}}}*/ 438 /*FUNCTION Observations::InterpolationV4{{{*/ 439 void Observations::InterpolationV4(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata){ 428 void Observations::InterpolationV4(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata){/*{{{*/ 440 429 /* Reference: David T. Sandwell, Biharmonic spline interpolation of GEOS-3 441 430 * and SEASAT altimeter data, Geophysical Research Letters, 2, 139-142, … … 519 508 xDelete<IssmPDouble>(weights); 520 509 }/*}}}*/ 521 /*FUNCTION Observations::QuadtreeColoring{{{*/ 522 void Observations::QuadtreeColoring(IssmPDouble* A,IssmPDouble *x,IssmPDouble *y,int n){ 510 void Observations::QuadtreeColoring(IssmPDouble* A,IssmPDouble *x,IssmPDouble *y,int n){/*{{{*/ 523 511 524 512 int xi,yi,level; … … 531 519 532 520 }/*}}}*/ 533 /*FUNCTION Observations::Variomap{{{*/ 534 void Observations::Variomap(IssmPDouble* gamma,IssmPDouble *x,int n){ 521 void Observations::Variomap(IssmPDouble* gamma,IssmPDouble *x,int n){/*{{{*/ 535 522 536 523 /*Output and Intermediaries*/ -
issm/trunk-jpl/src/c/classes/kriging/PowerVariogram.cpp
r15741 r18064 13 13 14 14 /*PowerVariogram constructors and destructor*/ 15 /*FUNCTION PowerVariogram::PowerVariogram(){{{*/ 16 PowerVariogram::PowerVariogram(){ 15 PowerVariogram::PowerVariogram(){/*{{{*/ 17 16 this->nugget = 0.2; 18 17 this->slope = 1.; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION PowerVariogram::PowerVariogram(Options* options){{{*/ 24 PowerVariogram::PowerVariogram(Options* options){ 22 PowerVariogram::PowerVariogram(Options* options){/*{{{*/ 25 23 26 24 /*Defaults*/ … … 39 37 } 40 38 /*}}}*/ 41 /*FUNCTION PowerVariogram::~PowerVariogram(){{{*/ 42 PowerVariogram::~PowerVariogram(){ 39 PowerVariogram::~PowerVariogram(){/*{{{*/ 43 40 return; 44 41 } … … 46 43 47 44 /*Object virtual functions definitions:*/ 48 /*FUNCTION PowerVariogram::Echo {{{*/ 49 void PowerVariogram::Echo(void){ 45 void PowerVariogram::Echo(void){/*{{{*/ 50 46 _printf_("PowerVariogram\n"); 51 47 _printf_(" nugget: " << this->nugget << "\n"); … … 56 52 57 53 /*Variogram function*/ 58 /*FUNCTION PowerVariogram::Covariance{{{*/ 59 double PowerVariogram::Covariance(double deltax,double deltay){ 54 double PowerVariogram::Covariance(double deltax,double deltay){/*{{{*/ 60 55 /*The covariance can be deduced from the variogram from the following 61 56 * relationship: … … 74 69 } 75 70 /*}}}*/ 76 /*FUNCTION PowerVariogram::SemiVariogram{{{*/ 77 double PowerVariogram::SemiVariogram(double deltax,double deltay){ 71 double PowerVariogram::SemiVariogram(double deltax,double deltay){/*{{{*/ 78 72 /*http://en.wikipedia.org/wiki/Variogram*/ 79 73 double h,gamma; -
issm/trunk-jpl/src/c/classes/kriging/Quadtree.cpp
r16989 r18064 81 81 82 82 /*Constructors/Destructors*/ 83 /*FUNCTION Quadtree::Quadtree(){{{*/ 84 Quadtree::Quadtree(){ 83 Quadtree::Quadtree(){/*{{{*/ 85 84 _error_("Constructor not supported"); 86 85 87 86 } 88 87 /*}}}*/ 89 /*FUNCTION Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){{{*/ 90 Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){ 88 Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){/*{{{*/ 91 89 92 90 /*Intermediaries*/ … … 106 104 } 107 105 /*}}}*/ 108 /*FUNCTION Quadtree::~Quadtree(){{{*/ 109 Quadtree::~Quadtree(){ 106 Quadtree::~Quadtree(){/*{{{*/ 110 107 111 108 delete boxcontainer; … … 116 113 117 114 /*Methods*/ 118 /*FUNCTION Quadtree::Add{{{*/ 119 void Quadtree::Add(Observation* observation){ 115 void Quadtree::Add(Observation* observation){/*{{{*/ 120 116 121 117 /*Intermediaries*/ … … 199 195 200 196 }/*}}}*/ 201 /*FUNCTION Quadtree::AddAndAverage{{{*/ 202 void Quadtree::AddAndAverage(double x,double y,double value){ 197 void Quadtree::AddAndAverage(double x,double y,double value){/*{{{*/ 203 198 204 199 QuadtreeBox **pbox = NULL; … … 248 243 } 249 244 }/*}}}*/ 250 /*FUNCTION Quadtree::ClosestObs{{{*/ 251 void Quadtree::ClosestObs(int *pindex,double x,double y){ 245 void Quadtree::ClosestObs(int *pindex,double x,double y){/*{{{*/ 252 246 253 247 QuadtreeBox **pbox = NULL; … … 288 282 *pindex=index; 289 283 }/*}}}*/ 290 /*FUNCTION Quadtree::Echo{{{*/ 291 void Quadtree::Echo(void){ 284 void Quadtree::Echo(void){/*{{{*/ 292 285 293 286 _printf_("Quadtree:\n"); … … 298 291 299 292 }/*}}}*/ 300 /*FUNCTION Quadtree::DeepEcho{{{*/ 301 void Quadtree::DeepEcho(void){ 293 void Quadtree::DeepEcho(void){/*{{{*/ 302 294 303 295 _printf_("Quadtree:\n"); … … 309 301 310 302 }/*}}}*/ 311 /*FUNCTION Quadtree::IntergerCoordinates{{{*/ 312 void Quadtree::IntergerCoordinates(int *xi,int *yi,double x,double y){ 303 void Quadtree::IntergerCoordinates(int *xi,int *yi,double x,double y){/*{{{*/ 313 304 314 305 /*Intermediaries*/ … … 333 324 *yi=int(coefficient*(y - ymin)); 334 325 }/*}}}*/ 335 /*FUNCTION Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){{{*/ 336 Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){ 326 Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){/*{{{*/ 337 327 338 328 /*Output*/ … … 357 347 return newbox; 358 348 }/*}}}*/ 359 /*FUNCTION Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index) {{{*/ 360 Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index){ 349 Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index){/*{{{*/ 361 350 362 351 /*Output*/ … … 402 391 return newbox; 403 392 }/*}}}*/ 404 /*FUNCTION Quadtree::QuadtreeDepth{{{*/ 405 void Quadtree::QuadtreeDepth(int* A,int xi,int yi){ 393 void Quadtree::QuadtreeDepth(int* A,int xi,int yi){/*{{{*/ 406 394 407 395 QuadtreeBox **pbox = NULL; … … 430 418 *A=level; 431 419 }/*}}}*/ 432 /*FUNCTION Quadtree::QuadtreeDepth2{{{*/ 433 void Quadtree::QuadtreeDepth2(int* A,int xi,int yi){ 420 void Quadtree::QuadtreeDepth2(int* A,int xi,int yi){/*{{{*/ 434 421 435 422 QuadtreeBox **pbox = NULL; … … 483 470 *A=level; 484 471 }/*}}}*/ 485 /*FUNCTION Quadtree::RangeSearch{{{*/ 486 void Quadtree::RangeSearch(int **pindices,int *pnobs,double x,double y,double range){ 472 void Quadtree::RangeSearch(int **pindices,int *pnobs,double x,double y,double range){/*{{{*/ 487 473 488 474 /*Intermediaries*/ … … 503 489 504 490 /*QuadtreeBox methos*/ 505 /*FUNCTION QuadtreeBox::Echo{{{*/ 506 void Quadtree::QuadtreeBox::Echo(void){ 491 void Quadtree::QuadtreeBox::Echo(void){/*{{{*/ 507 492 508 493 _printf_("QuadtreeBox:\n"); … … 513 498 514 499 }/*}}}*/ 515 /*FUNCTION QuadtreeBox::IsWithinRange{{{*/ 516 int Quadtree::QuadtreeBox::IsWithinRange(double x,double y,double range){ 500 int Quadtree::QuadtreeBox::IsWithinRange(double x,double y,double range){/*{{{*/ 517 501 518 502 /*Return 0 if the 2 boxes do not overlap*/ … … 532 516 533 517 }/*}}}*/ 534 /*FUNCTION QuadtreeBox::RangeSearch{{{*/ 535 void Quadtree::QuadtreeBox::RangeSearch(int* indices,int *pnobs,double x,double y,double range){ 518 void Quadtree::QuadtreeBox::RangeSearch(int* indices,int *pnobs,double x,double y,double range){/*{{{*/ 536 519 537 520 /*Intermediaries*/ … … 574 557 *pnobs=nobs; 575 558 }/*}}}*/ 576 /*FUNCTION QuadtreeBox::WriteObservations{{{*/ 577 void Quadtree::QuadtreeBox::WriteObservations(int* indices,int *pnobs){ 559 void Quadtree::QuadtreeBox::WriteObservations(int* indices,int *pnobs){/*{{{*/ 578 560 579 561 /*Intermediaries*/ -
issm/trunk-jpl/src/c/classes/kriging/SphericalVariogram.cpp
r15741 r18064 13 13 14 14 /*SphericalVariogram constructors and destructor*/ 15 /*FUNCTION SphericalVariogram::SphericalVariogram(){{{*/ 16 SphericalVariogram::SphericalVariogram(){ 15 SphericalVariogram::SphericalVariogram(){/*{{{*/ 17 16 this->nugget = 0.2; 18 17 this->sill = 1; … … 21 20 } 22 21 /*}}}*/ 23 /*FUNCTION SphericalVariogram::SphericalVariogram(Options* options){{{*/ 24 SphericalVariogram::SphericalVariogram(Options* options){ 22 SphericalVariogram::SphericalVariogram(Options* options){/*{{{*/ 25 23 26 24 /*Defaults*/ … … 38 36 } 39 37 /*}}}*/ 40 /*FUNCTION SphericalVariogram::~SphericalVariogram(){{{*/ 41 SphericalVariogram::~SphericalVariogram(){ 38 SphericalVariogram::~SphericalVariogram(){/*{{{*/ 42 39 return; 43 40 } … … 45 42 46 43 /*Object virtual functions definitions:*/ 47 /*FUNCTION SphericalVariogram::Echo {{{*/ 48 void SphericalVariogram::Echo(void){ 44 void SphericalVariogram::Echo(void){/*{{{*/ 49 45 _printf_("SphericalVariogram\n"); 50 46 _printf_(" nugget: " << this->nugget << "\n"); … … 55 51 56 52 /*Variogram function*/ 57 /*FUNCTION SphericalVariogram::Covariance{{{*/ 58 double SphericalVariogram::Covariance(double deltax,double deltay){ 53 double SphericalVariogram::Covariance(double deltax,double deltay){/*{{{*/ 59 54 /*The covariance can be deduced from the variogram from the following 60 55 * relationship: … … 76 71 } 77 72 /*}}}*/ 78 /*FUNCTION SphericalVariogram::SemiVariogram{{{*/ 79 double SphericalVariogram::SemiVariogram(double deltax,double deltay){ 73 double SphericalVariogram::SemiVariogram(double deltax,double deltay){/*{{{*/ 80 74 /*http://en.wikipedia.org/wiki/Variogram*/ 81 75 double h,gamma; -
issm/trunk-jpl/src/c/classes/matrix/ElementMatrix.cpp
r16658 r18064 18 18 19 19 /*ElementMatrix constructors and destructor*/ 20 /*FUNCTION ElementMatrix::ElementMatrix(){{{*/ 21 ElementMatrix::ElementMatrix(){ 20 ElementMatrix::ElementMatrix(){/*{{{*/ 22 21 23 22 this->nrows=0; … … 42 41 } 43 42 /*}}}*/ 44 /*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke){{{*/ 45 ElementMatrix::ElementMatrix(ElementMatrix* Ke){ 43 ElementMatrix::ElementMatrix(ElementMatrix* Ke){/*{{{*/ 46 44 47 45 if(!Ke) _error_("Input Element Matrix is a NULL pointer"); … … 50 48 } 51 49 /*}}}*/ 52 /*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){{{*/ 53 ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){ 50 ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){/*{{{*/ 54 51 55 52 /*intermediaries*/ … … 179 176 } 180 177 /*}}}*/ 181 /*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){{{*/ 182 ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){ 178 ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){/*{{{*/ 183 179 184 180 /*Concatenate all matrices*/ … … 194 190 } 195 191 /*}}}*/ 196 /*FUNCTION ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){{{*/ 197 ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){ 192 ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){/*{{{*/ 198 193 199 194 /*get Matrix size and properties*/ … … 225 220 } 226 221 /*}}}*/ 227 /*FUNCTION ElementMatrix::~ElementMatrix(){{{*/ 228 ElementMatrix::~ElementMatrix(){ 222 ElementMatrix::~ElementMatrix(){/*{{{*/ 229 223 230 224 xDelete<IssmDouble>(this->values); … … 242 236 243 237 /*ElementMatrix specific routines: */ 244 /*FUNCTION ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){{{*/ 245 void ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 238 void ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){/*{{{*/ 246 239 247 240 int i,j; … … 300 293 } 301 294 /*}}}*/ 302 /*FUNCTION ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Jff){{{*/ 303 void ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Jff){ 295 void ElementMatrix::AddToGlobal(Matrix<IssmDouble>* Jff){/*{{{*/ 304 296 305 297 int i,j; … … 337 329 } 338 330 /*}}}*/ 339 /*FUNCTION ElementMatrix::CheckConsistency{{{*/ 340 void ElementMatrix::CheckConsistency(void){ 331 void ElementMatrix::CheckConsistency(void){/*{{{*/ 341 332 /*Check element matrix values, only in debugging mode*/ 342 333 #ifdef _ISSM_DEBUG_ … … 350 341 } 351 342 /*}}}*/ 352 /*FUNCTION ElementMatrix::Transpose{{{*/ 353 void ElementMatrix::Transpose(void){ 343 void ElementMatrix::Transpose(void){/*{{{*/ 354 344 355 345 /*Intermediaries*/ … … 373 363 } 374 364 /*}}}*/ 375 /*FUNCTION ElementMatrix::StaticCondensation{{{*/ 376 void ElementMatrix::StaticCondensation(int bsize,int* bindices){ 365 void ElementMatrix::StaticCondensation(int bsize,int* bindices){/*{{{*/ 377 366 /* 378 367 * | Kii Kib | | Ui | |Fi| … … 477 466 } 478 467 /*}}}*/ 479 /*FUNCTION ElementMatrix::Echo{{{*/ 480 void ElementMatrix::Echo(void){ 468 void ElementMatrix::Echo(void){/*{{{*/ 481 469 482 470 int i,j; … … 523 511 } 524 512 /*}}}*/ 525 /*FUNCTION ElementMatrix::Init{{{*/ 526 void ElementMatrix::Init(ElementMatrix* Ke){ 513 void ElementMatrix::Init(ElementMatrix* Ke){/*{{{*/ 527 514 528 515 _assert_(Ke);
Note:
See TracChangeset
for help on using the changeset viewer.