5 #ifndef _DISTFUNCTFIELDS_H_
6 #define _DISTFUNCTFIELDS_H_
36 std::vector<Field*>
dsf;
61 for(
int n=0; n<numFields; n++)
65 string fieldName = dsfname + ss.str();
68 const int numMeshes =
_meshes.size();
69 for (
int n=0; n<numMeshes; n++)
91 for(
int j=0;j<numFields;j++){
100 for(
int c=0; c<nCells;c++) {
101 fc[c]=density[c]/pow((pi*temperature[c]),1.5)*
102 exp(-(pow((cx[j]-v[c][0]),2.0)+pow((cy[j]-v[c][1]),2.0)+
103 pow((cz[j]-v[c][2]),2.0))/temperature[c]);
121 for(
int j=0; j<numFields; j++)
125 string fieldName = dsfname + ss.str();
126 dsf.push_back(
new Field(fieldName));
128 const int numMeshes =
_meshes.size();
129 for (
int n=0; n<numMeshes; n++)
141 for(
int j=0;j<numFields;j++){
150 for(
int c=0; c<nCells;c++){
151 fc[c]=1./pow(pi*1.0,1.5)*exp(-(pow((cx[j]-1.0),2.0)+pow((cy[j]-0.0),2.0)+ pow((cz[j]-0.0),2.0))/1.0);
164 const int numMeshes =
_meshes.size();
165 for (
int n=0; n<numMeshes; n++)
181 for(
int j=0;j< numFields;j++){
184 for(
int c=0; c<nCells;c++){
185 f[c]=density[c]/pow((pi*temperature[c]),1.5)*
186 exp(-(pow((cx[j]-v[c][0]),2.0)+pow((cy[j]-v[c][1]),2.0)+
187 pow((cz[j]-v[c][2]),2.0))/temperature[c]);
195 const int numMeshes =
_meshes.size();
196 for (
int n=0; n<numMeshes; n++)
208 for(
int j=0;j< numFields;j++){
211 for(
int c=0; c<nCells;c++){
212 f[c]=0.5*1.0/pow((pi*1.0),1.5)*exp(-(pow((cx[j]-4.0),2.0)+pow((cy[j]-0.0),2.0)+pow((cz[j]-0.0),2.0))/1.0)
213 +0.5*1.0/pow((pi*1.0),1.5)*exp(-(pow((cx[j]-4.0),2.0)+pow((cy[j]-0.0),2.0)+pow((cz[j]-0.0),2.0))/1.0);
222 pFile = fopen(
"outputf0.plt",
"w");
226 fprintf(pFile,
"%s \n",
"VARIABLES= 'cx', 'cy', 'cz', 'f',");
227 fprintf(pFile,
"%s %i %s %i %s %i \n",
"ZONE I=", N3,
",J=",N2,
"K=",N1);
228 fprintf(pFile,
"%s\n",
"F=POINT");
229 const int numMeshes =
_meshes.size();
230 for (
int n=0; n<numMeshes; n++){
238 for(
int j=0;j< numFields;j++){
241 fprintf(pFile,
"%E %E %E %E\n",cx[j],cy[j],cz[j],f[0]);
const Quadrature< T > _quadrature
DistFunctFields(const MeshList &meshes, const MacroFields ¯oPr, const Quadrature< T > &quad, const string dsfname)
DistFunctFields(const MeshList &meshes, const Quadrature< T > &quad, const string dsfname)
const StorageSite & getCells() const
int getCountLevel1() const
Array< VectorT3 > VectorT3Array
void initializeMaxwellian(const MacroFields ¯oPr, DistFunctFields< T > &dsfPtr)
void addArray(const StorageSite &, shared_ptr< ArrayBase > a)
void OutputDistributionFunction(DistFunctFields< T > &dsfPtr)
std::vector< Field * > dsf
void weightedMaxwellian(DistFunctFields< T > &dsfPtr)
vector< Mesh * > MeshList
const Field & getField(int indx) const