36 #include <boost/shared_ptr.hpp>
69 m_declareExpansionAsContField(false),
70 m_declareExpansionAsDisContField(false),
71 m_requireBoundaryExpansion(false),
75 m_setUpEquiSpacedFields(false),
86 vector<LibUtilities::FieldDefinitionsSharedPtr>
m_fielddef;
88 vector<MultiRegions::ExpListSharedPtr>
m_exp;
118 bool fldfilegiven =
false)
124 int expdim = m_graph->GetMeshDimension();
125 bool dealiasing =
false;
127 m_session->MatchSolverInfo(
"USEFFT",
"FFTW", m_useFFT,
false);
134 "Quasi-3D approach is only set up for 1 or 2 "
135 "homogeneous directions");
137 if (NumHomogeneousDir == 1)
148 nplanes = m_fielddef[0]->m_numModes[1];
149 ly = m_fielddef[0]->m_homogeneousLengths[0];
150 btype = m_fielddef[0]->m_basis[1];
154 m_session->LoadParameter(
"HomModesZ", nplanes);
155 m_session->LoadParameter(
"LY",ly);
168 if(m_declareExpansionAsContField||
169 m_declareExpansionAsDisContField)
171 ASSERTL0(
false,
"ContField2DHomogeneous1D or "
172 "DisContField2DHomogenenous1D has "
173 "not been implemented");
178 AllocateSharedPtr(m_session, Bkey, ly,
179 m_useFFT, dealiasing,
183 else if (NumHomogeneousDir == 2)
193 nylines = m_fielddef[0]->m_numModes[1];
194 nzlines = m_fielddef[0]->m_numModes[2];
195 ly = m_fielddef[0]->m_homogeneousLengths[0];
196 lz = m_fielddef[0]->m_homogeneousLengths[1];
197 btype1 = m_fielddef[0]->m_basis[1];
198 btype2 = m_fielddef[0]->m_basis[2];
202 m_session->LoadParameter(
"HomModesY", nylines);
203 m_session->LoadParameter(
"HomModesZ", nzlines);
204 m_session->LoadParameter(
"LY",ly);
205 m_session->LoadParameter(
"LZ",lz);
220 if(m_declareExpansionAsContField)
224 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
225 ly, lz, m_useFFT, dealiasing,
227 m_session->GetVariable(0));
229 else if(m_declareExpansionAsDisContField)
233 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
234 ly, lz, m_useFFT, dealiasing,
236 m_session->GetVariable(0));
242 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
243 ly, lz, m_useFFT, dealiasing,
253 if(m_declareExpansionAsContField)
257 m_session->GetVariable(0));
259 else if(m_declareExpansionAsDisContField)
263 m_session->GetVariable(0));
278 "NumHomogeneousDir is only set up for 1");
280 if (NumHomogeneousDir == 1)
291 nplanes = m_fielddef[0]->m_numModes[2];
292 lz = m_fielddef[0]->m_homogeneousLengths[0];
293 btype = m_fielddef[0]->m_basis[2];
307 m_session->LoadParameter(
"HomModesZ", nplanes);
308 m_session->LoadParameter(
"LZ",lz);
319 if(m_declareExpansionAsContField)
323 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
325 m_session->GetVariable(0));
327 else if (m_declareExpansionAsDisContField)
331 AllocateSharedPtr(m_session,
334 m_session->GetVariable(0));
340 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
341 dealiasing, m_graph);
349 if(m_declareExpansionAsContField)
353 m_session->GetVariable(0));
355 else if(m_declareExpansionAsDisContField)
359 m_session->GetVariable(0));
375 if(m_declareExpansionAsContField)
379 m_session->GetVariable(0));
381 else if(m_declareExpansionAsDisContField)
385 m_session->GetVariable(0));
397 ASSERTL0(
false,
"Expansion dimension not recognised");
405 string var =
"DefaultVar",
406 bool NewField =
false)
408 if(var.compare(
"DefaultVar") == 0 && m_requireBoundaryExpansion)
410 if (m_session->GetVariables().size())
412 var = m_session->GetVariables()[0];
416 switch (m_graph->GetMeshDimension())
420 if (NumHomogeneousDir == 1)
422 ASSERTL0( !(m_declareExpansionAsContField ||
423 m_declareExpansionAsDisContField),
424 "ContField2DHomogeneous1D or "
425 "DisContField2DHomogenenous1D has not been "
434 AllocateSharedPtr(*tmp2);
437 else if (NumHomogeneousDir == 2)
439 if(m_declareExpansionAsContField)
447 AllocateSharedPtr(*tmp2);
449 else if(m_declareExpansionAsDisContField)
457 AllocateSharedPtr(*tmp2);
467 AllocateSharedPtr(*tmp2);
474 if(m_declareExpansionAsContField)
483 else if(m_declareExpansionAsDisContField)
507 if (NumHomogeneousDir == 1)
509 if(m_declareExpansionAsContField)
513 bool dealiasing =
false;
518 m_exp[0]->GetHomogeneousBasis()
520 m_exp[0]->GetHomoLen(),
521 m_useFFT, dealiasing, m_graph, var);
529 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
532 AllocateSharedPtr(*tmp2, m_graph, var);
535 else if(m_declareExpansionAsDisContField)
539 bool dealiasing =
false;
544 m_exp[0]->GetHomogeneousBasis()
546 m_exp[0]->GetHomoLen(),
547 m_useFFT, dealiasing, m_graph,var);
554 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
558 AllocateSharedPtr(*tmp2);
565 bool dealiasing =
false;
570 m_exp[0]->GetHomogeneousBasis()
572 m_exp[0]->GetHomoLen(),
573 m_useFFT, dealiasing, m_graph);
580 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
584 AllocateSharedPtr(*tmp2);
591 if(m_declareExpansionAsContField)
609 else if(m_declareExpansionAsDisContField)
640 if(m_declareExpansionAsContField)
657 m_locToGlobalMap = tmp2->GetLocalToGlobalMap();
660 else if(m_declareExpansionAsDisContField)
689 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
bool m_requireBoundaryExpansion
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...
boost::shared_ptr< DisContField3DHomogeneous2D > DisContField3DHomogeneous2DSharedPtr
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
1D Evenly-spaced points using Fourier Fit
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.