45 const scalar coeffVal,
50 source_(mSize, sourceVal)
121 <<
"Different size matrices"
125 if (source_.size() != m.source_.size())
128 <<
"Different size source vectors"
142 const simpleMatrix<Type>& m1,
143 const simpleMatrix<Type>& m2
146 return simpleMatrix<Type>
148 static_cast<const scalarSquareMatrix&
>(m1)
149 +
static_cast<const scalarSquareMatrix&
>(m2),
150 m1.source_ + m2.source_
158 const simpleMatrix<Type>& m1,
159 const simpleMatrix<Type>& m2
162 return simpleMatrix<Type>
166 m1.source_ - m2.source_
175 const simpleMatrix<Type>& m
178 return simpleMatrix<Type>(
s*m.matrix_,
s*m.source_);
188 const simpleMatrix<Type>& m
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
label m() const noexcept
The number of rows.
label n() const noexcept
The number of columns.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
SquareMatrix & operator=(const SquareMatrix &)=default
A simple square matrix solver with scalar coefficients.
void operator=(const simpleMatrix< Type > &)
Copy assignment.
simpleMatrix(const label n)
Construct given size.
Field< Type > solve() const
Solve the matrix using Gaussian elimination with pivoting and return the solution.
Field< Type > LUsolve() const
Solve the matrix using LU decomposition with pivoting and return the solution.
Field< Type > & source() noexcept
Return access to the source.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManip< error > abort(error &err)
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
SquareMatrix< scalar > scalarSquareMatrix
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
void LUsolve(scalarSquareMatrix &matrix, List< Type > &source)
Solve the matrix using LU decomposition with pivoting returning the LU form of the matrix and the sol...
constexpr char nl
The newline '\n' character (0x0a).