47 string PulseWavePropagation::className =
 
   49         "PulseWavePropagation", PulseWavePropagation::create,
 
   50         "Pulse Wave Propagation equation.");
 
   65 PulseWavePropagation::PulseWavePropagation(
 
   81     if (
m_session->DefinesSolverInfo(
"PressureArea"))
 
   99         ASSERTL0(
false, 
"Implicit Pulse Wave Propagation not set up.");
 
  110             riemName = 
"UpwindPulse";
 
  115             ASSERTL0(
false, 
"populate switch statement for upwind flux");
 
  171     for (
int omega = 0; omega < 
m_nDomains; ++omega)
 
  180             physarray[i] = inarray[i] + cnt;
 
  181             out[i]       = outarray[i] + cnt;
 
  208         Vmath::Vcopy(inarray[i].size(), inarray[i], 1, outarray[i], 1);
 
  238             for (
int j = 0; j < 2; ++j)
 
  242                 if (j < vessel[0]->GetBndConditions().size())
 
  244                     BCType = vessel[0]->GetBndConditions()[j]->GetUserDefined();
 
  248                 if (BCType.empty() || BCType == 
"Interface")
 
  250                     BCType = 
"NoUserDefined";
 
  257                 if (BCType == 
"Q-inflow")
 
  259                     vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
 
  261                 else if (BCType == 
"A-inflow")
 
  263                     vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
 
  265                 else if (BCType == 
"U-inflow")
 
  267                     vessel[1]->GetBndConditions()[j]->SetIsTimeDependent(
true);
 
  269                 else if (BCType == 
"RCR-terminal")
 
  271                     vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
 
  284         for (
int n = 0; n < 2; ++n)
 
  290         offset += 
m_vessels[2 * omega]->GetTotPoints();
 
  317     for (
int j = 0; j < nq; ++j)
 
  320         flux[0][0][j] = physfield[0][j] * physfield[1][j];
 
  326     m_fields[0]->PhysDeriv(flux[0][0], dAUdx);
 
  328     for (
int j = 0; j < nq; ++j)
 
  330         if ((j == 0) || (j == nq - 1))
 
  332             viscoelasticGradient = dAUdx[j];
 
  336             viscoelasticGradient = (dAUdx[j] + dAUdx[j + 1]) / 2;
 
  340                                     physfield[0][j], 
m_A_0[domain][j],
 
  341                                     viscoelasticGradient, 
m_gamma[domain][j],
 
  344         flux[1][0][j] = physfield[1][j] * physfield[1][j] / 2 +
 
  364         for (
int j = 0; j < nq; ++j)
 
  367                                  physfield[0][counter + j], 
m_A_0[domain][j],
 
  370                                   m_beta[domain][j], physfield[0][counter + j],
 
  373                                   m_beta[domain][j], physfield[0][counter + j],
 
#define ASSERTL0(condition, msg)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
Array< OneD, NekDouble > & GetAlpha()
virtual void v_InitObject(bool DeclareField=false)
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
SolverUtils::AdvectionSharedPtr m_advObject
virtual ~PulseWavePropagation()
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
DG Pulse Wave Propagation routines:
Array< OneD, PulseWaveBoundarySharedPtr > m_Boundary
void SetPulseWaveBoundaryConditions(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Array< OneD, NekDouble > & GetN()
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Array< OneD, NekDouble > & GetA0()
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Array< OneD, NekDouble > & GetBeta()
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Base class for unsteady solvers.
Array< OneD, Array< OneD, NekDouble > > m_A_0
Array< OneD, Array< OneD, NekDouble > > m_beta_trace
void EnforceInterfaceConditions(const Array< OneD, const Array< OneD, NekDouble >> &fields)
Array< OneD, Array< OneD, NekDouble > > m_W2
Array< OneD, Array< OneD, NekDouble > > m_trace_fwd_normal
PulseWavePressureAreaSharedPtr m_pressureArea
Array< OneD, Array< OneD, NekDouble > > m_W1
Array< OneD, Array< OneD, NekDouble > > m_alpha_trace
virtual void v_InitObject(bool DeclareField=false)
UpwindTypePulse m_upwindTypePulse
Array< OneD, Array< OneD, NekDouble > > m_A_0_trace
Array< OneD, Array< OneD, NekDouble > > m_pressure
Array< OneD, Array< OneD, NekDouble > > m_gamma
Array< OneD, Array< OneD, NekDouble > > m_alpha
Array< OneD, Array< OneD, NekDouble > > m_PWV
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
Array< OneD, Array< OneD, NekDouble > > m_beta
int m_spacedim
Spatial dimension (>= expansion dim).
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
std::vector< std::pair< std::string, std::string > > SummaryList
EquationSystemFactory & GetEquationSystemFactory()
RiemannSolverFactory & GetRiemannSolverFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.
PressureAreaFactory & GetPressureAreaFactory()
@ eUpwindPulse
simple upwinding scheme
BoundaryFactory & GetBoundaryFactory()
void Neg(int n, T *x, const int incx)
Negate x = -x.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)