Permalink
Browse files

Merge branch 'real_and_imag_no_deriv' into 'master'

derive real and imag cf from CoefficientFunctionNoDerivative

See merge request jschoeberl/ngsolve!303
  • Loading branch information...
JSchoeberl committed Feb 9, 2018
2 parents b183995 + f72f561 commit 3c780f6a45b9e6e37dc701f9e60d5f388f8820ed
Showing with 13 additions and 4 deletions.
  1. +13 −4 fem/coefficient.cpp
@@ -6046,13 +6046,18 @@ shared_ptr<CoefficientFunction> MakeCoordinateCoefficientFunction (int comp)
}
};
class RealCF : public CoefficientFunction
class RealCF : public CoefficientFunctionNoDerivative
{
shared_ptr<CoefficientFunction> cf;
public:
RealCF(shared_ptr<CoefficientFunction> _cf) : cf(_cf), CoefficientFunction(1,false)
RealCF(shared_ptr<CoefficientFunction> _cf) : cf(_cf), CoefficientFunctionNoDerivative(1,false)
{ ; }
virtual string GetDescription() const override
{
return "RealCF";
}
virtual double Evaluate(const BaseMappedIntegrationPoint& ip) const override
{
if(cf->IsComplex())
@@ -6065,12 +6070,16 @@ shared_ptr<CoefficientFunction> MakeCoordinateCoefficientFunction (int comp)
}
};
class ImagCF : public CoefficientFunction
class ImagCF : public CoefficientFunctionNoDerivative
{
shared_ptr<CoefficientFunction> cf;
public:
ImagCF(shared_ptr<CoefficientFunction> _cf) : cf(_cf), CoefficientFunction(1,false)
ImagCF(shared_ptr<CoefficientFunction> _cf) : cf(_cf), CoefficientFunctionNoDerivative(1,false)
{ ; }
virtual string GetDescription() const override
{
return "ImagCF";
}
virtual double Evaluate(const BaseMappedIntegrationPoint& ip) const override
{

0 comments on commit 3c780f6

Please sign in to comment.