30 template<
class Type,
class DType,
class LUType>
33 if (!lowerPtr_ && !upperPtr_)
53 template<
class Type,
class DType,
class LUType>
56 if (!lowerPtr_ && !upperPtr_)
76 template<
class Type,
class DType,
class LUType>
82 if (!lowerPtr_ && !upperPtr_)
96 sumOff[l[face]] +=
cmptMag(Upper[face]);
101 template<
class Type,
class DType,
class LUType>
110 if (lowerPtr_ || upperPtr_)
114 Type* __restrict__ HpsiPtr = Hpsi.
begin();
116 const Type* __restrict__ psiPtr = psi.
begin();
118 const label* __restrict__ uPtr = lduAddr().upperAddr().begin();
119 const label* __restrict__ lPtr = lduAddr().lowerAddr().begin();
121 const LUType* __restrict__ lowerPtr = lower().begin();
122 const LUType* __restrict__ upperPtr = upper().begin();
124 const label nFaces = upper().size();
128 HpsiPtr[uPtr[
face]] -= lowerPtr[
face]*psiPtr[lPtr[
face]];
129 HpsiPtr[lPtr[
face]] -= upperPtr[
face]*psiPtr[uPtr[
face]];
136 template<
class Type,
class DType,
class LUType>
146 template<
class Type,
class DType,
class LUType>
169 template<
class Type,
class DType,
class LUType>
181 template<
class Type,
class DType,
class LUType>
187 <<
"attempted assignment to self" 221 interfacesUpper_ = A.interfacesUpper_;
222 interfacesLower_ = A.interfacesLower_;
226 template<
class Type,
class DType,
class LUType>
246 sourcePtr_->negate();
254 template<
class Type,
class DType,
class LUType>
269 upper() += A.
upper();
282 upper() += A.
upper();
283 lower() += A.
lower();
289 lower() += A.
upper();
290 upper() += A.
upper();
294 lower() += A.
lower();
295 upper() += A.
lower();
301 lower() += A.
lower();
302 upper() += A.
upper();
322 <<
"Unknown matrix type combination" 326 interfacesUpper_ += A.interfacesUpper_;
327 interfacesLower_ += A.interfacesLower_;
331 template<
class Type,
class DType,
class LUType>
346 upper() -= A.
upper();
359 upper() -= A.
upper();
360 lower() -= A.
lower();
366 lower() -= A.
upper();
367 upper() -= A.
upper();
371 lower() -= A.
lower();
372 upper() -= A.
lower();
378 lower() -= A.
lower();
379 upper() -= A.
upper();
385 upper() = -A.
upper();
390 lower() = -A.
lower();
399 <<
"Unknown matrix type combination" 403 interfacesUpper_ -= A.interfacesUpper_;
404 interfacesLower_ -= A.interfacesLower_;
408 template<
class Type,
class DType,
class LUType>
409 void Foam::LduMatrix<Type, DType, LUType>::operator*=
426 if (symmetric() || asymmetric())
446 <<
"Scaling a matrix by scalarField is not currently supported\n" 447 "because scaling interfacesUpper_ and interfacesLower_ " 448 "require special transfers" 456 template<
class Type,
class DType,
class LUType>
479 interfacesUpper_ *=
s;
480 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.
void size(const label)
Override size to be inconsistent with allocated storage.
void sumMagOffDiag(Field< LUType > &sumOff) const
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))
tmp< Field< Type > > H(const Field< Type > &) const
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)
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
fvModels source(alpha1, mixture.thermo1().rho())
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
void operator+=(const LduMatrix< Type, DType, LUType > &)
tmp< Field< Type > > faceH(const Field< Type > &) const
const volScalarField & psi
A class for managing temporary objects.
label size() const
Return the number of elements in the UList.
void operator=(const LduMatrix< Type, DType, LUType > &)