MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
mast_boundary_condition_base.cpp
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #include "catch.hpp"
21 
22 #include "base/parameter.h"
25 
26 TEST_CASE("boundary_condition_base",
27  "[boundary_condition][base]")
28 {
29  MAST::Parameter param1("dummy_param", 482.222);
30 
31  MAST::ConstantFieldFunction dummy_f("dummy", param1);
32 
33  // Ensure that this is a derived calss of MAST::FunctionSetBase
34  // This is important becasue we assume that if the FunctionSetBase tests
35  // pass, then all methods that BoundaryConditionBase inherits from it
36  // will automatically pass as well. If this changes, we need to detect
37  // this so we can rewrite these tests for MAST::BoundaryConditionBase.
38  REQUIRE( std::is_base_of<MAST::FunctionSetBase, MAST::BoundaryConditionBase>::value );
39 
41  REQUIRE( bc1.type() == MAST::SURFACE_PRESSURE );
42 
47 
49  REQUIRE( bc6.type() == MAST::TEMPERATURE );
50 
55  REQUIRE( bc10.type() == MAST::HEAT_SOURCE );
56 
64  //MAST::BoundaryConditionBase bc18(MAST::DOF_DIRICHLET);
65 }
TEST_CASE("boundary_condition_base", "[boundary_condition][base]")
This is a scalar function whose value can be changed and one that can be used as a design variable in...
Definition: parameter.h:35
MAST::BoundaryConditionType type() const