Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added flow variable classes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions src/include/pencilDcmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,5 +554,65 @@ class PoissonGPU : public PencilDcmp
// static const char *PittPackGetErrorEnum(PittPackResult error);
void debug1();
};
class CFlowVariable : public PencilDcmp
{
private:

CFlowVariable *GradX;
CFlowVariable *GradY;
CFlowVariable *GradZ;


public:
void initializeField();

CFlowVariable( int nx, int ny, int nz, int p0 ) : PencilDcmp( nx, ny, nz, p0,p0 )
{initializeField();GradX=NULL; GradY=NULL;GradZ=NULL;};

CFlowVariable(PencilDcmp *Field );
CFlowVariable operator +( const CFlowVariable& A);
// CFlowVariable* getField(){return P;};
CFlowVariable* getGradX(){return GradX;};
CFlowVariable* getGradY(){return GradY;};
CFlowVariable* getGradZ(){return GradZ;};

void computeGradX();
void computeGradY();
void computeGradZ();
CFlowVariable* shiftStaggeredX();
CFlowVariable* shiftStaggeredY();
CFlowVariable* shiftStaggeredZ();
virtual void updateGhosts()=0;


};

class CFlowVariableSingleBlock : public CFlowVariable
{

public:
CFlowVariableSingleBlock( int nx, int ny, int nz, int p0 ) : CFlowVariable( nx, ny, nz, p0 ){};
void updateGhosts();
// virtual ~CFlowVariable();

};

class CVelocitySingleBlock
{
private:
CFlowVariableSingleBlock* U;
CFlowVariableSingleBlock* V;
CFlowVariableSingleBlock* W;
CFlowVariableSingleBlock* Divergence;
public:
CVelocitySingleBlock(int nx,int ny,int nz, int p0){U=new CFlowVariableSingleBlock (nx,ny,nz,p0);};
CFlowVariable* getU(){return U;};
CFlowVariable* getV(){return V;};
CFlowVariable* getW(){return W;};

CFlowVariable* getDivergence(){return Divergence;};

void computeDivergence();

};
#endif