mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updates to jump BCs
This commit is contained in:
@ -77,7 +77,6 @@ jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
|
||||
const jumpCyclicFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
cyclicLduInterfaceField(),
|
||||
cyclicFvPatchField<Type>(ptf)
|
||||
{}
|
||||
|
||||
@ -105,12 +104,11 @@ tmp<Field<Type> > jumpCyclicFvPatchField<Type>::patchNeighbourField() const
|
||||
tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
|
||||
Field<Type>& pnf = tpnf();
|
||||
|
||||
tmp<Field<Type> > tjf = jump();
|
||||
Field<Type> jf(this->jump());
|
||||
if (!this->cyclicPatch().owner())
|
||||
{
|
||||
tjf = -tjf;
|
||||
jf *= -1.0;
|
||||
}
|
||||
const Field<Type>& jf = tjf();
|
||||
|
||||
if (this->doTransform())
|
||||
{
|
||||
@ -152,12 +150,12 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix
|
||||
// for AMG solve - only apply jump to finest level
|
||||
if (psiInternal.size() == this->internalField().size())
|
||||
{
|
||||
tmp<Field<scalar> > tjf = jump()().component(cmpt);
|
||||
Field<scalar> jf(this->jump()().component(cmpt));
|
||||
|
||||
if (!this->cyclicPatch().owner())
|
||||
{
|
||||
tjf = -tjf;
|
||||
jf *= -1.0;
|
||||
}
|
||||
const Field<scalar>& jf = tjf();
|
||||
|
||||
forAll(*this, facei)
|
||||
{
|
||||
@ -201,12 +199,12 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix
|
||||
// for AMG solve - only apply jump to finest level
|
||||
if (psiInternal.size() == this->internalField().size())
|
||||
{
|
||||
tmp<Field<Type> > tjf = jump();
|
||||
Field<Type> jf(this->jump());
|
||||
|
||||
if (!this->cyclicPatch().owner())
|
||||
{
|
||||
tjf = -tjf;
|
||||
jf *= -1.0;
|
||||
}
|
||||
const Field<Type>& jf = tjf();
|
||||
|
||||
forAll(*this, facei)
|
||||
{
|
||||
|
||||
@ -95,11 +95,10 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
||||
}
|
||||
else
|
||||
{
|
||||
// Generic input constructed from dictionary
|
||||
// Dummy jump table
|
||||
this->jumpTable_.reset(new DataEntry<scalar>("jumpTable"));
|
||||
}
|
||||
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchScalarField::operator=
|
||||
|
||||
@ -72,7 +72,6 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
||||
const fixedJumpFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
cyclicLduInterfaceField(),
|
||||
jumpCyclicFvPatchField<Type>(ptf),
|
||||
jump_(ptf.jump_)
|
||||
{}
|
||||
|
||||
@ -109,9 +109,9 @@ Foam::tmp<Foam::Field<Type> > Foam::uniformJumpFvPatchField<Type>::jump() const
|
||||
{
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
Type j = jumpTable_->value(this->db().time().value());
|
||||
const Type value = jumpTable_->value(this->db().time().value());
|
||||
|
||||
return tmp<Field<Type> >(new Field<Type>(this->size(), j));
|
||||
return tmp<Field<Type> >(new Field<Type>(this->patch().size(), value));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -134,7 +134,6 @@ void Foam::uniformJumpFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
jumpTable_->writeData(os);
|
||||
}
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -132,7 +132,6 @@ void Foam::uniformJumpAMIFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
jumpTable_->writeData(os);
|
||||
}
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user