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>
173 "LduMatrix<Type, DType, LUType>::operator=(const LduMatrix&)" 174 ) <<
"attempted assignment to self" 208 interfacesUpper_ = A.interfacesUpper_;
209 interfacesLower_ = A.interfacesLower_;
213 template<
class Type,
class DType,
class LUType>
233 sourcePtr_->negate();
241 template<
class Type,
class DType,
class LUType>
256 upper() += A.
upper();
269 upper() += A.
upper();
270 lower() += A.
lower();
276 lower() += A.
upper();
277 upper() += A.
upper();
281 lower() += A.
lower();
282 upper() += A.
lower();
288 lower() += A.
lower();
289 upper() += A.
upper();
310 "LduMatrix<Type, DType, LUType>::operator+=(const LduMatrix& A)" 311 ) <<
"Unknown matrix type combination" 315 interfacesUpper_ += A.interfacesUpper_;
316 interfacesLower_ += A.interfacesLower_;
320 template<
class Type,
class DType,
class LUType>
335 upper() -= A.
upper();
348 upper() -= A.
upper();
349 lower() -= A.
lower();
355 lower() -= A.
upper();
356 upper() -= A.
upper();
360 lower() -= A.
lower();
361 upper() -= A.
lower();
367 lower() -= A.
lower();
368 upper() -= A.
upper();
374 upper() = -A.
upper();
379 lower() = -A.
lower();
389 "LduMatrix<Type, DType, LUType>::operator-=(const LduMatrix& A)" 390 ) <<
"Unknown matrix type combination" 394 interfacesUpper_ -= A.interfacesUpper_;
395 interfacesLower_ -= A.interfacesLower_;
399 template<
class Type,
class DType,
class LUType>
400 void Foam::LduMatrix<Type, DType, LUType>::operator*=
417 if (symmetric() || asymmetric())
438 "LduMatrix<Type, DType, LUType>::operator*=(const scalarField& sf)" 439 ) <<
"Scaling a matrix by scalarField is not currently supported\n" 440 "because scaling interfacesUpper_ and interfacesLower_ " 441 "require special transfers" 449 template<
class Type,
class DType,
class LUType>
472 interfacesUpper_ *=
s;
473 interfacesLower_ *=
s;
void operator+=(const LduMatrix< Type, DType, LUType > &)
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 ))
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Field< LUType > & lower()
volScalarField sf(fieldObject, mesh)
tmp< Field< Type > > faceH(const Field< Type > &) const
Field< LUType > & upper()
A face is a list of labels corresponding to mesh vertices.
iterator begin()
Return an iterator to begin traversing the UList.
tmp< Field< Type > > H(const Field< Type > &) const
void operator-=(const LduMatrix< Type, DType, LUType > &)
const volScalarField & psi
label size() const
Return the number of elements in the UList.
void operator=(const LduMatrix< Type, DType, LUType > &)
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Traits class for primitives.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
void sumMagOffDiag(Field< LUType > &sumOff) const
void operator*=(const scalarField &)
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
A class for managing temporary objects.