37 : model(
model_), x(model.size())
44 const size_t n_dofs = model.size();
90 template<
class N,
class G>
95 const std::vector<Vector<N> >
coords =
grid.getNodeCoordinates();
98 std::fstream f(
fname.c_str(),std::ios::out);
104 f <<
"set ticslevel 0" << std::endl;
105 f <<
"splot \"-\" using 1:2:3 with points" << std::endl;
106 f <<
"#" << std::endl;
110 f << std::scientific << std::showpoint
111 << std::setprecision(16) <<
coords[n][
d] <<
" ";
114 f << std::scientific << std::showpoint
119 f <<
"end" << std::endl;
120 f <<
"pause -1" << std::endl;
Class with mathematical matrix operations.
Definition densematrix.hh:33
std::size_t precision() const
get data precision for pretty-printing
Definition densematrix.hh:188
Stationary problem solver. E.g. for elliptic problmes.
Definition pde.hh:24
const Vector< number_type > & get_state() const
get current state
Definition pde.hh:72
StationarySolver(const M &model_)
constructor stores reference to the model
Definition pde.hh:36
M::number_type number_type
export number_type
Definition pde.hh:33
M::time_type time_type
export time_type
Definition pde.hh:30
size_type get_order() const
return consistency order of the method
Definition pde.hh:78
void solve()
do one step
Definition pde.hh:42
M::size_type size_type
export size_type
Definition pde.hh:27
std::size_t size_type
Type used for array indices.
Definition vector.hh:34
void permute_forward(const Vector< std::size_t > &p, Vector< T > &b)
apply permutations to a right hand side vector
Definition lr.hh:160
void lr_fullpivot(DenseMatrix< T > &A, Vector< std::size_t > &p, Vector< std::size_t > &q)
lr decomposition of A with full pivoting
Definition lr.hh:107
void permute_backward(const Vector< std::size_t > &q, Vector< T > &z)
apply permutations to a solution vector
Definition lr.hh:171
void apply_equilibrate(Vector< T > &s, Vector< T > &b)
apply row equilibration to right hand side vector
Definition lr.hh:203
void solveR(const DenseMatrix< T > &A, Vector< T > &x, const Vector< T > &b)
Assume R = upper triangle of A and solve R x = b.
Definition lr.hh:233
void solveL(const DenseMatrix< T > &A, Vector< T > &x, const Vector< T > &b)
Assume L = lower triangle of A with l_ii=1, solve L x = b.
Definition lr.hh:215
void row_equilibrate(DenseMatrix< T > &A, Vector< T > &s)
perform a row equilibration of a matrix; return scaling for later use
Definition lr.hh:182
Newton's method with line search.
void pde_gnuplot2d(const std::string &fname, const Vector< N > solution, const G &grid)
gnuplot output for stationary state
Definition pde.hh:91