Skip to content

Commit

Permalink
revert formatting-only changes make by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Findus23 committed May 16, 2021
1 parent 4b45076 commit 078ab91
Show file tree
Hide file tree
Showing 82 changed files with 163 additions and 154 deletions.
1 change: 0 additions & 1 deletion src/cooling_sfr/cooling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <algorithm>

#include "../cooling_sfr/cooling.h"
Expand Down
4 changes: 2 additions & 2 deletions src/data/allvars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* \brief instance and code for an object dealing with global parameters and variables
*/

#include "../data/allvars.h"
#include "gadgetconfig.h"

#include "../data/allvars.h"
#include "../data/constants.h"
#include "../data/dtypes.h"
#include "../data/macros.h"
#include "../time_integration/driftfac.h"
#include "gadgetconfig.h"

void global_data_all_processes::set_cosmo_factors_for_current_time(void)
{
Expand Down
4 changes: 3 additions & 1 deletion src/data/allvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
#ifndef ALLVARS_H
#define ALLVARS_H

#include "gadgetconfig.h"

#include <math.h>

#include "../data/constants.h"
#include "../data/dtypes.h"
#include "../data/macros.h"
#include "../io/parameters.h"
#include "gadgetconfig.h"

/** Data which is the SAME for all tasks (mostly code parameters read
* from the parameter file). Holding this data in a structure is
Expand Down Expand Up @@ -96,6 +97,7 @@ struct global_data_all_processes : public parameters
double InitGasU; /**< the same, but converted to thermal energy per unit mass */
double MinEgySpec; /**< the minimum allowed temperature expressed as energy per unit mass */


/* some force counters */

long long TotNumOfForces; /**< counts total number of force computations */
Expand Down
1 change: 0 additions & 1 deletion src/data/dtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define DTYPES_H

#include <stdint.h>

#include <cstddef>
#ifdef EXPLICIT_VECTORIZATION
#include "../vectorclass/vectorclass.h"
Expand Down
4 changes: 2 additions & 2 deletions src/data/intposconvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#ifndef CONVERT_H
#define CONVERT_H

#include <cmath>

#include "allvars.h"
#include "dtypes.h"

#include <cmath>

#define MSB ((MyIntPosType)(~((MyIntPosType)(~((MyIntPosType)0)) >> ((MyIntPosType)1))))

#if defined(LONG_X_BITS)
Expand Down
3 changes: 2 additions & 1 deletion src/data/lcparticles.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include <math.h>

#include "gadgetconfig.h"

#include "../data/constants.h"
#include "../data/dtypes.h"
#include "../data/intposconvert.h"
Expand All @@ -28,7 +30,6 @@
#include "../mpi_utils/setcomm.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

class lcparticles : public intposconvert, public setcomm
{
Expand Down
4 changes: 2 additions & 2 deletions src/data/mymalloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
* \copyright ([email protected]) and all contributing authors.
*******************************************************************************/
#include "../data/mymalloc.h"
#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
Expand All @@ -14,12 +14,12 @@

#include "../data/allvars.h"
#include "../data/dtypes.h"
#include "../data/mymalloc.h"
#include "../logs/logs.h"
#include "../main/simulation.h"
#include "../mpi_utils/mpi_utils.h"
#include "../mpi_utils/shared_mem_handler.h"
#include "../system/system.h"
#include "gadgetconfig.h"

/** \file mymalloc.cc
*
Expand Down
3 changes: 2 additions & 1 deletion src/data/particle_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef PARTDATA_H
#define PARTDATA_H

#include "gadgetconfig.h"

#include <atomic>
#include <climits>

Expand All @@ -25,7 +27,6 @@
#include "../mpi_utils/setcomm.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

/** This structure holds all the information that is
* stored for each particle of the simulation.
Expand Down
9 changes: 4 additions & 5 deletions src/domain/domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
* communication.
*/

#include "../domain/domain.h"
#include "gadgetconfig.h"

#include <mpi.h>

#include <cmath>
#include <cstdio>
#include <cstdlib>
Expand All @@ -34,13 +33,13 @@
#include "../data/allvars.h"
#include "../data/dtypes.h"
#include "../data/mymalloc.h"
#include "../domain/domain.h"
#include "../logs/logs.h"
#include "../logs/timer.h"
#include "../main/simulation.h"
#include "../sort/peano.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

/*! This is the main routine for the domain decomposition. It acts as a
* driver routine that allocates various temporary buffers, maps the
Expand Down Expand Up @@ -238,8 +237,8 @@ void domain<simparticles>::domain_find_total_cost(void)

if(Tp->P[i].getType() == 0)
{
if(bin >= Tp->P[i].getTimeBinHydro())
HydroCostPerListedTimeBin[n] += 1.0;
if(bin >= Tp->P[i].getTimeBinHydro())
HydroCostPerListedTimeBin[n] += 1.0;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/domain/domain_balance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* \brief contains routines to improve the domain balance by combining several patches per MPI rank
*/

#include <mpi.h>
#include "gadgetconfig.h"

#include <mpi.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
Expand All @@ -26,7 +27,6 @@
#include "../sort/cxxsort.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

/** This function uses the cumulative cost function (which weights work-load and memory-load equally) to subdivide
* the list of top-level leaf nodes into pieces that are (approximately) equal in size.
Expand Down
4 changes: 2 additions & 2 deletions src/domain/domain_box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* \brief routines for finding domain extension, random shifting, and periodic wrapping if needed
*/

#include <mpi.h>
#include "gadgetconfig.h"

#include <mpi.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
Expand All @@ -26,7 +27,6 @@
#include "../main/simulation.h"
#include "../pm/pm.h"
#include "../system/system.h"
#include "gadgetconfig.h"

using namespace std;

Expand Down
4 changes: 2 additions & 2 deletions src/domain/domain_exchange.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* \brief routines for moving particle data between MPI ranks
*/

#include <mpi.h>
#include "gadgetconfig.h"

#include <mpi.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
Expand All @@ -28,7 +29,6 @@
#include "../ngbtree/ngbtree.h"
#include "../sort/cxxsort.h"
#include "../system/system.h"
#include "gadgetconfig.h"

/*! \file domain_exchange.c
* \brief exchanges particle data according to the new domain decomposition
Expand Down
4 changes: 2 additions & 2 deletions src/domain/domain_toplevel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* \brief construction of top-level for subdividing the volume into domains
*/

#include <mpi.h>
#include "gadgetconfig.h"

#include <mpi.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
Expand All @@ -27,7 +28,6 @@
#include "../sort/cxxsort.h"
#include "../sort/peano.h"
#include "../system/system.h"
#include "gadgetconfig.h"

template <typename partset>
void domain<partset>::domain_do_local_refine(int n, int *list)
Expand Down
1 change: 0 additions & 1 deletion src/fof/fof.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifdef FOF

#include <mpi.h>

#include <algorithm>
#include <climits>
#include <cmath>
Expand Down
1 change: 0 additions & 1 deletion src/fof/fof_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <hdf5.h>
#include <mpi.h>
#include <sys/stat.h>

#include <algorithm>
#include <cmath>
#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions src/fof/foftree_build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* \brief routines needed for FOF neighbor tree construction
*/

#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "gadgetconfig.h"
#
#include "../data/allvars.h"
#include "../data/dtypes.h"
Expand Down
4 changes: 2 additions & 2 deletions src/gravity/ewald.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* \brief Code for Ewald correction computations.
*/

#include "../gravity/ewald.h"
#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
Expand All @@ -20,14 +20,14 @@
#include "../data/allvars.h"
#include "../data/dtypes.h"
#include "../data/mymalloc.h"
#include "../gravity/ewald.h"
#include "../gravity/ewaldtensors.h"
#include "../gravtree/gravtree.h"
#include "../io/io.h"
#include "../main/simulation.h"
#include "../mpi_utils/shared_mem_handler.h"
#include "../sort/cxxsort.h"
#include "../system/system.h"
#include "gadgetconfig.h"

/*!
* This file contains the computation of the Ewald correction table, and the corresponding lookup functions.
Expand Down
3 changes: 2 additions & 1 deletion src/gravity/ewald.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef EWALD_H
#define EWALD_H

#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
#include <stdio.h>
Expand All @@ -26,7 +28,6 @@
#include "../gravtree/gravtree.h"
#include "../io/io.h"
#include "../system/system.h"
#include "gadgetconfig.h"

/*!
*
Expand Down
4 changes: 2 additions & 2 deletions src/gravity/ewald_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* \brief some unit test routines for the table look-up in the ewald correction
*/

#include "../gravity/ewald.h"
#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
Expand All @@ -20,13 +20,13 @@
#include "../data/allvars.h"
#include "../data/dtypes.h"
#include "../data/mymalloc.h"
#include "../gravity/ewald.h"
#include "../gravity/ewaldtensors.h"
#include "../gravtree/gravtree.h"
#include "../io/io.h"
#include "../main/simulation.h"
#include "../sort/cxxsort.h"
#include "../system/system.h"
#include "gadgetconfig.h"

#ifdef EWALD_TEST

Expand Down
4 changes: 2 additions & 2 deletions src/gravity/grav_direct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
* \brief calculates forces through direct summation
*/

#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
#include <stdlib.h>
#include <string.h>

#include <algorithm>

#include "../data/allvars.h"
Expand All @@ -29,7 +30,6 @@
#include "../pm/pm.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

#ifdef ALLOW_DIRECT_SUMMATION

Expand Down
3 changes: 2 additions & 1 deletion src/gravity/grav_forcetest.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef GRAV_FORCETEST_H
#define GRAV_FORCETEST_H

#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
#include <stdio.h>
Expand All @@ -23,7 +25,6 @@
#include "../data/simparticles.h"
#include "../domain/domain.h"
#include "../gravtree/gravtree.h"
#include "gadgetconfig.h"

#define TESTGRID 384

Expand Down
3 changes: 2 additions & 1 deletion src/gravity/gravity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* \brief main driver routines for computing the gravitational accelerations for all active particles
*/

#include "gadgetconfig.h"

#include <math.h>
#include <mpi.h>
#include <stdlib.h>
Expand All @@ -28,7 +30,6 @@
#include "../pm/pm.h"
#include "../system/system.h"
#include "../time_integration/timestep.h"
#include "gadgetconfig.h"

/*! \brief This routine computes the gravitational accelerations for all active particles.
*
Expand Down
Loading

0 comments on commit 078ab91

Please sign in to comment.