64template<
class container>
75 template<
class Topology>
91 template<
class Topology>
94 for(
int i=0; i<3; i++)
106 for(
int i=0; i<3; i++)
108 m_values.assign(2,copyable);
118 template<
class OtherContainer>
120 for(
unsigned i=0; i<3; i++)
121 for(
unsigned j=0; j<3; j++)
122 m_mat_idx(i,j)=src.
idx(i,j);
124 for(
unsigned i=0; i<src.
values().size(); i++)
134 int idx(
unsigned i,
unsigned j)
const{
135 return m_mat_idx(i,j);
145 int&
idx(
unsigned i,
unsigned j){
146 return m_mat_idx(i,j);
156 const container&
value(
size_t i,
size_t j)
const{
157 int k = m_mat_idx(i,j);
173 const std::vector<container>&
values()
const{
189 std::vector<container> m_values;
void resize(unsigned m, T val=T())
Resize.
Definition: operator.h:120
Operator transpose() const
Transposition.
Definition: operator.h:152
Function discretization routines.
Function discretization routines on X-point topology.
void assign(const from_ContainerType &from, ContainerType &to, Params &&... ps)
Generic way to assign the contents of a from_ContainerType object to a ContainerType object optionall...
Definition: blas1.h:665
static DG_DEVICE double one(double x)
Definition: functions.h:20
static DG_DEVICE double zero(double x)
Definition: functions.h:29
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
Definition: blas1.h:164
thrust::host_vector< real_type > evaluate(UnaryOp f, const RealGrid1d< real_type > &g)
Evaluate a 1d function on grid coordinates.
Definition: evaluation.h:67
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Class for 2x2 and 3x3 matrices sharing elements.
Definition: tensor.h:66
void construct(const Topology &grid)
Construct the unit tensor.
Definition: tensor.h:92
SparseTensor(const SparseTensor< OtherContainer > &src)
Type conversion from other value types.
Definition: tensor.h:119
int idx(unsigned i, unsigned j) const
read index into the values array at the given position
Definition: tensor.h:134
SparseTensor transpose() const
Return the transpose of the currrent tensor.
Definition: tensor.h:181
SparseTensor()
no value is set, Indices default to -1
Definition: tensor.h:69
SparseTensor(const container ©able)
Construct the unit tensor.
Definition: tensor.h:84
container container_type
Definition: tensor.h:67
std::vector< container > & values()
Return write access to the values array.
Definition: tensor.h:166
int & idx(unsigned i, unsigned j)
write index into the values array at the given position
Definition: tensor.h:145
const std::vector< container > & values() const
Return read access to the values array.
Definition: tensor.h:173
void construct(const container ©able)
Construct the unit tensor.
Definition: tensor.h:104
SparseTensor(const Topology &grid)
Construct the unit tensor.
Definition: tensor.h:76
const container & value(size_t i, size_t j) const
Read access the underlying container.
Definition: tensor.h:156