-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapted to the changes in libtimestep
- Loading branch information
1 parent
bb0777a
commit 9bcccb8
Showing
9 changed files
with
205 additions
and
31 deletions.
There are no files selected for viewing
Submodule libtimestep
updated
8 files
This file contains 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 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,26 @@ | ||
// | ||
// Created by egor on 1/28/24. | ||
// | ||
|
||
#ifndef LIBGRAN_NO_UNARY_FORCE_H | ||
#define LIBGRAN_NO_UNARY_FORCE_H | ||
|
||
template <typename field_value_t, typename real_t> | ||
struct no_unary_force_functor { | ||
explicit no_unary_force_functor(field_value_t zero_field) : zero_field(std::move(zero_field)) {} | ||
|
||
std::pair<field_value_t, field_value_t> operator () (size_t i [[maybe_unused]], | ||
std::vector<field_value_t> const & x [[maybe_unused]], | ||
std::vector<field_value_t> const & v [[maybe_unused]], | ||
std::vector<field_value_t> const & theta [[maybe_unused]], | ||
std::vector<field_value_t> const & omega [[maybe_unused]], | ||
real_t t [[maybe_unused]]) const { | ||
|
||
return std::make_pair(zero_field, zero_field); | ||
} | ||
|
||
private: | ||
const field_value_t zero_field; | ||
}; | ||
|
||
#endif //LIBGRAN_NO_UNARY_FORCE_H |
This file contains 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 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 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 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 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.