Skip to content

Commit

Permalink
Revert back to curly bracket ctor for std::vector
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Dec 24, 2024
1 parent ea03c48 commit 04fa573
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/non_uniform_heat_equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ int main(int argc, char** argv)
std::size_t const size_x = x_domain_vect.size();

//! [ghost_points_x]
std::vector<double> const x_pre_ghost_vect(
std::vector<double> const x_pre_ghost_vect {
x_domain_vect.front()
- (x_domain_vect.back() - x_domain_vect[size_x - 2]));
- (x_domain_vect.back() - x_domain_vect[size_x - 2])};

std::vector<double> const x_post_ghost_vect(
std::vector<double> const x_post_ghost_vect {
x_domain_vect.back()
+ (x_domain_vect[1] - x_domain_vect.front()));
+ (x_domain_vect[1] - x_domain_vect.front())};
//! [ghost_points_x]

//! [build-domains]
Expand All @@ -193,12 +193,12 @@ int main(int argc, char** argv)
std::size_t const size_y = y_domain_vect.size();

//! [ghost_points_y]
std::vector<double> const y_pre_ghost_vect(
std::vector<double> const y_pre_ghost_vect {
y_domain_vect.front()
- (y_domain_vect.back() - y_domain_vect[size_y - 2]));
std::vector<double> const y_post_ghost_vect(
- (y_domain_vect.back() - y_domain_vect[size_y - 2])};
std::vector<double> const y_post_ghost_vect {
y_domain_vect.back()
+ (y_domain_vect[1] - y_domain_vect.front()));
+ (y_domain_vect[1] - y_domain_vect.front())};
//! [ghost_points_y]
//! [Y-vectors]

Expand Down

0 comments on commit 04fa573

Please sign in to comment.