Go to the documentation of this file.
33 template<
class Type,
class DType,
class LUType>
51 template<
class Type,
class DType,
class LUType>
69 template<
class Type,
class DType,
class LUType>
89 template<
class Type,
class DType,
class LUType>
98 if (lowerPtr_ || upperPtr_)
102 Type* __restrict__ HpsiPtr = Hpsi.begin();
104 const Type* __restrict__ psiPtr =
psi.begin();
106 const label* __restrict__ uPtr = lduAddr().upperAddr().begin();
107 const label* __restrict__ lPtr = lduAddr().lowerAddr().begin();
109 const LUType* __restrict__ lowerPtr =
lower().begin();
110 const LUType* __restrict__ upperPtr =
upper().begin();
112 const label nFaces =
upper().size();
116 HpsiPtr[uPtr[
face]] -= lowerPtr[
face]*psiPtr[lPtr[
face]];
117 HpsiPtr[lPtr[
face]] -= upperPtr[
face]*psiPtr[uPtr[
face]];
124 template<
class Type,
class DType,
class LUType>
134 template<
class Type,
class DType,
class LUType>
157 template<
class Type,
class DType,
class LUType>
169 template<
class Type,
class DType,
class LUType>
204 source() =
A.source();
207 interfacesUpper_ =
A.interfacesUpper_;
208 interfacesLower_ =
A.interfacesLower_;
212 template<
class Type,
class DType,
class LUType>
232 sourcePtr_->negate();
240 template<
class Type,
class DType,
class LUType>
250 source() +=
A.source();
253 if (symmetric() &&
A.symmetric())
257 else if (symmetric() &&
A.asymmetric())
271 else if (asymmetric() &&
A.symmetric())
285 else if (asymmetric() &&
A.asymmetric())
302 else if (
A.diagonal())
308 <<
"Unknown matrix type combination"
312 interfacesUpper_ +=
A.interfacesUpper_;
313 interfacesLower_ +=
A.interfacesLower_;
317 template<
class Type,
class DType,
class LUType>
327 source() -=
A.source();
330 if (symmetric() &&
A.symmetric())
334 else if (symmetric() &&
A.asymmetric())
348 else if (asymmetric() &&
A.symmetric())
362 else if (asymmetric() &&
A.asymmetric())
379 else if (
A.diagonal())
385 <<
"Unknown matrix type combination"
389 interfacesUpper_ -=
A.interfacesUpper_;
390 interfacesLower_ -=
A.interfacesLower_;
394 template<
class Type,
class DType,
class LUType>
412 if (symmetric() || asymmetric())
432 <<
"Scaling a matrix by scalarField is not currently supported\n"
433 "because scaling interfacesUpper_ and interfacesLower_ "
434 "require special transfers"
442 template<
class Type,
class DType,
class LUType>
465 interfacesUpper_ *=
s;
466 interfacesLower_ *=
s;
void sumMagOffDiag(Field< LUType > &sumOff) const
void operator=(const LduMatrix< Type, DType, LUType > &)
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))
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
volScalarField H(IOobject("H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
LduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
tmp< Field< Type > > H(const Field< Type > &) const
Field< LUType > & upper()
void operator-=(const LduMatrix< Type, DType, LUType > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
void operator+=(const LduMatrix< Type, DType, LUType > &)
errorManip< error > abort(error &err)
void operator*=(const scalarField &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
A face is a list of labels corresponding to mesh vertices.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
const volScalarField & psi
tmp< Field< Type > > faceH(const Field< Type > &) const
Field< LUType > & lower()