Skip to content

Commit

Permalink
user has full control of state_vars now
Browse files Browse the repository at this point in the history
  • Loading branch information
yencal committed Feb 7, 2024
1 parent c6b8506 commit 20dad80
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/EVP/src/init_state_vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ std::vector<std::string> split (std::string s, std::string delimiter);
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems)
Expand Down Expand Up @@ -412,7 +412,7 @@ void init_state_vars(
//});
}
Kokkos::fence();
//state_vars.update_host();
state_vars.update_host();

printf("user_mat_init completed\n");

Expand Down
3 changes: 2 additions & 1 deletion src/EVPFFT/src/Fierro-EVPFFT-Link/init_state_vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace mtr;
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems)
Expand All @@ -20,6 +20,7 @@ void init_state_vars(
state_vars.host(elem_gid,var) = 0.0;
}
}
state_vars.update_device();

return;
}
3 changes: 2 additions & 1 deletion src/LS-EVPFFT/src/Fierro-LS-EVPFFT-Link/init_state_vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace mtr;
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems)
Expand All @@ -20,6 +20,7 @@ void init_state_vars(
state_vars.host(elem_gid,var) = 0.0;
}
}
state_vars.update_device();

return;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace mtr;
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems)
Expand All @@ -20,6 +20,7 @@ void init_state_vars(
state_vars.host(elem_gid,var) = 0.0;
}
}
state_vars.update_device();

return;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace mtr;
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems)
Expand All @@ -20,6 +20,7 @@ void init_state_vars(
state_vars.host(elem_gid,var) = 0.0;
}
}
state_vars.update_device();

return;
}
2 changes: 1 addition & 1 deletion src/Parallel-Solvers/Material-Models/material_models.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ struct strength_t {
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
const DCArrayKokkos <double> &state_vars,
DCArrayKokkos <double> &state_vars,
const DCArrayKokkos <double> &global_vars,
const DCArrayKokkos <double> &elem_user_output_vars,
const size_t num_elems);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,6 @@ void FEA_Module_Dynamic_Elasticity::setup(){
global_vars,
elem_user_output_vars,
rnum_elem);
state_vars.update_device();

// initialize strength model
init_strength_model(elem_strength,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,6 @@ void FEA_Module_SGH::setup(){
global_vars,
elem_user_output_vars,
rnum_elem);
state_vars.update_device();

// initialize strength model
init_strength_model(elem_strength,
Expand Down

0 comments on commit 20dad80

Please sign in to comment.