22 template<
typename Scalar>
25 this->cnt = other.cnt;
26 this->cap = other.cap;
27 this->idx = (
int*) malloc(
sizeof(
int) * cap);
28 this->dof = (
int*) malloc(
sizeof(
int) * cap);
29 this->coef = (Scalar*) malloc(
sizeof(Scalar) * cap);
30 for(
unsigned int i = 0; i < cnt; i++) {
31 coef[i] = other.coef[i];
32 dof[i] = other.dof[i];
33 idx[i] = other.idx[i];
37 template<
typename Scalar>
42 idx = (
int*) malloc(
sizeof(
int) * cap);
43 dof = (
int*) malloc(
sizeof(
int) * cap);
44 coef = (Scalar*) malloc(
sizeof(Scalar) * cap);
47 template<
typename Scalar>
55 template<
typename Scalar>
61 template<
typename Scalar>
62 int* AsmList<Scalar>::get_dof()
67 template<
typename Scalar>
68 unsigned int AsmList<Scalar>::get_cnt()
73 template<
typename Scalar>
74 Scalar* AsmList<Scalar>::get_coef()
79 template<
typename Scalar>
80 void AsmList<Scalar>::add_triplet(
int i,
int d, Scalar c)
89 template<
typename Scalar>
90 void AsmList<Scalar>::enlarge()
92 cap = !cap ? 128 : cap * 2;
93 idx = (
int*) realloc(idx,
sizeof(
int) * cap);
94 dof = (
int*) realloc(dof,
sizeof(
int) * cap);
95 coef = (Scalar*) realloc(coef,
sizeof(Scalar) * cap);
98 template HERMES_API
class AsmList<double>;
99 template HERMES_API
class AsmList<std::complex<double> >;