36 #include <boost/shared_ptr.hpp>
69 m_declareExpansionAsContField(false),
70 m_declareExpansionAsDisContField(false),
74 m_setUpEquiSpacedFields(false),
85 vector<LibUtilities::FieldDefinitionsSharedPtr>
m_fielddef;
87 vector<MultiRegions::ExpListSharedPtr>
m_exp;
115 bool fldfilegiven =
false)
121 int expdim = m_graph->GetMeshDimension();
122 bool dealiasing =
false;
124 m_session->MatchSolverInfo(
"USEFFT",
"FFTW", m_useFFT,
false);
131 "Quasi-3D approach is only set up for 1 or 2 "
132 "homogeneous directions");
134 if (NumHomogeneousDir == 1)
145 nplanes = m_fielddef[0]->m_numModes[1];
146 ly = m_fielddef[0]->m_homogeneousLengths[0];
147 btype = m_fielddef[0]->m_basis[1];
151 m_session->LoadParameter(
"HomModesZ", nplanes);
152 m_session->LoadParameter(
"LY",ly);
165 if(m_declareExpansionAsContField||
166 m_declareExpansionAsDisContField)
168 ASSERTL0(
false,
"ContField2DHomogeneous1D or "
169 "DisContField2DHomogenenous1D has "
170 "not been implemented");
175 AllocateSharedPtr(m_session, Bkey, ly,
176 m_useFFT, dealiasing,
180 else if (NumHomogeneousDir == 2)
190 nylines = m_fielddef[0]->m_numModes[1];
191 nzlines = m_fielddef[0]->m_numModes[2];
192 ly = m_fielddef[0]->m_homogeneousLengths[0];
193 lz = m_fielddef[0]->m_homogeneousLengths[1];
194 btype1 = m_fielddef[0]->m_basis[1];
195 btype2 = m_fielddef[0]->m_basis[2];
199 m_session->LoadParameter(
"HomModesY", nylines);
200 m_session->LoadParameter(
"HomModesZ", nzlines);
201 m_session->LoadParameter(
"LY",ly);
202 m_session->LoadParameter(
"LZ",lz);
217 if(m_declareExpansionAsContField)
221 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
222 ly, lz, m_useFFT, dealiasing,
224 m_session->GetVariable(0));
226 else if(m_declareExpansionAsDisContField)
230 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
231 ly, lz, m_useFFT, dealiasing,
233 m_session->GetVariable(0));
239 AllocateSharedPtr(m_session, BkeyY, BkeyZ,
240 ly, lz, m_useFFT, dealiasing,
250 if(m_declareExpansionAsContField)
254 m_session->GetVariable(0));
256 else if(m_declareExpansionAsDisContField)
260 m_session->GetVariable(0));
275 "NumHomogeneousDir is only set up for 1");
277 if (NumHomogeneousDir == 1)
288 nplanes = m_fielddef[0]->m_numModes[2];
289 lz = m_fielddef[0]->m_homogeneousLengths[0];
290 btype = m_fielddef[0]->m_basis[2];
304 m_session->LoadParameter(
"HomModesZ", nplanes);
305 m_session->LoadParameter(
"LZ",lz);
316 if(m_declareExpansionAsContField)
320 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
322 m_session->GetVariable(0));
324 else if (m_declareExpansionAsDisContField)
328 AllocateSharedPtr(m_session,
331 m_session->GetVariable(0));
337 AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
338 dealiasing, m_graph);
346 if(m_declareExpansionAsContField)
350 m_session->GetVariable(0));
352 else if(m_declareExpansionAsDisContField)
356 m_session->GetVariable(0));
372 if(m_declareExpansionAsContField)
376 m_session->GetVariable(0));
378 else if(m_declareExpansionAsDisContField)
382 m_session->GetVariable(0));
394 ASSERTL0(
false,
"Expansion dimension not recognised");
402 string var =
"DefaultVar",
403 bool NewField =
false)
405 if(var.compare(
"DefaultVar") == 0 && m_declareExpansionAsContField)
407 if (m_session->GetVariables().size())
409 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, m_graph, var);
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...
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.