Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MFEM deprecated warnings #278

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/dmd/nonlinear_elasticity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ int main(int argc, char *argv[])
dmd_x.push_back(new CAROM::DMD(x_gf.GetTrueVector().Size(), dt));
dmd_v.push_back(new CAROM::DMD(v_gf.GetTrueVector().Size(), dt));

dmd_x[curr_window]->takeSample(x_gf.GetTrueVector(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector(), t);
dmd_x[curr_window]->takeSample(x_gf.GetTrueVector().GetData(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector().GetData(), t);
ts.push_back(t);

dmd_training_timer.Stop();
Expand All @@ -510,8 +510,8 @@ int main(int argc, char *argv[])

dmd_training_timer.Start();

dmd_x[curr_window]->takeSample(x_gf.GetTrueVector(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector(), t);
dmd_x[curr_window]->takeSample(x_gf.GetTrueVector().GetData(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector().GetData(), t);

if (last_step || (ti % windowNumSamples) == 0)
{
Expand Down Expand Up @@ -546,8 +546,8 @@ int main(int argc, char *argv[])
dmd_x.push_back(new CAROM::DMD(x_gf.GetTrueVector().Size(), dt));
dmd_v.push_back(new CAROM::DMD(v_gf.GetTrueVector().Size(), dt));

dmd_x[curr_window]->takeSample(x_gf.GetTrueVector(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector(), t);
dmd_x[curr_window]->takeSample(x_gf.GetTrueVector().GetData(), t);
dmd_v[curr_window]->takeSample(v_gf.GetTrueVector().GetData(), t);
}
}

Expand Down
6 changes: 3 additions & 3 deletions examples/dmd/wave_equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ int main(int argc, char *argv[])
int curr_window = 0;
vector<CAROM::DMD*> dmd_u;
dmd_u.push_back(new CAROM::DMD(u.Size(), dt));
dmd_u[curr_window]->takeSample(u, t);
dmd_u[curr_window]->takeSample(u.GetData(), t);
ts.push_back(t);

dmd_training_timer.Stop();
Expand All @@ -467,7 +467,7 @@ int main(int argc, char *argv[])
fom_timer.Stop();

dmd_training_timer.Start();
dmd_u[curr_window]->takeSample(u, t);
dmd_u[curr_window]->takeSample(u.GetData(), t);

if (last_step || (ti % windowNumSamples) == 0)
{
Expand All @@ -488,7 +488,7 @@ int main(int argc, char *argv[])
if (!last_step) {
curr_window++;
dmd_u.push_back(new CAROM::DMD(u.Size(), dt));
dmd_u[curr_window]->takeSample(u, t);
dmd_u[curr_window]->takeSample(u.GetData(), t);
}

}
Expand Down
12 changes: 6 additions & 6 deletions examples/prom/nonlinear_elasticity_global_rom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1203,16 +1203,16 @@ int main(int argc, char *argv[])
// IncrementalSVD is never turned on in this example and isNextSample is always true.
if (x_base_only == false && basis_generator_v->isNextSample(t))
{
basis_generator_v->takeSample(vx_diff.GetBlock(0));
basis_generator_v->computeNextSampleTime(vx_diff.GetBlock(0),
basis_generator_v->takeSample(vx_diff.GetBlock(0).GetData());
basis_generator_v->computeNextSampleTime(vx_diff.GetBlock(0).GetData(),
dvdt.GetData(), t);
basis_generator_H->takeSample(oper.H_sp.GetData());
}

if (basis_generator_x->isNextSample(t))
{
basis_generator_x->takeSample(vx_diff.GetBlock(1));
basis_generator_x->computeNextSampleTime(vx_diff.GetBlock(1),
basis_generator_x->takeSample(vx_diff.GetBlock(1).GetData());
basis_generator_x->computeNextSampleTime(vx_diff.GetBlock(1).GetData(),
dxdt.GetData(), t);

if (x_base_only == true)
Expand Down Expand Up @@ -1302,7 +1302,7 @@ int main(int argc, char *argv[])
// Take samples
if (x_base_only == false)
{
basis_generator_v->takeSample(vx_diff.GetBlock(0));
basis_generator_v->takeSample(vx_diff.GetBlock(0).GetData());
basis_generator_v->writeSnapshot();
delete basis_generator_v;
}
Expand All @@ -1311,7 +1311,7 @@ int main(int argc, char *argv[])
basis_generator_H->writeSnapshot();
delete basis_generator_H;

basis_generator_x->takeSample(vx_diff.GetBlock(1));
basis_generator_x->takeSample(vx_diff.GetBlock(1).GetData());
basis_generator_x->writeSnapshot();
delete basis_generator_x;

Expand Down
1 change: 0 additions & 1 deletion lib/mfem/SampleMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,6 @@ void SampleMeshManager::ConstructSampleMesh()
spaceOSSP[i+1] = spaceOSSP[i] + spfespace[i]->GetVSize();
}

sample_pmesh->ReorientTetMesh(); // re-orient the mesh, required for tets, no-op for hex
sample_pmesh->EnsureNodes();
}

Expand Down
Loading