36 #ifndef NEKTAR_SOLVERUTILS_EQUATIONSYSTEM_H
37 #define NEKTAR_SOLVERUTILS_EQUATIONSYSTEM_H
103 boost::shared_ptr<T>
as()
105 #if defined __INTEL_COMPILER && BOOST_VERSION > 105200
106 typedef typename boost::shared_ptr<T>::element_type E;
107 E * p =
dynamic_cast< E*
>( shared_from_this().get() );
109 return boost::shared_ptr<T>( shared_from_this(), p );
111 return boost::dynamic_pointer_cast<T>( shared_from_this() );
138 Array<
OneD, Array<OneD, NekDouble> >& pArray,
139 std::string pFunctionName,
141 const int domain = 0);
145 std::vector<std::string> pFieldNames,
146 Array<
OneD, Array<OneD, NekDouble> > &pFields,
147 const std::string& pName,
148 const int domain = 0);
152 std::vector<std::string> pFieldNames,
153 Array<OneD, MultiRegions::ExpListSharedPtr> &pFields,
154 const std::string& pName,
155 const int domain = 0);
159 std::string pFieldName,
160 Array<OneD, NekDouble>& pArray,
161 const std::string& pFunctionName,
163 const int domain = 0);
167 std::string pFieldName,
168 const std::string &pFunctionName,
173 Array<
OneD, Array<OneD, NekDouble> > &base);
178 bool dumpInitialConditions =
true,
179 const int domain = 0);
184 Array<OneD, NekDouble> &outfield,
191 const Array<OneD,NekDouble> &exactsoln,
192 bool Normalised =
false);
197 bool Normalised =
false)
209 const Array<
OneD, Array<OneD, NekDouble> > &F,
210 Array<OneD, NekDouble> &outarray);
214 const Array<
OneD, Array<OneD, NekDouble> > &F,
215 Array<OneD, NekDouble> &outarray);
219 const Array<
OneD, Array<OneD, NekDouble> > &V,
220 const Array<OneD, const NekDouble> &u,
221 Array<OneD, NekDouble> &outarray,
222 bool UseContCoeffs =
false);
227 const Array<
OneD, Array<OneD, NekDouble> > &V,
228 const Array<OneD, const NekDouble> &u,
229 Array<OneD, NekDouble> &outarray,
234 const Array<
OneD, Array<OneD, NekDouble> >& InField,
235 Array<
OneD, Array<OneD, NekDouble> >& OutField,
236 bool NumericalFluxIncludesNormal =
true,
237 bool InFieldIsInPhysSpace =
false,
242 const Array<
OneD, Array<OneD, NekDouble> >& InField,
243 Array<
OneD, Array<OneD, NekDouble> >& OutField,
244 bool NumericalFluxIncludesNormal =
true,
245 bool InFieldIsInPhysSpace =
false);
254 std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
255 std::vector<std::string> &variables);
265 const std::string &outname,
267 std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
268 std::vector<std::string> &variables);
272 const std::string &infile,
273 Array<OneD, MultiRegions::ExpListSharedPtr> &pFields);
277 const std::string &infile,
278 Array<OneD, MultiRegions::ExpListSharedPtr> &pFields,
284 const std::string &infile,
285 std::vector<std::string> &fieldStr,
286 Array<
OneD, Array<OneD, NekDouble> > &coeffs);
291 const std::string &infile,
293 std::string &pFieldName);
352 Array<OneD, NekDouble> &output);
355 Array<OneD, NekDouble> &output);
365 Array<
OneD, Array<OneD, NekDouble> >&physfield,
366 Array<
OneD, Array<OneD, NekDouble> >&flux);
370 Array<
OneD, Array<OneD, NekDouble> >&physfield,
371 Array<
OneD, Array<OneD, NekDouble> >&fluxX,
372 Array<
OneD, Array<OneD, NekDouble> > &fluxY);
377 Array<
OneD, Array<OneD, NekDouble> > &physfield,
378 Array<
OneD, Array<OneD, NekDouble> > &flux);
381 Array<
OneD, Array<OneD, NekDouble> > &physfield,
382 Array<
OneD, Array<OneD, NekDouble> > &numflux);
385 Array<
OneD, Array<OneD, NekDouble> > &physfield,
386 Array<
OneD, Array<OneD, NekDouble> > &numfluxX,
387 Array<
OneD, Array<OneD, NekDouble> > &numfluxY);
390 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
391 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &uflux);
394 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
395 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &qfield,
396 Array<
OneD, Array<OneD, NekDouble> > &qflux);
399 const bool modbasis);
403 const string & s1,
const string& s2) ;
413 Array<OneD, MultiRegions::ExpListSharedPtr>
m_fields;
415 Array<OneD, MultiRegions::ExpListSharedPtr>
m_base;
465 Array<OneD, Array<OneD, Array<OneD,NekDouble> > >
m_gradtan;
467 Array<OneD, Array<OneD, Array<OneD,NekDouble> > >
m_tanbasis;
531 bool Normalised =
false);
544 bool dumpInitialConditions =
true,
545 const int domain = 0);
549 Array<OneD, NekDouble> &outfield,
567 std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
568 std::vector<std::string> &variables);
574 const int i, Array<
OneD,
575 Array<OneD, NekDouble> >&physfield,
576 Array<
OneD, Array<OneD, NekDouble> >&flux);
579 const int i,
const int j,
580 Array<
OneD, Array<OneD, NekDouble> >&physfield,
581 Array<
OneD, Array<OneD, NekDouble> >&flux);
584 const int i, Array<
OneD,
585 Array<OneD, NekDouble> >&physfield,
586 Array<
OneD, Array<OneD, NekDouble> >&fluxX,
587 Array<
OneD, Array<OneD, NekDouble> > &fluxY);
590 Array<
OneD, Array<OneD, NekDouble> > &physfield,
591 Array<
OneD, Array<OneD, NekDouble> > &numflux);
594 Array<
OneD, Array<OneD, NekDouble> > &physfield,
595 Array<
OneD, Array<OneD, NekDouble> > &numfluxX,
596 Array<
OneD, Array<OneD, NekDouble> > &numfluxY);
599 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
600 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &uflux);
603 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
604 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &qfield,
605 Array<
OneD, Array<OneD, NekDouble > > &qflux);
687 return v_L2Error(field, exactsoln, Normalised);
707 if (
m_session->GetComm()->GetRank() == 0)
709 std::vector<std::pair<std::string, std::string> > vSummary;
712 out <<
"=======================================================================" << endl;
713 SummaryList::const_iterator x;
714 for (x = vSummary.begin(); x != vSummary.end(); ++x)
718 out << x->first <<
": " << x->second << endl;
720 out <<
"=======================================================================" << endl;
730 bool dumpInitialConditions,
738 Array<OneD, NekDouble> &outfield,
762 return m_fields[0]->GetNcoeffs(eid);
767 return m_graph->GetExpansions().begin()->second->m_basisKeyVector[0]
773 return m_fields[0]->EvalBasisNumModesMaxPerExp();
793 return m_fields[0]->GetTrace()->GetNpoints();
803 return m_fields[0]->GetPhys_Offset(n);
808 return m_fields[0]->GetCoeff_Offset(n);
818 return m_fields[0]->GetTotPoints(n);
828 return (
m_fields.num_elements() - 1);
847 Array<OneD, NekDouble> &output)
853 Array<OneD, NekDouble> &output)
859 Array<
OneD, Array<OneD, NekDouble> >&physfield,
860 Array<
OneD, Array<OneD, NekDouble> >&flux)
866 Array<
OneD, Array<OneD, NekDouble> >&physfield,
867 Array<
OneD, Array<OneD, NekDouble> >&fluxX,
868 Array<
OneD, Array<OneD, NekDouble> > &fluxY)
874 Array<
OneD, Array<OneD, NekDouble> > &physfield,
875 Array<
OneD, Array<OneD, NekDouble> > &flux)
881 Array<
OneD, Array<OneD, NekDouble> > &numflux)
887 Array<
OneD, Array<OneD, NekDouble> > &numfluxX,
888 Array<
OneD, Array<OneD, NekDouble> > &numfluxY)
894 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
895 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &uflux)
901 const Array<
OneD, Array<OneD, NekDouble> > &ufield,
902 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &qfield,
903 Array<
OneD, Array<OneD, NekDouble> > &qflux)