Skip to content

Commit

Permalink
Adding unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Jan 30, 2023
1 parent 29aca0b commit 17af662
Show file tree
Hide file tree
Showing 2 changed files with 913 additions and 16 deletions.
5 changes: 5 additions & 0 deletions unit_tests/kernels/UnitTestKernelUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,8 @@ class AMSKernelHex8Mesh : public LowMachKernelHex8Mesh
stk::topology::NODE_RANK, "rans_time_scale")),
minDist_(&meta_->declare_field<ScalarFieldType>(
stk::topology::NODE_RANK, "minimum_distance_to_wall")),
dplus_(&meta_->declare_field<ScalarFieldType>(
stk::topology::NODE_RANK, "dplus_wall_function")),
Mij_(&meta_->declare_field<GenericFieldType>(
stk::topology::NODE_RANK, "metric_tensor")),
fOneBlend_(&meta_->declare_field<ScalarFieldType>(
Expand Down Expand Up @@ -1158,6 +1160,7 @@ class AMSKernelHex8Mesh : public LowMachKernelHex8Mesh
*avgTime_, meta_->universal_part(), 1, nullptr);
stk::mesh::put_field_on_mesh(
*minDist_, meta_->universal_part(), 1, nullptr);
stk::mesh::put_field_on_mesh(*dplus_, meta_->universal_part(), 1, nullptr);
stk::mesh::put_field_on_mesh(
*Mij_, meta_->universal_part(), spatialDim_ * spatialDim_, nullptr);
stk::mesh::put_field_on_mesh(
Expand Down Expand Up @@ -1189,6 +1192,7 @@ class AMSKernelHex8Mesh : public LowMachKernelHex8Mesh
stk::mesh::field_fill(0.6, *avgProd_);
stk::mesh::field_fill(1.0, *avgTime_);
stk::mesh::field_fill(0.7, *minDist_);
unit_test_kernel_utils::dplus_test_function(*bulk_, *coordinates_, *dplus_);
stk::mesh::field_fill(0.2, *Mij_);
unit_test_kernel_utils::tke_test_function(*bulk_, *coordinates_, *tke_);
unit_test_kernel_utils::sdr_test_function(*bulk_, *coordinates_, *sdr_);
Expand All @@ -1215,6 +1219,7 @@ class AMSKernelHex8Mesh : public LowMachKernelHex8Mesh
ScalarFieldType* avgProd_{nullptr};
ScalarFieldType* avgTime_{nullptr};
ScalarFieldType* minDist_{nullptr};
ScalarFieldType* dplus_{nullptr};
GenericFieldType* Mij_{nullptr};
ScalarFieldType* fOneBlend_{nullptr};
GenericFieldType* dudx_{nullptr};
Expand Down
Loading

0 comments on commit 17af662

Please sign in to comment.