36 #include <boost/shared_ptr.hpp>
69 m_declareExpansionAsContField(false),
70 m_declareExpansionAsDisContField(false),
71 m_declareAsNewField(false),
75 m_setUpEquiSpacedFields(false),
86 vector<LibUtilities::FieldDefinitionsSharedPtr>
m_fielddef;
88 vector<MultiRegions::ExpListSharedPtr>
m_exp;
117 bool fldfilegiven =
false)
123 int expdim = m_graph->GetMeshDimension();
124 bool dealiasing =
false;
126 m_session->MatchSolverInfo(
"USEFFT",
"FFTW", m_useFFT,
false);
133 "Quasi-3D approach is only set up for 1 or 2 "
134 "homogeneous directions");
136 if (NumHomogeneousDir == 1)
147 nplanes = m_fielddef[0]->m_numModes[1];
148 ly = m_fielddef[0]->m_homogeneousLengths[0];
149 btype = m_fielddef[0]->m_basis[1];
153 m_session->LoadParameter(
"HomModesZ", nplanes);
154 m_session->LoadParameter(
"LY",ly);
167 if(m_declareExpansionAsContField||
168 m_declareExpansionAsDisContField)
170 ASSERTL0(
false,
"ContField2DHomogeneous1D or "
171 "DisContField2DHomogenenous1D has "
172 "not been implemented");
177 AllocateSharedPtr(m_session, Bkey, ly,
178 m_useFFT, dealiasing,
182 else if (NumHomogeneousDir == 2)
192 nylines = m_fielddef[0]->m_numModes[1];
193 nzlines = m_fielddef[0]->m_numModes[2];
194 ly = m_fielddef[0]->m_homogeneousLengths[0];
195 lz = m_fielddef[0]->m_homogeneousLengths[1];
196 btype1 = m_fielddef[0]->m_basis[1];
197 btype2 = m_fielddef[0]->m_basis[2];
201 m_session->LoadParameter(
"HomModesY", nylines);
202 m_session->LoadParameter(
"HomModesZ", nzlines);
203 m_session->LoadParameter(
"LY",ly);
204 m_session->LoadParameter(
"LZ",lz);
219 if(m_declareExpansionAsContField)
223 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
224 ly, lz, m_useFFT, dealiasing,
226 m_session->GetVariable(0));
228 else if(m_declareExpansionAsDisContField)
232 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
233 ly, lz, m_useFFT, dealiasing,
235 m_session->GetVariable(0));
241 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
242 ly, lz, m_useFFT, dealiasing,
252 if(m_declareExpansionAsContField)
256 m_session->GetVariable(0));
258 else if(m_declareExpansionAsDisContField)
262 m_session->GetVariable(0));
277 "NumHomogeneousDir is only set up for 1");
279 if (NumHomogeneousDir == 1)
290 nplanes = m_fielddef[0]->m_numModes[2];
291 lz = m_fielddef[0]->m_homogeneousLengths[0];
292 btype = m_fielddef[0]->m_basis[2];
306 m_session->LoadParameter(
"HomModesZ", nplanes);
307 m_session->LoadParameter(
"LZ",lz);
318 if(m_declareExpansionAsContField)
322 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
324 m_session->GetVariable(0));
326 else if (m_declareExpansionAsDisContField)
330 AllocateSharedPtr(m_session,
333 m_session->GetVariable(0));
339 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
340 dealiasing, m_graph);
348 if(m_declareExpansionAsContField)
352 m_session->GetVariable(0));
354 else if(m_declareExpansionAsDisContField)
358 m_session->GetVariable(0));
374 if(m_declareExpansionAsContField)
378 m_session->GetVariable(0));
380 else if(m_declareExpansionAsDisContField)
384 m_session->GetVariable(0));
396 ASSERTL0(
false,
"Expansion dimension not recognised");
404 string var =
"DefaultVar",
405 bool NewField =
false)
407 if (m_declareAsNewField)
410 var = m_session->GetVariables()[0];
413 switch (m_graph->GetMeshDimension())
417 if (NumHomogeneousDir == 1)
419 ASSERTL0( !(m_declareExpansionAsContField ||
420 m_declareExpansionAsDisContField),
421 "ContField2DHomogeneous1D or "
422 "DisContField2DHomogenenous1D has not been "
431 AllocateSharedPtr(*tmp2);
434 else if (NumHomogeneousDir == 2)
436 if(m_declareExpansionAsContField)
444 AllocateSharedPtr(*tmp2);
446 else if(m_declareExpansionAsDisContField)
454 AllocateSharedPtr(*tmp2);
464 AllocateSharedPtr(*tmp2);
471 if(m_declareExpansionAsContField)
480 else if(m_declareExpansionAsDisContField)
504 if (NumHomogeneousDir == 1)
506 if(m_declareExpansionAsContField)
510 bool dealiasing =
false;
515 m_exp[0]->GetHomogeneousBasis()
517 m_exp[0]->GetHomoLen(),
518 m_useFFT, dealiasing, m_graph, var);
526 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
529 AllocateSharedPtr(*tmp2);
532 else if(m_declareExpansionAsDisContField)
536 bool dealiasing =
false;
541 m_exp[0]->GetHomogeneousBasis()
543 m_exp[0]->GetHomoLen(),
544 m_useFFT, dealiasing, m_graph,var);
551 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
555 AllocateSharedPtr(*tmp2);
562 bool dealiasing =
false;
567 m_exp[0]->GetHomogeneousBasis()
569 m_exp[0]->GetHomoLen(),
570 m_useFFT, dealiasing, m_graph);
577 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
581 AllocateSharedPtr(*tmp2);
588 if(m_declareExpansionAsContField)
606 else if(m_declareExpansionAsDisContField)
637 if(m_declareExpansionAsContField)
654 m_locToGlobalMap = tmp2->GetLocalToGlobalMap();
657 else if(m_declareExpansionAsDisContField)
686 ASSERTL0(
false,
"Expansion dimension not recognised");
vector< MultiRegions::ExpListSharedPtr > m_exp
#define ASSERTL0(condition, msg)
boost::shared_ptr< ContField1D > ContField1DSharedPtr
LibUtilities::PtsIOSharedPtr m_ptsIO
boost::shared_ptr< ContField3DHomogeneous1D > ContField3DHomogeneous1DSharedPtr
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
bool m_setUpEquiSpacedFields
MultiRegions::AssemblyMapCGSharedPtr m_locToGlobalMap
boost::shared_ptr< DisContField3DHomogeneous1D > DisContField3DHomogeneous1DSharedPtr
MultiRegions::ExpListSharedPtr AppendExpList(int NumHomogeneousDir, string var="DefaultVar", bool NewField=false)
vector< LibUtilities::FieldDefinitionsSharedPtr > m_fielddef
boost::shared_ptr< ContField2D > ContField2DSharedPtr
LibUtilities::CommSharedPtr m_comm
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
std::map< std::string, std::string > FieldMetaDataMap
boost::shared_ptr< PtsField > PtsFieldSharedPtr
boost::shared_ptr< ExpList3DHomogeneous2D > ExpList3DHomogeneous2DSharedPtr
Shared pointer to an ExpList3DHomogeneous2D object.
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
1D Evenly-spaced points using Lagrange polynomial
boost::shared_ptr< DisContField3DHomogeneous2D > DisContField3DHomogeneous2DSharedPtr
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
MultiRegions::ExpListSharedPtr SetUpFirstExpList(int NumHomogeneousDir, bool fldfilegiven=false)
This class is the abstraction of a global continuous two- dimensional spectral/hp element expansion w...
LibUtilities::PtsFieldSharedPtr m_fieldPts
Abstraction of a global continuous one-dimensional spectral/hp element expansion which approximates t...
boost::shared_ptr< ContField3DHomogeneous2D > ContField3DHomogeneous2DSharedPtr
boost::shared_ptr< ExpList1D > ExpList1DSharedPtr
Shared pointer to an ExpList1D object.
vector< vector< double > > m_data
bool m_declareExpansionAsDisContField
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
boost::shared_ptr< DisContField2D > DisContField2DSharedPtr
This class is the abstraction of a global discontinuous two- dimensional spectral/hp element expansio...
LibUtilities::FieldIOSharedPtr m_fld
Defines a specification for a set of points.
boost::shared_ptr< FieldIO > FieldIOSharedPtr
SpatialDomains::MeshGraphSharedPtr m_graph
boost::shared_ptr< DisContField1D > DisContField1DSharedPtr
boost::shared_ptr< ExpList2D > ExpList2DSharedPtr
Shared pointer to an ExpList2D object.
boost::shared_ptr< DisContField3D > DisContField3DSharedPtr
boost::shared_ptr< Field > FieldSharedPtr
boost::shared_ptr< ExpList2DHomogeneous1D > ExpList2DHomogeneous1DSharedPtr
Shared pointer to an ExpList2DHomogeneous1D object.
boost::shared_ptr< PtsIO > PtsIOSharedPtr
vector< unsigned int > m_bndRegionsToWrite
boost::shared_ptr< ExpList3D > ExpList3DSharedPtr
Shared pointer to an ExpList3D object.
static PtsFieldSharedPtr NullPtsField
Fourier ModifiedExpansion with just the first mode .
This class is the abstraction of a one-dimensional multi-elemental expansions which is merely a colle...
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Abstraction of a three-dimensional multi-elemental expansion which is merely a collection of local ex...
boost::shared_ptr< ExpList3DHomogeneous1D > ExpList3DHomogeneous1DSharedPtr
Shared pointer to an ExpList3DHomogeneous1D object.
bool m_declareExpansionAsContField
map< string, vector< string > > m_inputfiles
LibUtilities::SessionReaderSharedPtr m_session
boost::shared_ptr< ContField3D > ContField3DSharedPtr
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
boost::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.