CppNoddy  0.92
Loading...
Searching...
No Matches
Residual_with_coords.cpp
Go to the documentation of this file.
1/// \file Residual_with_coords.cpp
2/// A specification of a (double/complex) residual class that
3/// not only defines a vector residual of a vector of state variables
4/// but may also depend upon N additional (double) variables. This is
5/// useful for the specification of boundary conditions in the PDE_IBVP
6/// and PDE_double_IBVP classes where the boundary conditions are
7/// dependent on the time/spatial location.
8
10
11namespace CppNoddy {
12 template <typename _Type, typename _Xtype>
13 Residual_with_coords<_Type, _Xtype>::Residual_with_coords(const unsigned& order, const unsigned& ncoords) : Residual<_Type>(order) {
14 coords = std::vector<_Xtype>(ncoords, 0.0);
15 }
16
17 template <typename _Type, typename _Xtype>
18 Residual_with_coords<_Type, _Xtype>::Residual_with_coords(const unsigned& order, const unsigned& nvars, const unsigned& ncoords) : Residual<_Type>(order, nvars) {
19 coords = std::vector<_Xtype>(ncoords, 0.0);
20 }
21
22 template <typename _Type, typename _Xtype>
24 }
26 // the templated versions we require are:
27 template class Residual_with_coords<double>
28 ;
30 ;
31 template class Residual_with_coords<std::complex<double>, std::complex<double> >
32 ;
33
34} // end namespace
A specification of a (double/complex) residual class that not only defines a vector residual of a vec...
A base class to be inherited by objects that define residuals.
virtual ~Residual_with_coords()
An empty destructor.
Residual_with_coords(const unsigned &order, const unsigned &ncoords)
Constructor for a 'square' residual object that is, N residuals for N unknowns.
std::vector< _Xtype > coords
The coordinates stored for this residual.
A base class to be inherited by objects that define residuals.
Definition: Residual.h:15
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...

© 2012

R.E. Hewitt