30 template<
class Type,
class DType,
class LUType>
48 template<
class Type,
class DType,
class LUType>
66 template<
class Type,
class DType,
class LUType>
81 sumOff[l[face]] +=
cmptMag(Upper[face]);
86 template<
class Type,
class DType,
class LUType>
95 if (lowerPtr_ || upperPtr_)
99 Type* __restrict__ HpsiPtr = Hpsi.
begin();
101 const Type* __restrict__ psiPtr = psi.
begin();
103 const label* __restrict__ uPtr = lduAddr().upperAddr().begin();
104 const label* __restrict__ lPtr = lduAddr().lowerAddr().begin();
106 const LUType* __restrict__ lowerPtr = lower().begin();
107 const LUType* __restrict__ upperPtr = upper().begin();
109 const label nFaces = upper().size();
113 HpsiPtr[uPtr[
face]] -= lowerPtr[
face]*psiPtr[lPtr[
face]];
114 HpsiPtr[lPtr[
face]] -= upperPtr[
face]*psiPtr[uPtr[
face]];
121 template<
class Type,
class DType,
class LUType>
131 template<
class Type,
class DType,
class LUType>
154 template<
class Type,
class DType,
class LUType>
166 template<
class Type,
class DType,
class LUType>
172 <<
"attempted assignment to self" 206 interfacesUpper_ = A.interfacesUpper_;
207 interfacesLower_ = A.interfacesLower_;
211 template<
class Type,
class DType,
class LUType>
231 sourcePtr_->negate();
239 template<
class Type,
class DType,
class LUType>
254 upper() += A.
upper();
267 upper() += A.
upper();
268 lower() += A.
lower();
274 lower() += A.
upper();
275 upper() += A.
upper();
279 lower() += A.
lower();
280 upper() += A.
lower();
286 lower() += A.
lower();
287 upper() += A.
upper();
307 <<
"Unknown matrix type combination" 311 interfacesUpper_ += A.interfacesUpper_;
312 interfacesLower_ += A.interfacesLower_;
316 template<
class Type,
class DType,
class LUType>
331 upper() -= A.
upper();
344 upper() -= A.
upper();
345 lower() -= A.
lower();
351 lower() -= A.
upper();
352 upper() -= A.
upper();
356 lower() -= A.
lower();
357 upper() -= A.
lower();
363 lower() -= A.
lower();
364 upper() -= A.
upper();
370 upper() = -A.
upper();
375 lower() = -A.
lower();
384 <<
"Unknown matrix type combination" 388 interfacesUpper_ -= A.interfacesUpper_;
389 interfacesLower_ -= A.interfacesLower_;
393 template<
class Type,
class DType,
class LUType>
394 void Foam::LduMatrix<Type, DType, LUType>::operator*=
411 if (symmetric() || asymmetric())
431 <<
"Scaling a matrix by scalarField is not currently supported\n" 432 "because scaling interfacesUpper_ and interfacesLower_ " 433 "require special transfers" 441 template<
class Type,
class DType,
class LUType>
464 interfacesUpper_ *=
s;
465 interfacesLower_ *=
s;
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< Field< Type > > H(const Field< Type > &) const
void size(const label)
Override size to be inconsistent with allocated storage.
Field< LUType > & lower()
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().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))
iterator begin()
Return an iterator to begin traversing the UList.
void operator*=(const scalarField &)
Field< LUType > & upper()
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void operator-=(const LduMatrix< Type, DType, LUType > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
volScalarField sf(fieldObject, mesh)
label size() const
Return the number of elements in the UList.
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
void sumMagOffDiag(Field< LUType > &sumOff) const
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
void operator+=(const LduMatrix< Type, DType, LUType > &)
const volScalarField & psi
tmp< Field< Type > > faceH(const Field< Type > &) const
A class for managing temporary objects.
void operator=(const LduMatrix< Type, DType, LUType > &)