Skip to content
Permalink
Browse files
Merge branch 'add_missing_evaluates' into 'master'
add missing evaluates for ifpos coefficientfunction

See merge request !232
  • Loading branch information
JSchoeberl committed Sep 18, 2017
2 parents 35e4461 + 6204312 commit f5812511049f208e7e4fefa32f0e897875e5451e
Showing with 16 additions and 1 deletion.
  1. +16 −1 fem/coefficient.cpp
@@ -3871,8 +3871,15 @@ MakeOtherCoefficientFunction (shared_ptr<CoefficientFunction> me)
else
return cf_else->Evaluate(ip);
}

virtual void Evaluate (const BaseMappedIntegrationPoint& ip, FlatVector<double> values) const
{
if(cf_if->Evaluate(ip) > 0)
cf_then->Evaluate(ip,values);
else
cf_else->Evaluate(ip,values);
}

///
virtual void Evaluate (const BaseMappedIntegrationRule & ir, FlatMatrix<double> values) const
{
STACK_ARRAY(double, hmem1, ir.Size());
@@ -3896,6 +3903,14 @@ MakeOtherCoefficientFunction (shared_ptr<CoefficientFunction> me)
// values(i) = (if_values(i) > 0) ? then_values(i) : else_values(i);
}

virtual void Evaluate (const BaseMappedIntegrationPoint & ip, FlatVector<Complex> values) const
{
if(cf_if->Evaluate(ip)>0)
cf_then->Evaluate(ip,values);
else
cf_else->Evaluate(ip,values);
}


virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<double>> values) const
{

0 comments on commit f581251

Please sign in to comment.