75 if (n == 0) { n =
width; }
76 if (m == 0) { m =
height; }
81 out << setiosflags(ios::scientific | ios::showpos);
82 for (
int i = 0; i < n; i++)
86 for (
int j = 0; j < m; j++)
90 out << j+1 <<
" " << i+1 <<
" " << y(j) <<
'\n';
int Size() const
Logical size of the array.
void NewDataAndSize(double *d, int s)
Set the Vector data and size, deleting the old data, if owned.
Array< int > constraint_list
List of constrained indices/dofs.
void SetSize(int s)
Resize the vector to size s.
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
virtual void Mult(const Vector &x, Vector &y) const
Constrained operator action.
int Size() const
Returns the size of the vector.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
virtual void MultTranspose(const Vector &x, Vector &y) const
Action of the transpose operator: y=A^t(x). The default behavior in class Operator is to generate an ...
virtual const Operator * GetProlongation() const
Prolongation operator from linear algebra (linear system) vectors, to input vectors for the operator...
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
The operator x -> R*A*P*x.
virtual const Operator * GetRestriction() const
Restriction operator from input vectors for the operator to linear algebra (linear system) vectors...
void SetSubVectorComplement(const Array< int > &dofs, const double val)
Set all vector entries NOT in the 'dofs' array to the given 'val'.
Vector w
Auxiliary vectors.
void FormLinearSystem(const Array< int > &ess_tdof_list, Vector &x, Vector &b, Operator *&A, Vector &X, Vector &B, int copy_interior=0)
Form a constrained linear system using a matrix-free approach.
virtual void RecoverFEMSolution(const Vector &X, const Vector &b, Vector &x)
Reconstruct a solution vector x (e.g. a GridFunction) from the solution X of a constrained linear sys...
int height
Dimension of the output / number of rows in the matrix.
void EliminateRHS(const Vector &x, Vector &b) const
Eliminate "essential boundary condition" values specified in x from the given right-hand side b...
void PrintMatlab(std::ostream &out, int n=0, int m=0) const
Prints operator with input size n and output size m in Matlab format.
ConstrainedOperator(Operator *A, const Array< int > &list, bool own_A=false)
Constructor from a general Operator and a list of essential indices/dofs.
void MakeRef(T *, int)
Make this Array a reference to a pointer.
Operator * A
The unconstrained Operator.
Square Operator for imposing essential boundary conditions using only the action, Mult()...
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
int width
Dimension of the input / number of columns in the matrix.