aboutsummaryrefslogtreecommitdiff
path: root/Source/Initialization/GetVelocity.cpp
blob: 2d2a342a7edd1523911f0027aa0cd43c40b2561b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Copyright 2021 Hannah Klion
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */

#include "GetVelocity.H"

GetVelocity::GetVelocity (VelocityProperties const& vel) noexcept {
    m_type = vel.m_type;
    m_dir = vel.m_dir;
    m_sign_dir = vel.m_sign_dir;
    if (m_type == VelConstantValue) {
        m_velocity = vel.m_velocity;
    }
    else if (m_type == VelParserFunction) {
        m_velocity_parser = vel.m_ptr_velocity_parser->compile<3>();
    }
}