Skip to content

Commit

Permalink
Tests: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YuLiu98 committed Jul 26, 2024
1 parent e5cce92 commit 85bfd06
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
13 changes: 7 additions & 6 deletions source/module_hamilt_lcao/module_tddft/test/propagator_test1.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <gtest/gtest.h>
#include <module_base/scalapack_connector.h>
#include <mpi.h>

#define private public
#define protected public
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_hamilt_lcao/module_tddft/propagator.h"
#include "module_io/input.h"
#include "module_parameter/parameter.h"
#include "tddft_test.h"

#include <module_base/scalapack_connector.h>
#include <mpi.h>

/************************************************
* unit test of functions in propagator.h
***********************************************/
Expand All @@ -17,7 +19,6 @@
* - compute propagator of method Crank-Nicolson.
*/

Input INPUT;
#define doublethreshold 1e-8
Parallel_Orbitals::Parallel_Orbitals()
{
Expand All @@ -38,7 +39,7 @@ TEST(PropagatorTest, testPropagatorCN)
pv->nloc = nlocal * nlocal;
pv->ncol = nlocal;
pv->coord[0] = pv->coord[1] = 0;
INPUT.mdp.md_dt = 4;
PARAM.input.mdp.md_dt = 4;

// Initialize input matrices
int info;
Expand Down
12 changes: 7 additions & 5 deletions source/module_hamilt_lcao/module_tddft/test/propagator_test2.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <gtest/gtest.h>
#include <module_base/scalapack_connector.h>
#include <mpi.h>

#define private public
#define protected public
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_hamilt_lcao/module_tddft/propagator.h"
#include "module_io/input.h"
#include "module_parameter/parameter.h"
#include "tddft_test.h"

#include <module_base/scalapack_connector.h>
#include <mpi.h>

/************************************************
* unit test of functions in propagator.h
***********************************************/
Expand Down Expand Up @@ -41,7 +43,7 @@ TEST(PropagatorTest, testPropagatorTaylor)
dim[0] = nprow;
dim[1] = npcol;

INPUT.mdp.md_dt = 4;
PARAM.input.mdp.md_dt = 4;

// Initialize input matrices
int info;
Expand Down
12 changes: 7 additions & 5 deletions source/module_hamilt_lcao/module_tddft/test/propagator_test3.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <gtest/gtest.h>
#include <module_base/scalapack_connector.h>
#include <mpi.h>

#define private public
#define protected public
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_hamilt_lcao/module_tddft/propagator.h"
#include "module_io/input.h"
#include "module_parameter/parameter.h"
#include "tddft_test.h"

#include <module_base/scalapack_connector.h>
#include <mpi.h>

/************************************************
* unit test of functions in propagator.h
***********************************************/
Expand Down Expand Up @@ -42,7 +44,7 @@ TEST(PropagatorTest, testPropagatorETRS)
dim[0] = nprow;
dim[1] = npcol;

INPUT.mdp.md_dt = 4;
PARAM.input.mdp.md_dt = 4;

// Initialize input matrices
int info;
Expand Down

0 comments on commit 85bfd06

Please sign in to comment.