#include <stdio.h>
#include "../objects.h"
#include "../../io/io.h"
#include "../../shared/shared.h"

/*Constructors/Destructors*/
/*FUNCTION BamgMesh::BamgMesh(){{{1*/
BamgMesh::BamgMesh(){

	this->VerticesSize[0]=0,                  this->VerticesSize[1]=0;                 this->Vertices=NULL;
	this->EdgesSize[0]=0,                     this->EdgesSize[1]=0;                    this->Edges=NULL;
	this->TrianglesSize[0]=0,                 this->TrianglesSize[1]=0;                this->Triangles=NULL;
	this->QuadrilateralsSize[0]=0,            this->QuadrilateralsSize[1]=0;           this->Quadrilaterals=NULL;

	this->SubDomainsSize[0]=0,                this->SubDomainsSize[1]=0;               this->SubDomains=NULL;
	this->SubDomainsFromGeomSize[0]=0,        this->SubDomainsFromGeomSize[1]=0;       this->SubDomainsFromGeom=NULL;
	this->CrackedVerticesSize[0]=0,           this->CrackedVerticesSize[1]=0;          this->CrackedVertices=NULL;
	this->CrackedEdgesSize[0]=0,              this->CrackedEdgesSize[1]=0;             this->CrackedEdges=NULL;

	this->VerticesOnGeomVertexSize[0]=0,      this->VerticesOnGeomVertexSize[1]=0;     this->VerticesOnGeomVertex=NULL;
	this->VerticesOnGeomEdgeSize[0]=0,        this->VerticesOnGeomEdgeSize[1]=0;       this->VerticesOnGeomEdge=NULL;
	this->EdgesOnGeomEdgeSize[0]=0,           this->EdgesOnGeomEdgeSize[1]=0;          this->EdgesOnGeomEdge=NULL;

	this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
	this->IssmSegmentsSize[0]=0,              this->IssmSegmentsSize[1]=0;             this->IssmSegments=NULL;

	this->ElementConnectivitySize[0]=0,       this->ElementConnectivitySize[1]=0;      this->ElementConnectivity=NULL;
	this->NodalConnectivitySize[0]=0,         this->NodalConnectivitySize[1]=0;        this->NodalConnectivity=NULL;
	this->NodalElementConnectivitySize[0]=0,  this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
}
/*}}}*/
/*FUNCTION BamgMesh::~BamgMesh(){{{1*/
BamgMesh::~BamgMesh(){

	xfree((void**)&this->Vertices);
	xfree((void**)&this->Edges);
	xfree((void**)&this->Triangles);
	xfree((void**)&this->Quadrilaterals);

	xfree((void**)&this->SubDomains);
	xfree((void**)&this->SubDomainsFromGeom);
	xfree((void**)&this->CrackedVertices);
	xfree((void**)&this->CrackedEdges);

	xfree((void**)&this->VerticesOnGeomVertex);
	xfree((void**)&this->VerticesOnGeomEdge);
	xfree((void**)&this->EdgesOnGeomEdge);

	xfree((void**)&this->IssmEdges);
	xfree((void**)&this->IssmSegments);

	xfree((void**)&this->ElementConnectivity);
	xfree((void**)&this->NodalConnectivity);
	xfree((void**)&this->NodalElementConnectivity);


}
/*}}}*/
