145 params.num_points, 0.0, params.length)),
166 solution_.segment(num_points, num_points) =
179 [[nodiscard]]
auto solution() ->
const Eigen::VectorXd& {
Definition of assertion macros.
#define NUM_COLLECT_ASSERT(CONDITION)
Macro to check whether a condition is satisfied.
Class of ODE problem to solve 1D wave equation of strings discretized using finite difference.
void evaluate_on(scalar_type, const variable_type &variable, num_collect::ode::evaluation_type)
Evaluate on a (time, variable) pair.
static constexpr auto allowed_evaluations
Allowed evaluations.
variable_type points_
Spatial points.
num_collect::index_type num_points_
Number of points.
auto points() const noexcept -> const variable_type &
Get the spacial points.
auto diff_coeff() const noexcept -> const variable_type &
Get the differential coefficient.
variable_type diff_coeff_
Differential coefficient.
Eigen::VectorXd variable_type
Type of variables.
string_wave_1d_problem(const string_wave_1d_parameters ¶ms)
Constructor.
double scalar_type
Type of scalars.
Class to calculate exact solution of string_wave_1d_problem.
Eigen::VectorXd solution_
Solution.
void evaluate_on(double time)
Evaluate solution.
auto solution() -> const Eigen::VectorXd &
Get the solution.
Eigen::VectorXd points_
Spatial points.
string_wave_1d_solution(const string_wave_1d_parameters ¶ms)
Constructor.
Definition of evaluation_type enumeration.
Definition of index_type type.
Namespace of Eigen library.
std::ptrdiff_t index_type
Type of indices in this library.
constexpr T pi
Value of pi, .
Namespace of ordinary differential equation problems.
Struct to specify types of evaluations.
Struct of parameters in string_wave_1d_problem.
double speed
Speed of the wave.
double length
Length of the space.
num_collect::index_type num_points
Number of spatial points.