120 static size_t step_f(
Nbc);
124 for(
size_t i(3); i < Y.
EMF().
dim(); ++i){
125 for(
int e(0); e <
Nbc; e++) {
142 static size_t step_f(
Nbc);
147 MPI_Recv(
msg_bufX,
msg_sizeX, MPI_DOUBLE_COMPLEX, origin, 0, MPI_COMM_WORLD, &status);
150 for(
int i(3); i < Y.
EMF().
dim(); ++i){
151 for(
int e(0); e <
Nbc; e++) {
166 static size_t step_f(
Nbc);
170 for(
int i(3); i < Y.
EMF().
dim(); ++i){
171 for(
int e(0); e <
Nbc; e++) {
188 static size_t step_f(
Nbc);
193 MPI_Recv(
msg_bufX,
msg_sizeX, MPI_DOUBLE_COMPLEX, origin, 1, MPI_COMM_WORLD, &status);
196 for(
int i(3); i < Y.
EMF().
dim(); ++i){
197 for(
int e(0); e <
Nbc; e++) {
220 size_t Nx(Y.
SH(0,0,0).
numx());
223 for(
int i(3); i < Y.
EMF().
dim(); ++i){
224 for (
int c(0); c <
Nbc; ++c)
225 Y.
FLD(i)(c) = Y.
FLD(i)(2*Nbc-c-1);
229 for(
int c(0); c <
Nbc; ++c) {
230 Y.
EMF().
Bx()(c) *= -1.0;
242 size_t Nx(Y.
SH(0,0,0).
numx());
245 for(
int i(3); i < Y.
EMF().
dim(); ++i){
246 for (
int c(0); c <
Nbc; ++c)
247 Y.
FLD(i)(Nx-c-1) = Y.
FLD(i)(Nx-2*Nbc+c);
251 for(
int c(0); c <
Nbc; ++c) {
252 Y.
EMF().
Bx()(Nx-1-c) *= -1.0;
277 cout<<
"Not a valid boundary condition." << endl;
290 for(
int i(3); i < Y.
EMF().
dim(); ++i)
291 for(
int c(0); c <
Nbc; c++) {
296 for(
int i(3); i < Y.
EMF().
dim(); ++i)
297 for(
int c(0); c <
Nbc; c++) {
310 size_t Nx(Y.
SH(0,0,0).
numx());
313 for(
int i(3); i < Y.
EMF().
dim(); ++i){
315 for (
int c(0); c <
Nbc; ++c)
316 Y.
FLD(i)(Nx-c-1) = Y.
FLD(i)(Nx-2*Nbc+c);
318 for (
int c(0); c <
Nbc; ++c)
319 Y.
FLD(i)(c) = Y.
FLD(i)(2*Nbc-c-1);
323 for (
int c(0); c <
Nbc; ++c) {
324 Y.
EMF().
Bx()(c) *= -1.0;
325 Y.
EMF().
Bx()(Nx-Nbc+c) *= -1.0;
355 for(
int s(0); s <
numspec; ++s) {
403 static size_t step_f(
Nbc);
407 for(
int s(0); s < Y.
Species(); ++s) {
408 for(
size_t i = 0; i < Y.
DF(s).
dim(); ++i){
409 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
410 for(
int e(0); e <
Nbc; e++) {
418 for(
size_t i = 0; i < Y.
EMF().
dim(); ++i){
419 for(
int e(0); e <
Nbc; e++) {
428 for(
int e(0); e <
Nbc; e++) {
433 for(
int e(0); e <
Nbc; e++) {
438 for(
int e(0); e <
Nbc; e++) {
443 for(
int e(0); e <
Nbc; e++) {
449 for(
int e(0); e <
Nbc; e++) {
455 for(
int e(0); e <
Nbc; e++) {
472 static size_t step_f(
Nbc);
477 MPI_Recv(
msg_bufX,
msg_sizeX, MPI_DOUBLE_COMPLEX, origin, 0, MPI_COMM_WORLD, &status);
480 for(
int s(0); s < Y.
Species(); ++s) {
481 for(
int i = 0; i < Y.
DF(s).
dim(); ++i){
482 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
483 for(
int e(0); e <
Nbc; e++) {
493 for(
int i = 0; i < Y.
EMF().
dim(); ++i){
494 for(
int e(0); e <
Nbc; e++) {
503 for(
int e(0); e <
Nbc; e++) {
509 for(
int e(0); e <
Nbc; e++) {
515 for(
int e(0); e <
Nbc; e++) {
521 for(
int e(0); e <
Nbc; e++) {
527 for(
int e(0); e <
Nbc; e++) {
533 for(
int e(0); e <
Nbc; e++) {
551 static size_t step_f(
Nbc);
555 for(
int s(0); s < Y.
Species(); ++s) {
556 for(
int i = 0; i < Y.
DF(s).
dim(); ++i){
557 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
558 for(
int e(0); e <
Nbc; e++) {
559 msg_bufX[bufind + e] = (Y.
DF(s)(i))(p, Nbc+e);
566 for(
int i = 0; i < Y.
EMF().
dim(); ++i){
567 for(
int e(0); e <
Nbc; e++) {
576 for(
int e(0); e <
Nbc; e++) {
581 for(
int e(0); e <
Nbc; e++) {
587 for(
int e(0); e <
Nbc; e++) {
593 for(
int e(0); e <
Nbc; e++) {
599 for(
int e(0); e <
Nbc; e++) {
605 for(
int e(0); e <
Nbc; e++) {
623 static size_t step_f(
Nbc);
628 MPI_Recv(
msg_bufX,
msg_sizeX, MPI_DOUBLE_COMPLEX, origin, 1, MPI_COMM_WORLD, &status);
631 for(
int s(0); s < Y.
Species(); ++s) {
632 for(
int i = 0; i < Y.
DF(s).
dim(); ++i){
633 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
634 for(
int e(0); e <
Nbc; e++) {
642 for(
int i = 0; i < Y.
EMF().
dim(); ++i){
643 for(
int e(0); e <
Nbc; e++) {
652 for(
int e(0); e <
Nbc; e++) {
658 for(
int e(0); e <
Nbc; e++) {
664 for(
int e(0); e <
Nbc; e++) {
670 for(
int e(0); e <
Nbc; e++) {
676 for(
int e(0); e <
Nbc; e++) {
682 for(
int e(0); e <
Nbc; e++) {
706 size_t Nx(Y.
SH(0,0,0).
numx());
709 for(
int s(0); s < Y.
Species(); ++s) {
710 for(
int l(0); l < Y.
DF(s).
l0(); ++l){
711 for(
int m(0); m < ((Y.
DF(s).
m0() < l)? Y.
DF(s).
m0():l)+1; ++m){
712 sign = 1-2*((l+m)%2);
714 for (
int c(0); c <
Nbc; ++c) {
715 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
716 Y.
SH(s,l,m)(p, c) = Y.
SH(s,l,m)(p, 2*Nbc-c-1);
717 Y.
SH(s,l,m)(p, c) *= sign;
726 for(
int i(0); i < Y.
EMF().
dim(); ++i){
727 for (
int c(0); c <
Nbc; ++c)
728 Y.
FLD(i)(c) = Y.
FLD(i)(2*Nbc-c-1);
731 for (
int c(0); c <
Nbc; ++c) {
733 Y.
EMF().
Ey()(c) *= -1.0;
735 Y.
EMF().
Ez()(c) *= -1.0;
737 Y.
EMF().
Bx()(c) *= -1.0;
745 for(
int c(0); c <
Nbc; c++) {
764 size_t Nx(Y.
SH(0,0,0).
numx());
767 for(
int s(0); s < Y.
Species(); ++s) {
768 for(
int l(0); l < Y.
DF(s).
l0(); ++l){
769 for(
int m(0); m < ((Y.
DF(s).
m0() < l)? Y.
DF(s).
m0():l)+1; ++m){
770 sign = 1-2*((l+m)%2);
772 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
773 for (
int c(0); c <
Nbc; ++c) {
774 Y.
SH(s,l,m)(p, Nx-c-1) = Y.
SH(s,l,m)(p, Nx-2*Nbc+c);
775 Y.
SH(s,l,m)(p, Nx-c-1) *= sign;
784 for(
int i(0); i < Y.
EMF().
dim(); ++i){
785 for (
int c(0); c <
Nbc; ++c)
786 Y.
FLD(i)(Nx-c-1) = Y.
FLD(i)(Nx-2*Nbc+c);
789 for (
int c(0); c <
Nbc; ++c) {
791 Y.
EMF().
Ey()(Nx-c-1) *= -1.0;
793 Y.
EMF().
Ez()(Nx-c-1) *= -1.0;
795 Y.
EMF().
Bx()(Nx-c-1) *= -1.0;
803 for(
int c(0); c <
Nbc; c++) {
835 cout<<
"Not a valid boundary condition." << endl;
848 for(
int s(0); s < Y.
Species(); ++s) {
849 for(
int i(0); i < Y.
DF(s).
dim(); ++i) {
850 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
851 for(
int c(0); c <
Nbc; c++) {
852 (Y.
DF(s)(i))(p, c) = (Y.
DF(s)(i))(p, Y.
EMF().
Ex().
numx()-2*Nbc+c);
859 for(
int i(0); i < Y.
EMF().
dim(); ++i) {
860 for(
int c(0); c <
Nbc; c++) {
869 for(
int s(0); s < Y.
Species(); ++s) {
870 for(
int i(0); i < Y.
DF(s).
dim(); ++i) {
871 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
872 for(
int c(0); c <
Nbc; c++) {
875 (Y.
DF(s)(i))(p, Y.
EMF().
Ex().
numx()-Nbc+c) = (Y.
DF(s)(i))(p, Nbc+c);
887 for(
int i(0); i < Y.
EMF().
dim(); ++i) {
888 for(
int c(0); c <
Nbc; c++) {
909 for(
int c(0); c <
Nbc; c++) {
921 for(
int c(0); c <
Nbc; c++) {
943 size_t Nx(Y.
SH(0,0,0).
numx());
946 for(
int s(0); s < Y.
Species(); ++s) {
947 for(
int l(0); l < Y.
DF(s).
l0(); ++l){
948 for(
int m(0); m < ((Y.
DF(s).
m0() < l)? Y.
DF(s).
m0():l)+1; ++m){
949 sign = 1-2*((l+m)%2);
952 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
953 for (
int c(0); c <
Nbc; ++c) {
954 Y.
SH(s,l,m)(p, Nx-c-1) = Y.
SH(s,l,m)(p, Nx-2*Nbc+c);
955 Y.
SH(s,l,m)(p, Nx-c-1) *= sign;
960 for(
int p(0); p < Y.
SH(s,0,0).
nump(); ++p) {
961 for (
int c(0); c <
Nbc; ++c) {
962 Y.
SH(s,l,m)(p, c) = Y.
SH(s,l,m)(p, 2*Nbc-c-1);
963 Y.
SH(s,l,m)(p, c) *= sign;
972 for(
int i(0); i < Y.
EMF().
dim(); ++i){
974 for (
int c(0); c <
Nbc; ++c)
975 Y.
FLD(i)(Nx-c-1) = Y.
FLD(i)(Nx-2*Nbc+c);
977 for (
int c(0); c <
Nbc; ++c)
978 Y.
FLD(i)(c) = Y.
FLD(i)(2*Nbc-c-1);
981 for(
int c(0); c <
Nbc; c++) {
983 Y.
EMF().
Ey()(Nx-Nbc+c) *= -1.0;
984 Y.
EMF().
Ey()(c) *= -1.0;
987 Y.
EMF().
Ez()(Nx-Nbc+c) *= -1.0;
988 Y.
EMF().
Ez()(c) *= -1.0;
991 Y.
EMF().
Bx()(Nx-Nbc+c) *= -1.0;
992 Y.
EMF().
Bx()(c) *= -1.0;
999 for(
int c(0); c <
Nbc; c++) {
1004 for(
int c(0); c <
Nbc; c++) {
1031 MPI_Comm_size(MPI_COMM_WORLD, &
Nnodes);
1032 MPI_Comm_rank(MPI_COMM_WORLD, &
rank);
1074 std::cout <<
"Not enough cells per processor" << endl;
1078 std:: cout <<
"the number of nodes in the input deck is " 1104 int moduloX(
RANK()%2);
1121 cout<<
"Invalid Boundary." << endl;
1138 cout<<
"Invalid Boundary." << endl;;
1156 int moduloX(
RANK() % 2);
1169 }
else if (
RANK() == 0) {
1180 }
else if (
BNDX() == 1) {
1186 }
else if (
RANK() == 0) {
1197 cout <<
"Invalid Boundary." << endl;
void Recv_from_left_X(State1D &Y, int origin)
void Recv_from_left_X(State1D &Y, int origin)
void sameNode_bound_X(State1D &Y)
void Send_left_X(State1D &Y, int dest)
Underlying data structures.
~Node_ImplicitE_Communications()
complex< double > * msg_bufX
void sameNode_bound_X(State1D &Y)
Node_ImplicitE_Communications Bfield_Data
void Send_right_X(State1D &Y, int dest)
void sameNode_periodic_X(State1D &Y)
Node_Communications X_Data
void Neighbor_Communications(State1D &Y)
void mirror_bound_Xleft(State1D &Y)
void Neighbor_ImplicitE_Communications(State1D &Y)
void Send_left_X(State1D &Y, int dest)
void Recv_from_right_X(State1D &Y, int origin)
void mirror_bound_Xright(State1D &Y)
double & temperature(size_t i)
void Send_right_X(State1D &Y, int dest)
void sameNode_mirror_X(State1D &Y)
DistFunc1D & DF(size_t s)
SHarmonic1D & SH(size_t s, size_t lh, size_t mh)
Parallel_Environment_1D()
void sameNode_periodic_X(State1D &Y)
Fields, Distributions, Harmonics, States - Declarations.
void Recv_from_right_X(State1D &Y, int origin)
void sameNode_mirror_X(State1D &Y)
~Parallel_Environment_1D()
Field1D & FLD(size_t ip) const
double & density(size_t i)
void mirror_bound_Xleft(State1D &Y)
complex< double > * msg_bufX
Node_ImplicitE_Communications()
void mirror_bound_Xright(State1D &Y)