Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13846b5b98 | ||
|
|
352fe1b703 | ||
|
|
50dd45fb23 |
@@ -2750,6 +2750,26 @@ void GridFunction::ProjectBdrCoefficientNormal(
|
||||
void GridFunction::ProjectBdrCoefficientTangent(
|
||||
VectorCoefficient &vcoeff, const Array<int> &bdr_attr)
|
||||
{
|
||||
if (fes->FEColl()->GetContType() == FiniteElementCollection::TANGENTIAL)
|
||||
{
|
||||
const FiniteElement *fe;
|
||||
ElementTransformation *T;
|
||||
Array<int> vdofs;
|
||||
Vector vals;
|
||||
|
||||
for (int i = 0; i < fes->GetNBE(); i++)
|
||||
{
|
||||
if (bdr_attr[fes->GetBdrAttribute(i) - 1] == 0) { continue; }
|
||||
fe = fes->GetBE(i);
|
||||
T = fes->GetBdrElementTransformation(i);
|
||||
fes->GetBdrElementVDofs(i, vdofs);
|
||||
vals.SetSize(vdofs.Size());
|
||||
fe->Project(vcoeff, *T, vals);
|
||||
SetSubVector(vdofs, vals);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Array<int> values_counter;
|
||||
AccumulateAndCountBdrTangentValues(vcoeff, bdr_attr, values_counter);
|
||||
ComputeMeans(ARITHMETIC, values_counter);
|
||||
|
||||
@@ -711,6 +711,26 @@ void ParGridFunction::ProjectBdrCoefficient(
|
||||
void ParGridFunction::ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff,
|
||||
const Array<int> &bdr_attr)
|
||||
{
|
||||
if (pfes->FEColl()->GetContType() == FiniteElementCollection::TANGENTIAL)
|
||||
{
|
||||
const FiniteElement *fe;
|
||||
ElementTransformation *T;
|
||||
Array<int> vdofs;
|
||||
Vector vals;
|
||||
|
||||
for (int i = 0; i < pfes->GetNBE(); i++)
|
||||
{
|
||||
if (bdr_attr[pfes->GetBdrAttribute(i) - 1] == 0) { continue; }
|
||||
fe = pfes->GetBE(i);
|
||||
T = pfes->GetBdrElementTransformation(i);
|
||||
pfes->GetBdrElementVDofs(i, vdofs);
|
||||
vals.SetSize(vdofs.Size());
|
||||
fe->Project(vcoeff, *T, vals);
|
||||
SetSubVector(vdofs, vals);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Array<int> values_counter;
|
||||
AccumulateAndCountBdrTangentValues(vcoeff, bdr_attr, values_counter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user