using System;
namespace Science.Mathematics.PartialDifferentialEquation
{
///
/// Domain in Two Dimensional Space
///
public class Domain2D
{
private double xf, xt, yf, yt;
public Domain2D()
{
}
private Function.ToLastType[] cf2;
private Function.ToLastType cf;
public Function.ToLastType ConditionFunctionLessThanZero
{
set
{
cf = value;
cf2 = new Function.ToLastType[1];
cf2[0] = cf;
}
}
public Function.ToLastType[] ConditionFunctionsLessThanZero
{
set{cf2 = value;}
}
public double LowerBoundOfX
{
get{return xf;}
set{xf=value;}
}
public double UpperBoundOfX
{
get{return xt;}
set{xt=value;}
}
public double LowerBoundOfY
{
get{return yf;}
set{yf=value;}
}
public double UpperBoundOfY
{
get{return yt;}
set{yt=value;}
}
public bool Check(double x, double y)
{
for(int k = 0; k < cf2.Length; k++)
if(cf2[k](x,y) >= 0.0) return false;
return true;
}
}
}