55 const scalarField& Lower =
const_cast<const lduMatrix&
>(*this).lower();
56 const scalarField& Upper =
const_cast<const lduMatrix&
>(*this).upper();
62 for (label face=0; face<l.size(); face++)
64 Diag[l[face]] -= Lower[face];
75 const scalarField& Lower =
const_cast<const lduMatrix&
>(*this).lower();
76 const scalarField& Upper =
const_cast<const lduMatrix&
>(*this).upper();
81 for (label face = 0; face < l.size(); face++)
83 sumOff[u[face]] +=
mag(Lower[face]);
84 sumOff[l[face]] +=
mag(Upper[face]);
104 lowerPtr_.reset(
nullptr);
113 upperPtr_.reset(
nullptr);
130 diagPtr_ = std::move(
A.diagPtr_);
131 upperPtr_ = std::move(
A.upperPtr_);
132 lowerPtr_ = std::move(
A.lowerPtr_);
162 if (symmetric() &&
A.symmetric())
166 else if (symmetric() &&
A.asymmetric())
180 else if (asymmetric() &&
A.symmetric())
194 else if (asymmetric() &&
A.asymmetric())
211 else if (
A.diagonal())
219 <<
"Unknown matrix type combination" <<
nl 220 <<
" this : " << this->matrixTypeName()
221 <<
" A : " <<
A.matrixTypeName() <<
endl;
234 if (symmetric() &&
A.symmetric())
238 else if (symmetric() &&
A.asymmetric())
252 else if (asymmetric() &&
A.symmetric())
266 else if (asymmetric() &&
A.asymmetric())
283 else if (
A.diagonal())
291 <<
"Unknown matrix type combination" <<
nl 292 <<
" this : " << this->matrixTypeName()
293 <<
" A : " <<
A.matrixTypeName() <<
endl;
308 if (symmetric() || asymmetric())
316 for (label face=0; face<
upper.size(); face++)
318 upper[face] *= sf[l[face]];
321 for (label face=0; face<
lower.size(); face++)
const scalarField & diag() const
void size(const label n)
Older name for setAddressableSize.
A face is a list of labels corresponding to mesh vertices.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
void sumMagOffDiag(scalarField &sumOff) const
UList< label > labelUList
A UList of labels.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
const scalarField & lower() const
void operator=(const lduMatrix &)
Copy assignment.
void operator*=(const scalarField &)
int debug
Static debugging option.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
const scalarField & upper() const
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
#define WarningInFunction
Report a warning using Foam::Warning.
const lduAddressing & lduAddr() const
Return the LDU addressing.
void operator-=(const lduMatrix &)
void operator+=(const lduMatrix &)
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))
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)