Skip to content

Commit

Permalink
add: Cp continuity across periodic boundaries test
Browse files Browse the repository at this point in the history
  • Loading branch information
timovanopstal committed Feb 23, 2017
1 parent ddace43 commit 150484d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Apps/Common/Test/TestMultiPatchModelGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,23 @@ TEST(TestMultiPatchModelGenerator3D, SubdivisionsMixed)
}


TEST(TestMultiPatchModelGenerator2D, SubdivisionsPeriodic)
{
ASMmxBase::Type = ASMmxBase::FULL_CONT_RAISE_BASIS1;
SIMMultiPatchModelGen<SIM2D> sim({1,1});
ASSERT_TRUE(sim.read("refdata/modelgen2d_subdivision_periodic.xinp"));
const SIM3D::PatchVec& model = sim.getFEModel();
sim.preprocess();

std::vector<std::vector<int>> mlgn =
{{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23},
{4,5,1,2,9,10,6,7,14,15,11,12,19,24,16,23,25,20}};

for (int i=0; i<2; i++)
check_vector_int_equals(mlgn[i], model[i]->getMyNodeNums());
}


struct SubPatchTest {
int n; // number of coefs in total model
int p; // polynomial order of basis
Expand Down
11 changes: 11 additions & 0 deletions Apps/Common/Test/refdata/modelgen2d_subdivision_periodic.xinp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<simulation>
<geometry dim="2" periodic_x="12" sets="true">
<subdivision nx="2">
<refine patch="1" u="4" v="0"/>
</subdivision>
</geometry>
<boundaryconditions>
<dirichlet set="Edge1" basis="1" comp="1"/>
</boundaryconditions>
</simulation>

0 comments on commit 150484d

Please sign in to comment.