Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
4e99a6f3
Commit
4e99a6f3
authored
Nov 02, 2011
by
andy
Browse files
ENH: Clean-up up AMI write patch/weights
parent
3d03da8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
View file @
4e99a6f3
...
...
@@ -850,14 +850,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing
return
;
}
if
(
debug
)
{
Info
<<
"AMI: calcAddressing"
<<
endl
;
writePatch
(
srcPatch
,
"VTK"
,
"source"
);
writePatch
(
tgtPatch
,
"VTK"
,
"target"
);
}
// temporary storage for addressing and weights
List
<
DynamicList
<
label
>
>
srcAddr
(
srcPatch
.
size
());
List
<
DynamicList
<
scalar
>
>
srcWght
(
srcPatch
.
size
());
...
...
@@ -1307,8 +1299,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
if
(
debug
)
{
writeWeights
(
srcWeights_
,
srcPatch
,
"VTK"
,
"source"
);
writeWeights
(
tgtWeights_
,
tgtPatch
,
"VTK"
,
"target"
);
writeFaceConnectivity
(
srcPatch
,
newTgtPatch
,
srcAddress_
);
}
}
...
...
@@ -1318,12 +1308,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
calcAddressing
(
srcPatch
,
tgtPatch
);
if
(
debug
)
{
writeWeights
(
srcWeights_
,
srcPatch
,
"VTK"
,
"source"
);
writeWeights
(
tgtWeights_
,
tgtPatch
,
"VTK"
,
"target"
);
}
normaliseWeights
(
srcPatch
,
"source"
,
srcAddress_
,
srcWeights_
,
true
);
normaliseWeights
(
tgtPatch
,
"target"
,
tgtAddress_
,
tgtWeights_
,
true
);
}
...
...
@@ -1576,74 +1560,4 @@ const
}
template
<
class
SourcePatch
,
class
TargetPatch
>
void
Foam
::
AMIInterpolation
<
SourcePatch
,
TargetPatch
>::
writeWeights
(
const
scalarListList
&
weights
,
const
primitivePatch
&
patch
,
const
word
&
folder
,
const
word
&
prefix
)
const
{
/*
static label i = 0;
scalarField wghtSum(weights.size(), 0.0);
forAll(weights, faceI)
{
scalar s = sum(weights[faceI]);
wghtSum[faceI] = s;
}
vtkSurfaceWriter writer;
writer.write
(
folder,
prefix
+ '_' + Foam::name(i) + "_proc" + Foam::name(Pstream::myProcNo()),
patch.localPoints(),
patch.localFaces(),
"weights",
wghtSum,
false
);
i++;
*/
}
template
<
class
SourcePatch
,
class
TargetPatch
>
void
Foam
::
AMIInterpolation
<
SourcePatch
,
TargetPatch
>::
writePatch
(
const
primitivePatch
&
patch
,
const
word
&
folder
,
const
word
&
prefix
)
const
{
/*
static label i = 0;
vtkSurfaceWriter writer;
writer.write
(
folder,
prefix
+ '_' + Foam::name(i) + "_proc" + Foam::name(Pstream::myProcNo()),
patch.localPoints(),
patch.localFaces(),
"AMIPatch",
scalarField(patch.size(), Pstream::myProcNo()),
false
);
i++;
*/
}
// ************************************************************************* //
src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
View file @
4e99a6f3
...
...
@@ -416,25 +416,6 @@ public:
const
primitivePatch
&
tgtPatch
,
const
labelListList
&
srcAddress
)
const
;
//- Write weights to VTK file
void
writeWeights
(
const
scalarListList
&
weights
,
const
primitivePatch
&
patch
,
const
word
&
folder
,
const
word
&
prefix
)
const
;
//- Write patch
void
writePatch
(
const
primitivePatch
&
patch
,
const
word
&
folder
,
const
word
&
prefix
)
const
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment