mirror of https://github.com/lammps/lammps.git
switch to 100 chars columnwidth and apply clang-format to a few .cpp files
This commit is contained in:
parent
d8291eea7b
commit
68160e3f22
|
@ -16,7 +16,7 @@ BraceWrapping:
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BreakConstructorInitializers: AfterColon
|
BreakConstructorInitializers: AfterColon
|
||||||
BreakInheritanceList: AfterColon
|
BreakInheritanceList: AfterColon
|
||||||
ColumnLimit: 80
|
ColumnLimit: 100
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentWidth: 2
|
IndentWidth: 2
|
||||||
NamespaceIndentation: Inner
|
NamespaceIndentation: Inner
|
||||||
|
|
39
src/main.cpp
39
src/main.cpp
|
@ -1,4 +1,3 @@
|
||||||
// clang-format off
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
https://lammps.sandia.gov/, Sandia National Laboratories
|
https://lammps.sandia.gov/, Sandia National Laboratories
|
||||||
|
@ -13,19 +12,17 @@
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "lammps.h"
|
#include "lammps.h"
|
||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
#include <mpi.h>
|
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE)
|
|
||||||
#include <fenv.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LAMMPS_EXCEPTIONS)
|
#if defined(LAMMPS_EXCEPTIONS)
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE)
|
||||||
|
#include <fenv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
@ -34,11 +31,11 @@ using namespace LAMMPS_NS;
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
MPI_Init(&argc,&argv);
|
MPI_Init(&argc, &argv);
|
||||||
|
|
||||||
// enable trapping selected floating point exceptions.
|
// enable trapping selected floating point exceptions.
|
||||||
// this uses GNU extensions and is only tested on Linux
|
// this uses GNU extensions and is only tested on Linux
|
||||||
// therefore we make it depend on -D_GNU_SOURCE, too.
|
// therefore we make it depend on -D_GNU_SOURCE, too.
|
||||||
|
|
||||||
#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE)
|
#if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE)
|
||||||
fesetenv(FE_NOMASK_ENV);
|
fesetenv(FE_NOMASK_ENV);
|
||||||
|
@ -50,27 +47,27 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
#ifdef LAMMPS_EXCEPTIONS
|
#ifdef LAMMPS_EXCEPTIONS
|
||||||
try {
|
try {
|
||||||
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
LAMMPS *lammps = new LAMMPS(argc, argv, MPI_COMM_WORLD);
|
||||||
lammps->input->file();
|
lammps->input->file();
|
||||||
delete lammps;
|
delete lammps;
|
||||||
} catch(LAMMPSAbortException &ae) {
|
} catch (LAMMPSAbortException &ae) {
|
||||||
MPI_Abort(ae.universe, 1);
|
MPI_Abort(ae.universe, 1);
|
||||||
} catch(LAMMPSException &e) {
|
} catch (LAMMPSException &e) {
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
exit(1);
|
exit(1);
|
||||||
} catch(fmt::format_error &fe) {
|
} catch (fmt::format_error &fe) {
|
||||||
fprintf(stderr,"fmt::format_error: %s\n", fe.what());
|
fprintf(stderr, "fmt::format_error: %s\n", fe.what());
|
||||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
try {
|
try {
|
||||||
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
LAMMPS *lammps = new LAMMPS(argc, argv, MPI_COMM_WORLD);
|
||||||
lammps->input->file();
|
lammps->input->file();
|
||||||
delete lammps;
|
delete lammps;
|
||||||
} catch(fmt::format_error &fe) {
|
} catch (fmt::format_error &fe) {
|
||||||
fprintf(stderr,"fmt::format_error: %s\n", fe.what());
|
fprintf(stderr, "fmt::format_error: %s\n", fe.what());
|
||||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,8 @@
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
TabularFunction::TabularFunction() :
|
TabularFunction::TabularFunction() :
|
||||||
size(0), xmin(0.0), xmax(0.0), xmaxsq(0.0), rdx(0.0), vmax(0.0),
|
size(0), xmin(0.0), xmax(0.0), xmaxsq(0.0), rdx(0.0), vmax(0.0), xs(nullptr), ys(nullptr),
|
||||||
xs(nullptr), ys(nullptr), ys1(nullptr), ys2(nullptr), ys3(nullptr),
|
ys1(nullptr), ys2(nullptr), ys3(nullptr), ys4(nullptr), ys5(nullptr), ys6(nullptr)
|
||||||
ys4(nullptr), ys5(nullptr), ys6(nullptr)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
954
src/utils.cpp
954
src/utils.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue