Skip to content

Commit 226ff35

Browse files
committed
added notices to the start of each source and header file, colored terminal output
1 parent f796887 commit 226ff35

File tree

98 files changed

+1524
-1366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1524
-1366
lines changed

src/CellBasic.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
5+
16
#include "CellBasic.hpp"
27
#include "GridBasic.hpp"
38

4-
59
bool cell_basic::isValid()
610
{
711
return data != 0;
@@ -23,19 +27,19 @@ double cell_basic::getData(uint i) const
2327

2428
void cell_basic::setData(uint i, double d)
2529
{
26-
#pragma omp atomic write
30+
#pragma omp atomic write
2731
data[i] = d;
2832
}
2933

3034
void cell_basic::updateData(uint i, double d)
3135
{
32-
#pragma omp atomic update
36+
#pragma omp atomic update
3337
data[i] += d;
3438
}
3539

3640
void cell_basic::convertData(uint i, double c)
3741
{
38-
#pragma omp atomic update
42+
#pragma omp atomic update
3943
data[i] *= c;
4044
}
4145

src/CellBasic.hpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
#pragma once
2-
#include "Typedefs.hpp"
3-
#include "Vector3D.hpp"
4-
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
55

66
#ifndef CELL_BASIC_H
77
#define CELL_BASIC_H
88

9+
#include "Typedefs.hpp"
10+
#include "Vector3D.hpp"
11+
912
class cell_basic
1013
{
11-
public:
14+
public:
1215
cell_basic()
1316
{
1417
data = 0;
@@ -40,9 +43,9 @@ class cell_basic
4043

4144
void updateID(uint _id);
4245

43-
protected:
46+
protected:
4447
double * data;
4548
uint id;
4649
};
4750

48-
#endif
51+
#endif /* CELL_BASIC_H */

src/CellCylindrical.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#include "CellCylindrical.hpp"
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
25

6+
#include "CellCylindrical.hpp"
37

48
void cell_cyl::setRID(uint id)
59
{

src/CellCylindrical.hpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
#pragma once
2-
#include "CellBasic.hpp"
3-
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
45

56
#ifndef CELL_CYLINDRICAL_H
67
#define CELL_CYLINDRICAL_H
78

9+
#include "CellBasic.hpp"
10+
811
class cell_cyl : public cell_basic
912
{
10-
public:
13+
public:
1114
cell_cyl()
1215
{
1316
rID = 0;
@@ -37,8 +40,8 @@ class cell_cyl : public cell_basic
3740

3841
uint getZID() const;
3942

40-
private:
43+
private:
4144
uint rID, phID, zID;
4245
};
4346

44-
#endif
47+
#endif /* CELL_CYLINDRICAL_H */

src/CellOcTree.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#include "CellOcTree.hpp"
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
25

6+
#include "CellOcTree.hpp"
37

48
void cell_oc::setXmin(double _x_min)
59
{

src/CellOcTree.hpp

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
#pragma once
2-
#include "CellBasic.hpp"
3-
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
45

56
#ifndef CELL_OCTREE_H
67
#define CELL_OCTREE_H
78

9+
#include "CellBasic.hpp"
10+
811
class cell_oc : public cell_basic
912
{
10-
public:
13+
public:
1114
cell_oc()
1215
{
1316
parent = 0;
@@ -62,14 +65,10 @@ class cell_oc : public cell_basic
6265

6366
uchar getLevel();
6467

65-
/*
66-
get the position ID within the parent cube (0-7)
67-
*/
68+
// get the position ID within the parent cube (0-7)
6869
uint getID() const;
6970

70-
/*
71-
get the actual ID of the cell (globally unique)
72-
*/
71+
// get the actual ID of the cell (globally unique)
7372
ulong getUniqueID() const;
7473

7574
cell_oc * getParent();
@@ -78,12 +77,12 @@ class cell_oc : public cell_basic
7877

7978
cell_oc * getChild(uint i);
8079

81-
private:
80+
private:
8281
double x_min, y_min, z_min, length;
8382
cell_oc * children;
8483
cell_oc * parent;
8584
uchar level;
8685
ulong unique_id;
8786
};
8887

89-
#endif
88+
#endif /* CELL_OCTREE_H */

src/CellSpherical.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#include "CellSpherical.hpp"
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
25

6+
#include "CellSpherical.hpp"
37

48
void cell_sp::setRID(uint id)
59
{

src/CellSpherical.hpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
#pragma once
2-
#include "CellBasic.hpp"
3-
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
45

56
#ifndef CELL_SPHERICAL_H
67
#define CELL_SPHERICAL_H
78

9+
#include "CellBasic.hpp"
10+
811
class cell_sp : public cell_basic
912
{
10-
public:
13+
public:
1114
cell_sp()
1215
{
1316
rID = 0;
@@ -46,8 +49,8 @@ class cell_sp : public cell_basic
4649

4750
uint getThID() const;
4851

49-
private:
52+
private:
5053
uint rID, phID, thID;
5154
};
5255

53-
#endif
56+
#endif /* CELL_SPHERICAL_H */

src/CellVoronoi.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#include "CellVoronoi.hpp"
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
25

6+
#include "CellVoronoi.hpp"
37

48
void cell_vo::initNeighbors(short nr)
59
{

src/CellVoronoi.hpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
#pragma once
2-
#include "CellBasic.hpp"
3-
1+
/************************************************************************************
2+
* POLARIS: POLArized RadIation Simulator *
3+
* Copyright (C) 2018 Stefan Reissl *
4+
************************************************************************************/
45

56
#ifndef CELL_VORONOI_H
67
#define CELL_VORONOI_H
78

9+
#include "CellBasic.hpp"
10+
811
class cell_vo : public cell_basic
912
{
10-
public:
13+
public:
1114
cell_vo()
1215
{
1316
id = 0;
@@ -52,11 +55,11 @@ class cell_vo : public cell_basic
5255

5356
ushort getNrOfNeighbors();
5457

55-
private:
58+
private:
5659
Vector3D center;
5760
ushort nr_neighbors;
5861
int * neighbors;
5962
double volume;
6063
};
6164

62-
#endif
65+
#endif /* CELL_VORONOI_H */

0 commit comments

Comments
 (0)