Hii everyone !!

Can anyone creat class delta.h for me !

Its about dirac delta function ( for 2d) . a simple one.

Looking urgently.

Regards,

Hii everyone !!

Can anyone creat class delta.h for me !

Its about dirac delta function ( for 2d) . a simple one.

Looking urgently.

Regards,

If you expect us to do the entire coding job for you from start to finish, you can at least tell us what a "dirac delta" function is so we don't have to research it ourselves AND code it for you too.

No one here is going to code anything for you. You are better off with learning C++ and start coding on your own. The worst part of all this is that you expect people to do all the research and then code for you. I can only give you two suggestions

1. Switch to Matlab, such functions are predefined there.
2. Use Simpson's rule for integration.

No one here is going to code anything for you. You are better off with learning C++ and start coding on your own. The worst part of all this is that you expect people to do all the research and then code for you. I can only give you two suggestions

1. Switch to Matlab, such functions are predefined there.
2. Use Simpson's rule for integration.

we r working on super computer. matlab does not support higher computing level

Well, you wanted a .h file and you linked one, so you are done, right? You are going to have to get a lot more explicit about what exactly you want. If you are using Dirac Delta functions on a supercomputer, you obviously are not a freshman taking an entry level course. If you know absolutely no C++, don't start with a Dirac Delta function, start with "Hello World". Like hammerhead said, no one is going to code this from start to finish for you, particularly since you still haven't really explained what you want. What good is a .h. file going to do you if you don't have a .cpp file to go with it?

Well, you wanted a .h file and you linked one, so you are done, right? You are going to have to get a lot more explicit about what exactly you want. If you are using Dirac Delta functions on a supercomputer, you obviously are not a freshman taking an entry level course. If you know absolutely no C++, don't start with a Dirac Delta function, start with "Hello World". Like hammerhead said, no one is going to code this from start to finish for you, particularly since you still haven't really explained what you want. What good is a .h. file going to do you if you don't have a .cpp file to go with it?

I do not have time to think so much. I have to creat this file at any cost and that i will do , no matter how.
I just axpect from this web.
Thanks for discussion.

can anyone check this. It is not working good.


/** \brief
* Needed for zero order term.
*/
class delta : public AbstractFunction<double, double>
{
public:
MEMORY_MANAGED(delta);
delta() : AbstractFunction<double, double> {};

/** \brief
* Constructor.
*/
delta(double eps_): eps(eps_) {};


/** \brief
* Implementation of AbstractFunction::operator().
*/
const double& operator()(const double& x) const
{
static double result;

if (sqrt(x**x)>eps_)
{
result = 0;
}
else (sqrt(x**x)<=eps_)

result = 0.5*[1/eps_]*[1+cos(M_PI * sqrt(x**x)/eps_)];

return result;

};
private:
double eps;

};


** \brief
* Needed for zero order term.
*/
class delta : public AbstractFunction<double, double>
{
public:
MEMORY_MANAGED(delta);
delta() : AbstractFunction<double, double> {};

/** \brief
* Constructor.
*/
delta(double eps_): eps(eps_) {};


/** \brief
* Implementation of AbstractFunction::operator().
*/
const double& operator()(const double& x) const
{
static double result;

if (sqrt(x**x)>eps_)
{
result = 0;
}
else (sqrt(x**x)<=eps_)

result = 0.5*[1/eps_]*[1+cos(M_PI * sqrt(x**x)/eps_)];

return result;

};
private:
double eps;

};

This article has been dead for over six months. Start a new discussion instead.