-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define, add, and register variables for thermal analysis
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
applications/GeoMechanicsApplication/tests/cpp_tests/test_geo_mechanics_application.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// KRATOS___ | ||
// // ) ) | ||
// // ___ ___ | ||
// // ____ //___) ) // ) ) | ||
// // / / // // / / | ||
// ((____/ / ((____ ((___/ / MECHANICS | ||
// | ||
// License: geo_mechanics_application/license.txt | ||
// | ||
// Main authors: Anne van de Graaf | ||
// | ||
|
||
#include "testing/testing.h" | ||
#include "geo_mechanics_application.h" | ||
|
||
namespace Kratos::Testing | ||
{ | ||
|
||
KRATOS_TEST_CASE_IN_SUITE(ThermalAnalysisVariablesExistAfterRegistration, KratosGeoMechanicsFastSuite) | ||
{ | ||
KratosGeoMechanicsApplication geo_app; | ||
|
||
// Note that when this unit test is run through Python, the variables have already been registered. Therefore, | ||
// checking whether the thermal variables don't exist prior to registration will fail. Presumably after migrating to | ||
// GoogleTest, we can add those checks here as well, to test the effect of `Register()`. | ||
geo_app.Register(); | ||
|
||
const auto variable_names = std::vector<std::string>{"SPECIFIC_HEAT_CAPACITY_WATER", | ||
"SPECIFIC_HEAT_CAPACITY_SOLID", | ||
"THERMAL_CONDUCTIVITY_WATER", | ||
"THERMAL_CONDUCTIVITY_SOLID_XX", | ||
"THERMAL_CONDUCTIVITY_SOLID_YY", | ||
"THERMAL_CONDUCTIVITY_SOLID_ZZ", | ||
"THERMAL_CONDUCTIVITY_SOLID_XY", | ||
"THERMAL_CONDUCTIVITY_SOLID_YZ", | ||
"THERMAL_CONDUCTIVITY_SOLID_XZ", | ||
"LONGITUDINAL_DISPERSIVITY", | ||
"TRANSVERSE_DISPERSIVITY", | ||
"SOLID_COMPRESSIBILITY", | ||
"DT_TEMPERATURE_COEFFICIENT", | ||
"DT_TEMPERATURE", | ||
"NORMAL_HEAT_FLUX"}; | ||
for (const auto& name : variable_names) { | ||
KRATOS_EXPECT_TRUE(KratosComponents<VariableData>::Has(name)) | ||
} | ||
} | ||
|
||
} |