This repository serve as a backup for my Maxwell-TD code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.5 KiB

// EDGE.H
#ifndef EDGE_H
#define EDGE_H
#include "node.h"
#include "vtr.h"
#include "cvtr.h"
#include <vector>
#include "../dgtd-performance.hpp"
class edge {
friend class face;
friend class tetra;
friend class FemGrp;
private:
int globalCnt; //position in the set of edges
int cnt;
int bType;
bool IsPmcOnceSet; //TRUE if edge PMC // added DG
bool IsPecOnceSet; //TRUE if edge PMC //added DG
bool PecPmc; //TRUE if edge PEC AND PMC
node *nd[2]; //nodes of the edge
cVtr e;
cVtr h;
public:
// constructor
edge();
// operators
int operator>(const edge &) const;
int operator<(const edge &) const;
int operator == (const edge &) const;
edge &operator = (const edge &);
// set functions
void setGlobalCnt(int n){globalCnt = n;}
void setEdge(node *, node *);
void setbType(int);
void ReplacebType(int);
void setcnt(int);
// get functions
int getGlobalCnt() const {return globalCnt;}
int getid(int );
int getbType() const {return bType;}
int getcnt();
int getCnt() const {return cnt;}
fp_t length();
bool IsPecPmc(){return IsPmcOnceSet && IsPecOnceSet;} // added for DG
node *getNode(int);
// print
void print();
// procedures related to error fields e and h
void AddToE(cVtr);
void AddToH(cVtr);
cVtr GetE();
cVtr GetH();
void resetEH();
vtr Center();
};
#endif