Commit 1252520b authored by Jan Zapletal's avatar Jan Zapletal

data can be nullptr when assembling S, representation formula returns when data==nullptr

parent 2a0f815d
......@@ -192,8 +192,10 @@ void getLaplaceSteklovPoincare(
Smat.scale(alpha);
delete VinvK;
data->V = V;
data->K = K;
if ( data != nullptr ) {
data->V = V;
data->K = K;
}
if ( quadFar ) delete [] quadFar;
}
......@@ -215,16 +217,16 @@ void evaluateLaplaceRepresentationFormula(
typedef typename GetType<LO, SC>::SCVT SCVT;
FullMatrix< LO, SC > * V = data->V;
FullMatrix< LO, SC > * K = data->K;
if ( V == nullptr || K == nullptr ) {
if ( data == nullptr || data->V == nullptr || data->K == nullptr ) {
for ( LO i = 0; i < nPoints; ++i ) {
values[ i ] = 0.0;
}
return;
}
FullMatrix< LO, SC > * V = data->V;
FullMatrix< LO, SC > * K = data->K;
std::vector< SCVT > nodesv;
nodesv.assign( nodes, nodes + 3 * nNodes );
std::vector< LO > elemsv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment