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
"
23
#include "
base/constant_field_function.h
"
24
#include "
base/boundary_condition_base.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
40
MAST::BoundaryConditionBase
bc1(
MAST::SURFACE_PRESSURE
);
41
REQUIRE( bc1.
type
() ==
MAST::SURFACE_PRESSURE
);
42
43
MAST::BoundaryConditionBase
bc2(
MAST::POINT_LOAD
);
44
MAST::BoundaryConditionBase
bc3(
MAST::POINT_MOMENT
);
45
MAST::BoundaryConditionBase
bc4(
MAST::PISTON_THEORY
);
46
MAST::BoundaryConditionBase
bc5(
MAST::DIRICHLET
);
47
48
MAST::BoundaryConditionBase
bc6(
MAST::TEMPERATURE
);
49
REQUIRE( bc6.
type
() ==
MAST::TEMPERATURE
);
50
51
MAST::BoundaryConditionBase
bc7(
MAST::HEAT_FLUX
);
52
MAST::BoundaryConditionBase
bc8(
MAST::CONVECTION_HEAT_FLUX
);
53
MAST::BoundaryConditionBase
bc9(
MAST::SURFACE_RADIATION_HEAT_FLUX
);
54
MAST::BoundaryConditionBase
bc10(
MAST::HEAT_SOURCE
);
55
REQUIRE( bc10.
type
() ==
MAST::HEAT_SOURCE
);
56
57
MAST::BoundaryConditionBase
bc11(
MAST::NO_SLIP_WALL
);
58
MAST::BoundaryConditionBase
bc12(
MAST::SYMMETRY_WALL
);
59
MAST::BoundaryConditionBase
bc13(
MAST::SLIP_WALL
);
60
MAST::BoundaryConditionBase
bc14(
MAST::FAR_FIELD
);
61
MAST::BoundaryConditionBase
bc15(
MAST::EXHAUST
);
62
MAST::BoundaryConditionBase
bc16(
MAST::ISOTHERMAL
);
63
MAST::BoundaryConditionBase
bc17(
MAST::ADIABATIC
);
64
//MAST::BoundaryConditionBase bc18(MAST::DOF_DIRICHLET);
65
}
TEST_CASE
TEST_CASE("boundary_condition_base", "[boundary_condition][base]")
Definition:
mast_boundary_condition_base.cpp:26
MAST::PISTON_THEORY
Definition:
boundary_condition_base.h:36
MAST::SURFACE_RADIATION_HEAT_FLUX
Definition:
boundary_condition_base.h:41
MAST::ConstantFieldFunction
Definition:
constant_field_function.h:32
MAST::ADIABATIC
Definition:
boundary_condition_base.h:49
MAST::SURFACE_PRESSURE
Definition:
boundary_condition_base.h:31
MAST::NO_SLIP_WALL
Definition:
boundary_condition_base.h:43
MAST::Parameter
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::POINT_LOAD
Definition:
boundary_condition_base.h:34
MAST::HEAT_SOURCE
Definition:
boundary_condition_base.h:42
MAST::POINT_MOMENT
Definition:
boundary_condition_base.h:35
MAST::SLIP_WALL
Definition:
boundary_condition_base.h:45
MAST::ISOTHERMAL
Definition:
boundary_condition_base.h:48
MAST::CONVECTION_HEAT_FLUX
Definition:
boundary_condition_base.h:40
MAST::BoundaryConditionBase
Definition:
boundary_condition_base.h:54
constant_field_function.h
MAST::DIRICHLET
Definition:
boundary_condition_base.h:37
boundary_condition_base.h
MAST::TEMPERATURE
Definition:
boundary_condition_base.h:38
MAST::EXHAUST
Definition:
boundary_condition_base.h:47
MAST::HEAT_FLUX
Definition:
boundary_condition_base.h:39
MAST::BoundaryConditionBase::type
MAST::BoundaryConditionType type() const
Definition:
boundary_condition_base.h:66
MAST::SYMMETRY_WALL
Definition:
boundary_condition_base.h:44
MAST::FAR_FIELD
Definition:
boundary_condition_base.h:46
parameter.h
tests
boundary_condition
mast_boundary_condition_base.cpp
Generated on Fri Jul 24 2020 16:05:45 for MAST by
1.8.13