ENH: Updates to jump BCs

This commit is contained in:
andy
2012-10-26 14:59:34 +01:00
parent e3851b081c
commit aa0a47bdfe
5 changed files with 11 additions and 17 deletions

View File

@ -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)
{

View File

@ -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=

View File

@ -72,7 +72,6 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
const fixedJumpFvPatchField<Type>& ptf
)
:
cyclicLduInterfaceField(),
jumpCyclicFvPatchField<Type>(ptf),
jump_(ptf.jump_)
{}

View File

@ -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);
}

View File

@ -132,7 +132,6 @@ void Foam::uniformJumpAMIFvPatchField<Type>::write(Ostream& os) const
{
jumpTable_->writeData(os);
}
this->writeEntry("value", os);
}