Commit baedb404 authored by Guido Giuntoli's avatar Guido Giuntoli

Adding #pragma once in headers

parent 076a7849
......@@ -19,16 +19,18 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <fstream>
#pragma once
#include <fstream>
#include <cstdlib>
#include <cstring>
#include <cassert>
using namespace std;
#ifndef ELL_H_
#define ELL_H_
#define CG_ABS_TOL 1.0e-50
#define CG_MAX_ITS 1000
......@@ -38,6 +40,7 @@ using namespace std;
#define nod_index3D(i,j,k) ((k)*nx*ny + (j)*nx + (i))
#define nod_index2D(i,j) ((j)*nx + (i))
typedef struct {
int n[3]; // nx ny nz
......@@ -91,5 +94,3 @@ double get_norm_acc(const double *vector, const int n);
double get_dot_acc(const double *v1, const double *v2, const int n);
void print_ell_acc(const ell_matrix *A);
#endif
......@@ -20,6 +20,9 @@
*/
#pragma once
#include <iostream>
#include <fstream>
#include <cassert>
......
......@@ -20,8 +20,8 @@
*/
#ifndef INSTRUMENT_HPP
#define INSTRUMENT_HPP
#pragma once
#ifndef TIMER
......@@ -82,6 +82,3 @@ class instrument {
};
#endif // TIMER
#endif //INSTRUMENT_HPP
......@@ -19,11 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MATERIAL_HPP
#define MATERIAL_HPP
#include "material_base.h"
#pragma once
#include <cmath>
......@@ -32,6 +28,9 @@
#include <iostream>
#include "material_base.h"
using namespace std;
......@@ -171,6 +170,3 @@ class material_damage : public material_t {
double *stress_lin) const;
};
#endif
......@@ -21,8 +21,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MICRO_HPP
#define MICRO_HPP
#pragma once
#include <vector>
#include <iostream>
......@@ -396,6 +395,3 @@ class micropp {
void print_info() const;
};
#endif
......@@ -20,8 +20,7 @@
*/
#ifndef UTIL_HPP
#define UTIL_HPP
#pragma once
#include <vector>
......@@ -172,6 +171,3 @@ inline double invert_3x3(const double mat[3][3], double mat_inv[3][3])
return det;
}
#endif
......@@ -662,9 +662,9 @@ int micropp<tdim>::get_elem_type(int ex, int ey, int ez) const
*
*/
const double rad_cilinder = geo_params[0];
const double width_flat_layer = geo_params[1];
const double width_cili_layer = geo_params[2];
const double rad_cilinder = 0.1;
const double width_flat_layer = 0.02;
const double width_cili_layer = 0.01;
const double cen_1[3] = { lx * .25, ly * .75, 0.0 };
const double cen_2[3] = { lx * .75, ly * .75, 0.0 };
......
......@@ -50,7 +50,7 @@ extern "C" {
params.mpi_rank = mpi_rank;
params.use_A0 = false;
params.its_with_A0 = 1;
params.write_log = true;
params.write_log = false;
self->ptr = new micropp<3>(params);
......
......@@ -77,9 +77,9 @@ int main(int argc, char **argv)
//mic_params.subiterations = true;
//mic_params.nsubiterations = 10;
mic_params.nr_max_its = 12;
material_set(&mic_params.materials[0], 2, 1.0e7, 0.3, 0.0, 0.0, 1.0e5);
material_set(&mic_params.materials[1], 0, 3.0e7, 0.3, 0.0, 0.0, 0.0);
material_set(&mic_params.materials[2], 0, 3.0e7, 0.3, 0.0, 0.0, 0.0);
material_set(&mic_params.materials[0], 2, 3.0e7, 0.25, 0.0, 0.0, 1.0e6);
material_set(&mic_params.materials[1], 0, 3.0e8, 0.25, 0.0, 0.0, 0.0);
material_set(&mic_params.materials[2], 0, 3.0e7, 0.25, 0.0, 0.0, 0.0);
mic_params.mpi_rank = 0;
mic_params.calc_ctan_lin = false;
mic_params.lin_stress = false;
......
......@@ -74,7 +74,7 @@ int main(int argc, char **argv)
mic_params.geo_params[0] = 0.0;
mic_params.geo_params[1] = 0.0;
mic_params.geo_params[2] = 0.0;
mic_params.geo_params[4] = 0.0;
mic_params.geo_params[3] = 0.0;
//mic_params.subiterations = true;
//mic_params.nsubiterations = 10;
mic_params.nr_max_its = 12;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment