Commit 9345cef1 authored by Jan Schäfer's avatar Jan Schäfer
Browse files

Dodelany operatorove funkce, pripraveno na implementaci stale nevim jak...

Dodelany operatorove funkce, pripraveno na implementaci stale nevim jak nabindovat differentialoperator,
syntakticke chyby uz nejsou, pres make se to prelozi cele

X
parent e0ba0750
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#include "LaxFridrichsContinuity.h"
#include "LaxFridrichsMomentum.h"
#include "LaxFridrichsEnergy.h"
#include "EulerVelGetter.h"
#include "EulerPressureGetter.h"

#include "eulerRhs.h"
#include "eulerBuildConfigTag.h"
+5 −5
Original line number Diff line number Diff line
@@ -37,12 +37,12 @@ class eulerProblem:


      static tnlString getTypeStatic();
      tnlSharedVector< RealType, DeviceType, IndexType > rho;
      tnlSharedVector< RealType, DeviceType, IndexType > rhoVel;
      tnlSharedVector< RealType, DeviceType, IndexType > energy;
      tnlVector< RealType, DeviceType, IndexType > rho;
      tnlVector< RealType, DeviceType, IndexType > rhoVel;
      tnlVector< RealType, DeviceType, IndexType > energy;
      tnlVector< RealType, DeviceType, IndexType > data;
      tnlSharedVector< RealType, DeviceType, IndexType > pressure;
      tnlSharedVector< RealType, DeviceType, IndexType > velocity;
      tnlVector< RealType, DeviceType, IndexType > pressure;
      tnlVector< RealType, DeviceType, IndexType > velocity;
      double gamma;

      tnlString getPrologHeader() const;
+41 −27
Original line number Diff line number Diff line
@@ -240,13 +240,6 @@ getExplicitRHS( const RealType& time,
                DofVectorType& _fu,
                MeshDependentDataType& meshDependentData )
{
   /* 
    W[1] [0				...	count-1	]
    W[2] [count	...	2*count-1	]
    W[3] [2*count	...	3*count-1	]
    V this->velocity[]
    p this->pressure[]
    */
    typedef typename MeshType::Cell Cell;
    int count = mesh.template getEntitiesCount< Cell >()/3;
	//bind _u
@@ -261,52 +254,73 @@ getExplicitRHS( const RealType& time,

   MeshFunctionType velocity( mesh, this->velocity );
   MeshFunctionType pressure( mesh, this->pressure );
   MeshFunctionType uRho( mesh, _uRho ); 
   MeshFunctionType fuRho( mesh, _fuRho );
   MeshFunctionType uRhoVelocity( mesh, _uRhoVelocity ); 
   MeshFunctionType fuRhoVelocity( mesh, _fuRhoVelocity );
   MeshFunctionType uEnergy( mesh, _uEnergy ); 
   MeshFunctionType fuEnergy( mesh, _fuEnergy );

/*
   //velocity
   EulerVelGetter.setRhoVel(_urhoVel);
   EulerVelGetter.setRho(_urho); 
   tnlOperatorFunction< EulerVelGetter, MeshFunction, void, time > OFVel;
   velocity = OFVel;

   //pressure
   EulerPressureGetter.setRhoVel(_urhoVel);
   EulerPressureGetter.setVel(velocity);
   EulerPressureGetter.setGamma(gamma);
   EulerPressureGetter.setEnergy(energy); 
   tnlOperatorFunction<EulerPressureGetter,MeshFunction,void,time>OFPressure;
   pressure = OFPressure;

   //rho
   this->bindDofs( mesh, _u );
   LaxFridrichsContinuity.setTau(tau);
   LaxFridrichsContinuity.setVelocity(velocity);
   tnlExplicitUpdater< Mesh, MeshFunctionType, DifferentialOperator, BoundaryCondition, RightHandSide > explicitUpdater;
   MeshFunctionType uRho( mesh, _uRho ); 
   MeshFunctionType fuRho( mesh, _fuRho );
   diffrrentialOperatorRho.setTau(tau);
   differentialOperatorRho.setVelocity(velocity) 
   explicitUpdater.template update< typename Mesh::Cell >( time,
                                                           mesh,
                                                           this->differentialOperatorRho,
                                                           this->LaxFridrichsContinuity,
                                                           this->boundaryCondition,
                                                           this->rightHandSide,
                                                           uRho,
                                                           fuRho );

   //rhoVelocity
   MeshFunctionType uRhoVelocity( mesh, _uRhoVelocity ); 
   MeshFunctionType fuRhoVelocity( mesh, _fuRhoVelocity );
   diffrrentialOperatorRhoVelocity.setTau(tau);
   differentialOperatorRhoVelocity.setVelocity(velocity)
   differentialOperatorRhoVelocity.setPressure(pressure) 
   LaxFridrichsMomentum.setTau(tau);
   LaxFridrichsMomentum.setVelocity(velocity);
   LaxFridrichsMomentum.setPressure(pressure);
   tnlExplicitUpdater< Mesh, MeshFunctionType, DifferentialOperator, BoundaryCondition, RightHandSide > explicitUpdater;
   explicitUpdater.template update< typename Mesh::Cell >( time,
                                                           mesh,
                                                           this->differentialOperatorRhoVelocity,
                                                           this->LaxFridrichsMomentum,
                                                           this->boundaryCondition,
                                                           this->rightHandSide,
                                                           uRhoVelocity,
                                                           fuRhoVelocity );
   

   //energy
   MeshFunctionType uEnergy( mesh, _uEnergy ); 
   MeshFunctionType fuEnergy( mesh, _fuEnergy );
   diffrrentialOperatorEnergy.setTau(tau);
   diffrrentialOperatorEnergy.setPressure(pressure);
   diffrrentialOperatorEnergy.setVelocity(velocity); 
   LaxFridrichsEnergy.setTau(tau);
   LaxFridrichsEnergy.setPressure(pressure);
   LaxFridrichsEnergy.setVelocity(velocity);
   tnlExplicitUpdater< Mesh, MeshFunctionType, DifferentialOperator, BoundaryCondition, RightHandSide > explicitUpdater;
   explicitUpdater.template update< typename Mesh::Cell >( time,
                                                           mesh,
                                                           this->differentialOperatorEnergy,
                                                           this->LaxFridrichsEnergy,
                                                           this->boundaryCondition,
                                                           this->rightHandSide,
                                                           uEnergy,
                                                           fuEnergy );   
   
   tnlBoundaryConditionsSetter< MeshFunctionType, BoundaryCondition > boundaryConditionsSetter; 
   boundaryConditionsSetter.template apply< typename Mesh::Cell >( 
      this->boundaryCondition, 
      time + tau, 
       u );
       u );*/
 }

template< typename Mesh,
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@
#include "LaxFridrichsEnergy.h"
#include "LaxFridrichsMomentumX.h"
#include "LaxFridrichsMomentumY.h"
#include "EulerPressureGetter.h"
#include "EulerVelXGetter.h"
#include "EulerVelYGetter.h"
#include "EulerVelGetter.h"
#include "eulerRhs.h"
#include "eulerBuildConfigTag.h"

+8 −8
Original line number Diff line number Diff line
@@ -37,15 +37,15 @@ class eulerProblem:
	tnlVector< RealType, DeviceType, IndexType > _fuRhoVelocityY;
	tnlVector< RealType, DeviceType, IndexType > _fuEnergy;

      tnlSharedVector< RealType, DeviceType, IndexType > rho;
      tnlSharedVector< RealType, DeviceType, IndexType > rhoVelX;
      tnlSharedVector< RealType, DeviceType, IndexType > rhoVelY;
      tnlSharedVector< RealType, DeviceType, IndexType > energy;
      tnlVector< RealType, DeviceType, IndexType > rho;
      tnlVector< RealType, DeviceType, IndexType > rhoVelX;
      tnlVector< RealType, DeviceType, IndexType > rhoVelY;
      tnlVector< RealType, DeviceType, IndexType > energy;
      tnlVector< RealType, DeviceType, IndexType > data;
      tnlSharedVector< RealType, DeviceType, IndexType > pressure;
      tnlSharedVector< RealType, DeviceType, IndexType > velocity;
      tnlSharedVector< RealType, DeviceType, IndexType > velocityX;
      tnlSharedVector< RealType, DeviceType, IndexType > velocityY;
      tnlVector< RealType, DeviceType, IndexType > pressure;
      tnlVector< RealType, DeviceType, IndexType > velocity;
      tnlVector< RealType, DeviceType, IndexType > velocityX;
      tnlVector< RealType, DeviceType, IndexType > velocityY;
      double gamma;

      static tnlString getTypeStatic();
Loading