Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hdr/create.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ int create_crystal_structure(std::vector<cs::catom_t> &);

int voronoi_film(std::vector<cs::catom_t> &);

int voronoi_radical_film(std::vector<cs::catom_t> &);

void generate_multilayers(std::vector<cs::catom_t> & catom_array);

}
Expand Down
11 changes: 11 additions & 0 deletions hdr/voronoi_radical.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef CREATE_VORONOI_RADICAL_H_
#define CREATE_VORONOI_RADICAL_H_
//==========================================================
// Namespace create_radical_voronoi
//==========================================================
namespace create_radical_voronoi{
extern bool rounded;
extern double voronoi_sd;/// Standard Deviation of voronoi grains
}

#endif //CREATE_VORONOI_RADICAL_H_
49 changes: 25 additions & 24 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ MPIICC=mpiicpc -DMPICF
LIBS= -lstdc++
#-lm $(FFTLIBS) -L/opt/local/lib/

CCC_CFLAGS=-I./hdr -I./src/qvoronoi -O0
CCC_LDFLAGS=-I./hdr -I./src/qvoronoi -O0
CCC_CFLAGS=-I./hdr -I./src/qvoronoi -I./src/voro++ -O0
CCC_LDFLAGS=-I./hdr -I./src/qvoronoi -I./src/voro++ -O0

export LANG=C
export LC_ALL=C
Expand All @@ -40,41 +40,41 @@ export LC_ALL=C
CUDALIBS=-L/usr/local/cuda/lib64/ -lcuda -lcudart

# Debug Flags
ICC_DBCFLAGS= -O0 -C -I./hdr -I./src/qvoronoi
ICC_DBLFLAGS= -C -I./hdr -I./src/qvoronoi
ICC_DBCFLAGS= -O0 -C -I./hdr -I./src/qvoronoi -I./src/voro++
ICC_DBLFLAGS= -C -I./hdr -I./src/qvoronoi -I./src/voro++

GCC_DBCFLAGS= -g -pg -fprofile-arcs -ftest-coverage -Wall -Wextra -O0 -fbounds-check -pedantic -std=c++0x -Wno-long-long -I./hdr -I./src/qvoronoi -Wsign-compare
GCC_DBLFLAGS= -g -pg -fprofile-arcs -ftest-coverage -lstdc++ -std=c++0x -fbounds-check -I./hdr -I./src/qvoronoi -Wsign-compare
GCC_DBCFLAGS= -g -pg -fprofile-arcs -ftest-coverage -Wall -Wextra -O0 -fbounds-check -pedantic -std=c++0x -Wno-long-long -I./hdr -I./src/qvoronoi -I./src/voro++ -Wsign-compare
GCC_DBLFLAGS= -g -pg -fprofile-arcs -ftest-coverage -lstdc++ -std=c++0x -fbounds-check -I./hdr -I./src/qvoronoi -I./src/voro++ -Wsign-compare

PCC_DBCFLAGS= -O0 -I./hdr -I./src/qvoronoi
PCC_DBLFLAGS= -O0 -I./hdr -I./src/qvoronoi
IBM_DBCFLAGS= -O0 -Wall -pedantic -Wextra -I./hdr -I./src/qvoronoi
IBM_DBLFLAGS= -O0 -Wall -pedantic -Wextra -I./hdr -I./src/qvoronoi
PCC_DBCFLAGS= -O0 -I./hdr -I./src/qvoronoi -I./src/voro++
PCC_DBLFLAGS= -O0 -I./hdr -I./src/qvoronoi -I./src/voro++
IBM_DBCFLAGS= -O0 -Wall -pedantic -Wextra -I./hdr -I./src/qvoronoi -I./src/voro++
IBM_DBLFLAGS= -O0 -Wall -pedantic -Wextra -I./hdr -I./src/qvoronoi -I./src/voro++

LLVM_DBCFLAGS= -Wall -Wextra -O0 -pedantic -std=c++11 -Wno-long-long -I./hdr -I./src/qvoronoi -Wsign-compare
LLVM_DBLFLAGS= -Wall -Wextra -O0 -lstdc++ -I./hdr -I./src/qvoronoi -Wsign-compare
LLVM_DBCFLAGS= -Wall -Wextra -O0 -pedantic -std=c++11 -Wno-long-long -I./hdr -I./src/qvoronoi -I./src/voro++ -Wsign-compare
LLVM_DBLFLAGS= -Wall -Wextra -O0 -lstdc++ -I./hdr -I./src/qvoronoi -I./src/voro++ -Wsign-compare

# Performance Flags
ICC_CFLAGS= -O3 -axCORE-AVX2 -fno-alias -align -falign-functions -I./hdr -I./src/qvoronoi
ICC_LDFLAGS= -I./hdr -I./src/qvoronoi -axCORE-AVX2
ICC_CFLAGS= -O3 -axCORE-AVX2 -fno-alias -align -falign-functions -I./hdr -I./src/qvoronoi -I./src/voro++
ICC_LDFLAGS= -I./hdr -I./src/qvoronoi -I./src/voro++ -axCORE-AVX2
#ICC_CFLAGS= -O3 -xT -ipo -static -fno-alias -align -falign-functions -vec-report -I./hdr
#ICC_LDFLAGS= -lstdc++ -ipo -I./hdr -xT -vec-report

LLVM_CFLAGS= -Wall -pedantic -O3 -mtune=native -funroll-loops -I./hdr -I./src/qvoronoi
LLVM_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi
LLVM_CFLAGS= -Wall -pedantic -O3 -mtune=native -funroll-loops -I./hdr -I./src/qvoronoi -I./src/voro++
LLVM_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi -I./src/voro++

GCC_CFLAGS=-O3 -mtune=native -funroll-all-loops -fexpensive-optimizations -funroll-loops -I./hdr -I./src/qvoronoi -std=c++11 -Wsign-compare
GCC_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi -Wsign-compare
GCC_CFLAGS=-O3 -mtune=native -funroll-all-loops -fexpensive-optimizations -funroll-loops -I./hdr -I./src/qvoronoi -I./src/voro++ -std=c++11 -Wsign-compare
GCC_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi -I./src/voro++ -Wsign-compare

PCC_CFLAGS=-O2 -march=barcelona -ipa -I./hdr -I./src/qvoronoi
PCC_LDFLAGS= -I./hdr -I./src/qvoronoi -O2 -march=barcelona -ipa
PCC_CFLAGS=-O2 -march=barcelona -ipa -I./hdr -I./src/qvoronoi -I./src/voro++
PCC_LDFLAGS= -I./hdr -I./src/qvoronoi -I./src/voro++ -O2 -march=barcelona -ipa


IBM_CFLAGS=-O5 -qarch=450 -qtune=450 -I./hdr -I./src/qvoronoi
IBM_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi -O5 -qarch=450 -qtune=450
IBM_CFLAGS=-O5 -qarch=450 -qtune=450 -I./hdr -I./src/qvoronoi -I./src/voro++
IBM_LDFLAGS= -lstdc++ -I./hdr -I./src/qvoronoi -I./src/voro++ -O5 -qarch=450 -qtune=450

CRAY_CFLAGS= -O3 -hfp3 -I./hdr -I./src/qvoronoi
CRAY_LDFLAGS= -I./hdr -I./src/qvoronoi
CRAY_CFLAGS= -O3 -hfp3 -I./hdr -I./src/qvoronoi -I./src/voro++
CRAY_LDFLAGS= -I./hdr -I./src/qvoronoi -I./src/voro++


# Save git commit in simple function
Expand Down Expand Up @@ -153,6 +153,7 @@ include src/statistics/makefile
include src/unitcell/makefile
include src/vio/makefile
include src/environment/makefile
include src/voro++/makefile

# Cuda must be last for some odd reason
include src/cuda/makefile
Expand Down
2 changes: 2 additions & 0 deletions src/create/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ namespace create{
double voronoi_grain_size = 50.0;
double voronoi_grain_spacing = 10.0;

double voronoi_tiny_grain_chance = 0.0;

double bubble_radius = 0.3333;
double bubble_nucleation_height = 0.0;

Expand Down
16 changes: 16 additions & 0 deletions src/create/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "create.hpp"
#include "vio.hpp"
#include "voronoi.hpp"
#include "voronoi_radical.hpp"
#include "random.hpp"
// Internal sim header
#include "internal.hpp"
Expand Down Expand Up @@ -141,6 +142,11 @@ namespace create{
cs::system_creation_flags[2]=3;
return true;
}
test="laguerre-voronoi-film";
if(word==test){
cs::system_creation_flags[2]=5;
return true;
}
test="voronoi-grain-substructure";
if(word==test){
create::internal::generate_voronoi_substructure = true;
Expand All @@ -156,6 +162,7 @@ namespace create{
double vsd=atof(value.c_str());
vin::check_for_valid_value(vsd, word, line, prefix, unit, "none", 0.0, 1.0,"input","0.0 - 1.0");
create_voronoi::voronoi_sd=vsd;
create_radical_voronoi::voronoi_sd=vsd;
return true;
}
//--------------------------------------------------------------------
Expand All @@ -175,6 +182,7 @@ namespace create{
test="voronoi-rounded-grains";
if(word==test || word == "rounded-grains"){
create_voronoi::rounded=true;
create_radical_voronoi::rounded=true;
return true;
}
test="voronoi-include-boundary-grains";
Expand Down Expand Up @@ -444,6 +452,14 @@ namespace create{
return true;
}
//--------------------------------------------------------------------
test="voronoi-tiny-grain-chance";
if(word==test){
double tgchance=atof(value.c_str());
vin::check_for_valid_value(tgchance, word, line, prefix, unit, "none", 0.0, 1.0,"input","0.0 - 1.0");
create::internal::voronoi_tiny_grain_chance=tgchance;
return true;
}
//--------------------------------------------------------------------
test="cone";
if(word==test){
cs::system_creation_flags[1]=8;
Expand Down
2 changes: 2 additions & 0 deletions src/create/internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ namespace create{
extern double voronoi_grain_size;
extern double voronoi_grain_spacing;

extern double voronoi_tiny_grain_chance;

extern double bubble_radius;
extern double bubble_nucleation_height;

Expand Down
1 change: 1 addition & 0 deletions src/create/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ voronoi.o \
voronoi_grain_rounding.o \
voronoi_substructure.o \
voronoi_vertex_points.o \
voronoi_radical.o \
write_grain_vertices.o

# Append module objects to global tree
Expand Down
4 changes: 4 additions & 0 deletions src/create/system_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ int create_system_type(std::vector<cs::catom_t> & catom_array){
err::vexit();
break;

case 5: // Radical Voronoi Granular Film
voronoi_radical_film(catom_array);
break;

default:{
std::cerr << "Unknown system type requested, exiting" << std::endl;
err::vexit();
Expand Down
Loading