36 #include <boost/shared_ptr.hpp>
69 m_declareExpansionAsContField(false),
70 m_declareExpansionAsDisContField(false),
74 m_setUpEquiSpacedFields(false),
81 m_session->Finalise();
85 vector<LibUtilities::FieldDefinitionsSharedPtr>
m_fielddef;
87 vector<MultiRegions::ExpListSharedPtr>
m_exp;
114 bool fldfilegiven =
false)
120 int expdim = m_graph->GetMeshDimension();
121 bool dealiasing =
false;
123 m_session->MatchSolverInfo(
"USEFFT",
"FFTW", m_useFFT,
false);
130 "Quasi-3D approach is only set up for 1 or 2 "
131 "homogeneous directions");
133 if (NumHomogeneousDir == 1)
144 nplanes = m_fielddef[0]->m_numModes[1];
145 ly = m_fielddef[0]->m_homogeneousLengths[0];
146 btype = m_fielddef[0]->m_basis[1];
150 m_session->LoadParameter(
"HomModesZ", nplanes);
151 m_session->LoadParameter(
"LY",ly);
164 if(m_declareExpansionAsContField||
165 m_declareExpansionAsDisContField)
167 ASSERTL0(
false,
"ContField2DHomogeneous1D or "
168 "DisContField2DHomogenenous1D has "
169 "not been implemented");
174 AllocateSharedPtr(m_session, Bkey, ly,
175 m_useFFT, dealiasing,
179 else if (NumHomogeneousDir == 2)
189 nylines = m_fielddef[0]->m_numModes[1];
190 nzlines = m_fielddef[0]->m_numModes[2];
191 ly = m_fielddef[0]->m_homogeneousLengths[0];
192 lz = m_fielddef[0]->m_homogeneousLengths[1];
193 btype1 = m_fielddef[0]->m_basis[1];
194 btype2 = m_fielddef[0]->m_basis[2];
198 m_session->LoadParameter(
"HomModesY", nylines);
199 m_session->LoadParameter(
"HomModesZ", nzlines);
200 m_session->LoadParameter(
"LY",ly);
201 m_session->LoadParameter(
"LZ",lz);
216 if(m_declareExpansionAsContField)
220 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
221 ly, lz, m_useFFT, dealiasing,
223 m_session->GetVariable(0));
225 else if(m_declareExpansionAsDisContField)
229 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
230 ly, lz, m_useFFT, dealiasing,
232 m_session->GetVariable(0));
238 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
239 ly, lz, m_useFFT, dealiasing,
249 if(m_declareExpansionAsContField)
253 m_session->GetVariable(0));
255 else if(m_declareExpansionAsDisContField)
259 m_session->GetVariable(0));
274 "NumHomogeneousDir is only set up for 1");
276 if (NumHomogeneousDir == 1)
287 nplanes = m_fielddef[0]->m_numModes[2];
288 lz = m_fielddef[0]->m_homogeneousLengths[0];
289 btype = m_fielddef[0]->m_basis[2];
293 m_session->LoadParameter(
"HomModesZ", nplanes);
294 m_session->LoadParameter(
"LZ",lz);
305 if(m_declareExpansionAsContField)
309 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
311 m_session->GetVariable(0));
313 else if (m_declareExpansionAsDisContField)
317 AllocateSharedPtr(m_session,
320 m_session->GetVariable(0));
326 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
327 dealiasing, m_graph);
335 if(m_declareExpansionAsContField)
339 m_session->GetVariable(0));
341 else if(m_declareExpansionAsDisContField)
345 m_session->GetVariable(0));
361 if(m_declareExpansionAsContField)
365 m_session->GetVariable(0));
367 else if(m_declareExpansionAsDisContField)
371 m_session->GetVariable(0));
383 ASSERTL0(
false,
"Expansion dimension not recognised");
391 string var =
"DefaultVar",
392 bool NewField =
false)
395 switch (m_graph->GetMeshDimension())
399 if (NumHomogeneousDir == 1)
401 ASSERTL0(m_declareExpansionAsContField ||
402 m_declareExpansionAsDisContField,
403 "ContField2DHomogeneous1D or "
404 "DisContField2DHomogenenous1D has not been "
413 AllocateSharedPtr(*tmp2);
416 else if (NumHomogeneousDir == 2)
418 if(m_declareExpansionAsContField)
426 AllocateSharedPtr(*tmp2);
428 else if(m_declareExpansionAsDisContField)
436 AllocateSharedPtr(*tmp2);
446 AllocateSharedPtr(*tmp2);
453 if(m_declareExpansionAsContField)
462 else if(m_declareExpansionAsDisContField)
486 if (NumHomogeneousDir == 1)
488 if(m_declareExpansionAsContField)
492 bool dealiasing =
false;
497 m_exp[0]->GetHomogeneousBasis()
499 m_exp[0]->GetHomoLen(),
500 m_useFFT, dealiasing, m_graph, var);
508 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
511 AllocateSharedPtr(*tmp2);
514 else if(m_declareExpansionAsDisContField)
518 bool dealiasing =
false;
523 m_exp[0]->GetHomogeneousBasis()
525 m_exp[0]->GetHomoLen(),
526 m_useFFT, dealiasing, m_graph,var);
533 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
537 AllocateSharedPtr(*tmp2);
544 bool dealiasing =
false;
549 m_exp[0]->GetHomogeneousBasis()
551 m_exp[0]->GetHomoLen(),
552 m_useFFT, dealiasing, m_graph);
559 ASSERTL0(tmp2,
"Failed to type cast m_exp[0]");
563 AllocateSharedPtr(*tmp2);
570 if(m_declareExpansionAsContField)
588 else if(m_declareExpansionAsDisContField)
619 if(m_declareExpansionAsContField)
636 m_locToGlobalMap = tmp2->GetLocalToGlobalMap();
639 else if(m_declareExpansionAsDisContField)
668 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.
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
vector< vector< double > > m_data
bool m_declareExpansionAsDisContField
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
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.