Skip to content

Commit

Permalink
Clean up the SimpleSOL solver and structure it more like H3LAPD (#227)
Browse files Browse the repository at this point in the history
* Add missing header guard.

* Rejig SimpleSOL such that the v_DoSolve override can be removed.

* Remove redundant DoDiffusion().

* Remove redundant SimpleSOL test.

* Inherit from UnsteadySystem rather than AdvectionSystem and remove some redundant functions.

* Remove virtual inheritance for SOLSystem, SolWithParticlesSystem.

* Remove commented code.

* Remove FluidInterface inheritance.

* Rejig SimpleSOL namespaces.

* Remove some unused functions.

* Remove some nektar-specific licence headers.

* Consistent header guards.

* Remove some unused functions.

* Consistent variable, function names, add some docstrings.

* Rejig get_flux_vector() - might address intermittent segfault?

* Tidy up SourceTerms class.

* Remove some 'using namespace...' directives.

* Add missing std:: qualifiers.
  • Loading branch information
oparry-ukaea authored Apr 11, 2024
1 parent b78aac7 commit 95f3ce3
Show file tree
Hide file tree
Showing 14 changed files with 327 additions and 2,034 deletions.
14 changes: 6 additions & 8 deletions solvers/SimpleSOL/Diagnostics/mass_conservation.hpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
#ifndef __SIMPLESOL_MASS_CONSERVATION_H_
#define __SIMPLESOL_MASS_CONSERVATION_H_

#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <memory>
#include <mpi.h>
#include <neso_particles.hpp>
using namespace NESO;
using namespace NESO::Particles;

#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
using namespace Nektar;

#include "../ParticleSystems/neutral_particles.hpp"

#include <fstream>
#include <iostream>

namespace LU = Nektar::LibUtilities;

template <typename T> class MassRecording {
protected:
const LibUtilities::SessionReaderSharedPtr session;
const LU::SessionReaderSharedPtr session;
std::shared_ptr<NeutralParticleSystem> particle_sys;
std::shared_ptr<T> rho;

Expand All @@ -27,10 +25,10 @@ template <typename T> class MassRecording {
double initial_mass_fluid;
int mass_recording_step;
int rank;
ofstream fh;
std::ofstream fh;

public:
MassRecording(const LibUtilities::SessionReaderSharedPtr session,
MassRecording(const LU::SessionReaderSharedPtr session,
std::shared_ptr<NeutralParticleSystem> particle_sys,
std::shared_ptr<T> rho)
: session(session), particle_sys(particle_sys), rho(rho),
Expand Down
Loading

0 comments on commit 95f3ce3

Please sign in to comment.