forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 165
Test: UnitTest for module_tddft #2580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
697b359
Merge develop branch to TDDFT branch (#2249)
lyb9812 6ad3493
New propagator for better Convergence (#2253)
ESROAMER ea9f4fd
Update dipole.py (#2270)
Satinelamp 2199171
Simplify matrix multiplication and add new propagator method (#2272)
lyb9812 2899d3d
solve conflicts
lyb9812 2676e97
delete td_htype and update ref of tddft autotests
lyb9812 952088e
delete td_htype
lyb9812 8a1adeb
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 4ac0f2b
refactor tddft code
lyb9812 f1f9204
move read_paramter of electric field to input_conv.cpp for tddft
lyb9812 c72bf06
solve conflicts
lyb9812 2d4e343
sve conflicts
lyb9812 3c9a477
move definition of tag
lyb9812 b93d3bc
convert read_parameter
lyb9812 345b215
add namespace module_tddft
lyb9812 aa8341c
remove tmp file
lyb9812 d8c51cf
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 344dca6
Merge branch 'develop' into refactor_tddft
Qianruipku cb78184
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 fca26fa
move read_paramters of electric field in tddft to input_conv.cpp
lyb9812 7e2c1f1
add force of tddft efield
lyb9812 db18fee
add annotations
lyb9812 2a7f5e6
Merge remote-tracking branch 'deepmodeling/develop' into refactor_tddft
lyb9812 2125f1e
Merge branch 'develop' into refactor_tddft
lyb9812 3d61fe9
move read_parameters from H_TDDFT_pw.cpp to input_conv.cpp
lyb9812 5325b49
add ifdef __LCAO
lyb9812 090ad00
remove input parameter of read_td_efield
lyb9812 328ea91
remove input parameter of read_td_efield
lyb9812 729a668
fix bug for input UTs
lyb9812 4a26b4f
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 1332d40
solve conflicts
lyb9812 f9ca299
change name of parameters of compute_force in H_TDDFT_pw.h
lyb9812 ee10c65
improve annotation
lyb9812 18dfa10
solve conflicts
lyb9812 08e8b48
solve conflicts
lyb9812 a40e106
add UT for read_td_efield
lyb9812 d5104b0
solve conflicts
lyb9812 8b3d637
add ifdef __LCAO
lyb9812 b2335c8
add ifdef __LCAO
lyb9812 d4a48aa
mistake for TEST and TEST_F
lyb9812 fa1b3d9
fix ReadTdEfieldTest
lyb9812 025f9f7
fix ReadTdEfieldTest
lyb9812 1e6563b
add doublenear() for EXPECT_EQ in ReadEfieldTest
lyb9812 73dd38e
add nampspace for doublenear
lyb9812 443e86f
add nampspace for doublenear
lyb9812 49af77d
mistake
lyb9812 cf1107b
replace doublenear with EXPECT_NEAR
lyb9812 14264e0
TEST_F
lyb9812 8098270
Merge branch 'develop' into refactor_tddft
Qianruipku b75098f
Merge branch 'develop' into refactor_tddft
Qianruipku 90e7494
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 39a7c11
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 4916d43
Merge branch 'refactor_tddft' of https://github.com/lyb9812/abacus-de…
lyb9812 ab573e6
delete nband in propagator
lyb9812 075f0f7
add UT for module tddft
lyb9812 0cfa9b0
solve conflicts
lyb9812 f371f4c
comment add_test
lyb9812 4c1b31b
fix bug of prepare() in H_TDDFT_pw.cpp
lyb9812 ca80668
split tddft_test
lyb9812 ba24351
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 7847219
fix bug
lyb9812 0f5fa28
fix bug of UT for tddft
lyb9812 270c57d
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 abcbeb7
add tddft prefix
lyb9812 60eef9e
add UT for cblacs_gridinit
lyb9812 c84c9da
fix bug of UT for tddft
lyb9812 a1af752
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 7d0ca20
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
lyb9812 e7a11c4
fix bug of UT for tddft
lyb9812 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #include "../blacs_connector.h" | ||
|
|
||
| #include <mpi.h> | ||
|
|
||
| #include "gtest/gtest.h" | ||
|
|
||
| /************************************************ | ||
| * unit test of functions in blacs_connector.h | ||
| ***********************************************/ | ||
|
|
||
| /** | ||
| * - Tested Function | ||
| * - Cblacs_gridinit | ||
| * - Initializes a grid of processors with a given number of rows and columns. | ||
| * The function creates a cartesian topology of all the processors initialized | ||
| * by the BLS library. In this topology, each processor is identified by its | ||
| * coordinates (row, col) in the grid. | ||
| */ | ||
|
|
||
| TEST(blacs_connector, Cblacs_gridinit) | ||
| { | ||
| int icontxt; | ||
| char layout[] = "ROW"; | ||
| int nprow = 1; | ||
| int npcol = 1; | ||
|
|
||
| int myid, nprocs; | ||
| Cblacs_pinfo(&myid, &nprocs); | ||
| Cblacs_get(-1, 0, &icontxt); | ||
|
|
||
| // Call the Cblacs_gridinit() function | ||
| Cblacs_gridinit(&icontxt, layout, nprow, npcol); | ||
|
|
||
| // Check if the grid context handle is created successfully | ||
| EXPECT_EQ(icontxt, 0); | ||
| } | ||
|
|
||
| int main(int argc, char** argv) | ||
| { | ||
| int myrank; | ||
| int mysize; | ||
|
|
||
| MPI_Init(&argc, &argv); | ||
| MPI_Comm_size(MPI_COMM_WORLD, &mysize); | ||
| MPI_Comm_rank(MPI_COMM_WORLD, &myrank); | ||
|
|
||
| testing::InitGoogleTest(&argc, argv); | ||
|
|
||
| int result = 0; | ||
| result = RUN_ALL_TESTS(); | ||
| MPI_Finalize(); | ||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,4 +19,8 @@ if(ENABLE_LCAO) | |
| add_coverage(tddft) | ||
| endif() | ||
|
|
||
| IF (BUILD_TESTING) | ||
| add_subdirectory(test) | ||
| endif() | ||
|
|
||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.