Add external field contribution to OPENMP QEq
This commit is contained in:
@ -232,12 +232,17 @@ void FixQEqReaxFFOMP::compute_H()
|
||||
|
||||
void FixQEqReaxFFOMP::init_storage()
|
||||
{
|
||||
if (field_flag)
|
||||
get_chi_field();
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < NN; i++) {
|
||||
Hdia_inv[i] = 1. / eta[atom->type[i]];
|
||||
b_s[i] = -chi[atom->type[i]];
|
||||
if (field_flag)
|
||||
b_s[i] -= chi_field[i];
|
||||
b_t[i] = -1.0;
|
||||
b_prc[i] = 0;
|
||||
b_prm[i] = 0;
|
||||
@ -274,6 +279,9 @@ void FixQEqReaxFFOMP::pre_force(int /* vflag */)
|
||||
if (n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE)
|
||||
reallocate_matrix();
|
||||
|
||||
if (field_flag)
|
||||
get_chi_field();
|
||||
|
||||
init_matvec();
|
||||
|
||||
if (dual_enabled) {
|
||||
@ -310,6 +318,8 @@ void FixQEqReaxFFOMP::init_matvec()
|
||||
/* init pre-conditioner for H and init solution vectors */
|
||||
Hdia_inv[i] = 1. / eta[atom->type[i]];
|
||||
b_s[i] = -chi[atom->type[i]];
|
||||
if (field_flag)
|
||||
b_s[i] -= chi_field[i];
|
||||
b_t[i] = -1.0;
|
||||
|
||||
// Predictor Step
|
||||
|
||||
Reference in New Issue
Block a user