Ice Sheet System Model
4.18
Code documentation
src
c
bamg
BamgVertex.h
Go to the documentation of this file.
1
#ifndef _BAMGVERTEX_H_
2
#define _BAMGVERTEX_H_
3
4
#include "
./include.h
"
5
#include "
./Metric.h
"
6
#include "
./BamgOpts.h
"
7
8
namespace
bamg
{
9
10
class
Triangle;
11
class
Mesh;
12
class
VertexOnGeom;
13
class
VertexOnEdge;
14
15
class
BamgVertex
{
16
17
public
:
18
19
/*Fields*/
20
I2
i
;
// integer coordinates
21
R2
r
;
// real coordinates
22
Metric
m
;
23
long
ReferenceNumber
;
24
long
PreviousNumber
;
25
short
IndexInTriangle
;
// the vertex number in triangle; varies between 0 and 2 in t
26
27
union
{
28
Triangle
*
t
;
// one triangle which is containing the vertex
29
long
color
;
30
BamgVertex
*
MeshVertexHook
;
// used in geometry BamgVertex to know the Mesh Vertex associated
31
VertexOnGeom
*
GeomEdgeHook
;
// if IndexInTriangle == 8; // set with Mesh::SetVertexFieldOn()
32
BamgVertex
*
BackgroundVertexHook
;
// if IndexInTriangle == 16 on Background vertex Mesh::SetVertexFieldOnBTh()
33
VertexOnEdge
*
BackgroundEdgeHook
;
// if IndexInTriangle == 32 on Background edge
34
};
35
36
/*Operators*/
37
operator
I2
()
const
{
return
i
;}
// Cast operator
38
operator
const
R2
& ()
const
{
return
r
;}
// Cast operator
39
operator
Metric
()
const
{
return
m
;}
// Cast operator
40
double
operator()
(
R2
x)
const
{
return
m
.
Length
(x.
x
,x.
y
);}
// Get x in the metric m
41
42
/*methods (No constructor and no destructors...)*/
43
BamgVertex
();
44
double
Smoothing
(
Mesh
& ,
Mesh
& ,
Triangle
* & ,
double
=1);
45
void
MetricFromHessian
(
const
double
Hxx,
const
double
Hyx,
const
double
Hyy,
const
double
smin,
const
double
smax,
const
double
s,
const
double
err,
BamgOpts
* bamgopts);
46
void
Echo
();
47
int
GetReferenceNumber
()
const
;
48
I2
GetIntegerCoordinates
()
const
{
return
this->
i
;};
// avoid operator I2()
49
long
Optim
(
int
=1,
int
=0);
50
51
//inline functions
52
inline
void
Set
(
const
BamgVertex
&rec,
const
Mesh
& ,
Mesh
& ){*
this
=rec;}
53
};
54
}
55
#endif
bamg::BamgVertex
Definition:
BamgVertex.h:15
bamg::BamgVertex::operator()
double operator()(R2 x) const
Definition:
BamgVertex.h:40
bamg::BamgVertex::MetricFromHessian
void MetricFromHessian(const double Hxx, const double Hyx, const double Hyy, const double smin, const double smax, const double s, const double err, BamgOpts *bamgopts)
Definition:
BamgVertex.cpp:34
bamg::BamgVertex::i
I2 i
Definition:
BamgVertex.h:20
bamg::BamgVertex::MeshVertexHook
BamgVertex * MeshVertexHook
Definition:
BamgVertex.h:30
bamg::BamgVertex::r
R2 r
Definition:
BamgVertex.h:21
bamg::BamgVertex::GetReferenceNumber
int GetReferenceNumber() const
Definition:
BamgVertex.cpp:30
BamgOpts.h
place holder for optimization function arguments
bamg
Definition:
AdjacentTriangle.cpp:9
bamg::BamgVertex::Smoothing
double Smoothing(Mesh &, Mesh &, Triangle *&, double=1)
Definition:
BamgVertex.cpp:124
bamg::BamgVertex::PreviousNumber
long PreviousNumber
Definition:
BamgVertex.h:24
bamg::Triangle
Definition:
Triangle.h:13
bamg::BamgVertex::BackgroundEdgeHook
VertexOnEdge * BackgroundEdgeHook
Definition:
BamgVertex.h:33
Metric.h
bamg::BamgVertex::BackgroundVertexHook
BamgVertex * BackgroundVertexHook
Definition:
BamgVertex.h:32
bamg::BamgVertex::GeomEdgeHook
VertexOnGeom * GeomEdgeHook
Definition:
BamgVertex.h:31
bamg::VertexOnEdge
Definition:
VertexOnEdge.h:12
bamg::BamgVertex::BamgVertex
BamgVertex()
Definition:
BamgVertex.cpp:13
bamg::VertexOnGeom
Definition:
VertexOnGeom.h:13
bamg::I2
P2< int, long long > I2
Definition:
typedefs.h:11
BamgOpts
Definition:
BamgOpts.h:8
bamg::Metric
Definition:
Metric.h:17
bamg::BamgVertex::Echo
void Echo()
Definition:
BamgVertex.cpp:18
bamg::BamgVertex::ReferenceNumber
long ReferenceNumber
Definition:
BamgVertex.h:23
bamg::Mesh
Definition:
Mesh.h:21
bamg::Metric::Length
double Length(double Ax, double Ay) const
Definition:
Metric.cpp:151
include.h
prototypes for include.h
bamg::BamgVertex::Set
void Set(const BamgVertex &rec, const Mesh &, Mesh &)
Definition:
BamgVertex.h:52
bamg::P2::x
R x
Definition:
R2.h:15
bamg::BamgVertex::color
long color
Definition:
BamgVertex.h:29
bamg::BamgVertex::GetIntegerCoordinates
I2 GetIntegerCoordinates() const
Definition:
BamgVertex.h:48
bamg::P2::y
R y
Definition:
R2.h:15
bamg::P2< int, long long >
bamg::BamgVertex::m
Metric m
Definition:
BamgVertex.h:22
bamg::BamgVertex::IndexInTriangle
short IndexInTriangle
Definition:
BamgVertex.h:25
bamg::BamgVertex::t
Triangle * t
Definition:
BamgVertex.h:28
bamg::BamgVertex::Optim
long Optim(int=1, int=0)
Definition:
BamgVertex.cpp:112
Generated on Thu Jul 2 2020 08:09:16 for Ice Sheet System Model by
1.8.19