Commit ff501d05 authored by Dave Moxey's avatar Dave Moxey

Merge branch 'feature/FilterFieldConvert' into 'master'

FilterFieldConvert

This MR will introduce a new filter, which will be able to run modules from FieldConvert on a checkpoint. This filter replaces FilterSampler, and therefore the new functionalities will extend to other filters derived from it (AverageFields, ReynoldsStresses). An example of the setup for that would be:
``` xml
<FILTER TYPE="FieldConvert">
    <PARAM NAME="OutputFile"> filename.vtu </PARAM>
    <PARAM NAME="OutputFrequency"> 100 </PARAM>
    <PARAM NAME="Modules"> vorticity homplane:planeid=4 </PARAM>
</FILTER>
```
It is unlikely that all options and modules will be supported. However, the main idea is to use this with modules that result in outputs with reduced size (e.g. isocontour, meanmode for 3DH1D). This way we can obtain these outputs more frequently than would be practical by storing the full checkpoint and running FieldConvert later.

I don't know how far I am from finishing this (some cases already work, but I still need to test it further). Anyway, it would be nice to have some feedback on it, especially regarding the compilation and general structure of the code, since I had to create a new FieldConvert library and move some files around.

See merge request !589
parents 790e7416 92a9d46b
......@@ -14,4 +14,3 @@ IndentCaseLabels: true
Standard: Cpp03
AccessModifierOffset: -4
BinPackParameters: false
BinPackArguments: false
......@@ -12,6 +12,8 @@ v4.4.0
(!656)
- Sped up interpolataion from pts files and fixed parallel pts import (!584)
- Increased required boost version to 1.56.0 (!584)
- New FieldUtils library allows support for most `FieldConvert` post-processing
operations during simulation using a new filter (!589)
**IncNavierStokesSolver:**
- Add ability to simulate additional scalar fields (!624)
......@@ -20,6 +22,8 @@ v4.4.0
- Modify curve module to allow for spline input (!628)
**FieldConvert:**
- Move all modules to a new library, FieldUtils, to support post-processing
during simulations (!589)
- Add module to stretch homogeneous direction (!609)
v4.3.3
......
......@@ -283,7 +283,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
# Build active components
IF (NEKTAR_BUILD_LIBRARY)
SET(NEKTAR++_LIBRARIES SolverUtils LibUtilities StdRegions SpatialDomains LocalRegions
MultiRegions Collections GlobalMapping NekMeshUtils)
MultiRegions Collections GlobalMapping FieldUtils NekMeshUtils)
INCLUDE_DIRECTORIES(library)
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake COMPONENT dev)
......
......@@ -760,6 +760,7 @@ INPUT = @CMAKE_SOURCE_DIR@/docs/doxygen/ \
@CMAKE_SOURCE_DIR@/library/LocalRegions/ \
@CMAKE_SOURCE_DIR@/library/MultiRegions/ \
@CMAKE_SOURCE_DIR@/library/GlobalMapping/ \
@CMAKE_SOURCE_DIR@/library/FieldUtils/ \
@CMAKE_SOURCE_DIR@/library/SolverUtils/ \
@CMAKE_SOURCE_DIR@/library/NekMeshUtils/ \
@CMAKE_SOURCE_DIR@/solvers/ \
......
......@@ -27,6 +27,52 @@ In the following we document the filters implemented. Note that some filters are
solver-specific and will therefore only work for a given subset of the available
solvers.
\subsection{FieldConvert checkpoints}
\begin{notebox}
This filter is still at an experimental stage. Not all modules and options
from FieldConvert are supported.
\end{notebox}
This filter applies a sequence of FieldConvert modules to the solution,
writing an output file. An output is produced at the end of the simulation into
\inltt{session\_fc.fld}, or alternatively every $M$ timesteps as defined by the
user, into a sequence of files \inltt{session\_*\_fc.fld}, where \inltt{*} is
replaced by a counter.
The following parameters are supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
\toprule
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session.fld} &
Output filename. If no extension is provided, it is assumed as .fld\\
\inltt{OutputFrequency} & \xmark & \texttt{NumSteps} &
Number of timesteps after which output is written, $M$.\\
\inltt{Modules} & \xmark & &
FieldConvert modules to run, separated by a white space.\\
\bottomrule
\end{tabularx}
\end{center}
As an example, consider:
\begin{lstlisting}[style=XMLStyle,gobble=2]
<FILTER TYPE="FieldConvert">
<PARAM NAME="OutputFile">MyFile.vtu</PARAM>
<PARAM NAME="OutputFrequency">100</PARAM>
<PARAM NAME="Modules"> vorticity isocontour:fieldid=0:fieldvalue=0.1 </PARAM>
</FILTER>
\end{lstlisting}
This will create a sequence of files named \inltt{MyFile\_*\_fc.vtu} containing isocontours.
The result will be output every 100 time steps. Output directly to
\inltt{.vtu} or \inltt{.dat} is currently only supported for isocontours.
In other cases, the output should be a \inltt{.fld} file.
\subsection{Time-averaged fields}
This filter computes time-averaged fields for each variable defined in the
......@@ -38,7 +84,8 @@ user, into a sequence of files \inltt{session\_*\_avg.fld}, where \inltt{*} is
replaced by a counter. This latter option can be useful to observe statistical
convergence rates of the averaged variables.
The following parameters are supported:
This filter is derived from FieldConvert filter, and therefore support all parameters
available in that case. The following additional parameter is supported:
\begin{center}
\begin{tabularx}{0.99\textwidth}{lllX}
......@@ -46,13 +93,8 @@ The following parameters are supported:
\textbf{Option name} & \textbf{Required} & \textbf{Default} &
\textbf{Description} \\
\midrule
\inltt{OutputFile} & \xmark & \texttt{session} &
Prefix of the output filename to which average fields are written.\\
\inltt{SampleFrequency} & \xmark & 1 &
Number of timesteps at which the average is calculated, $N$.\\
\inltt{OutputFrequency} & \xmark & \texttt{NumSteps} &
Number of timesteps after which output is written, $M$.\\
\bottomrule
\end{tabularx}
\end{center}
......@@ -123,7 +165,7 @@ for example:
\end{lstlisting}
By default, this filter uses a simple average. Optionally, an exponential
time average can be used, in which case the output contain the moving
moving average can be used, in which case the output contains the moving
averages and the Reynolds stresses calculated based on them. For example:
\begin{lstlisting}[style=XMLStyle,gobble=2]
......
SET(LibrarySubDirs GlobalMapping LibUtilities LocalRegions Collections
MultiRegions SpatialDomains StdRegions SolverUtils NekMeshUtils)
SET(LibrarySubDirs FieldUtils GlobalMapping LibUtilities LocalRegions
Collections MultiRegions SpatialDomains StdRegions SolverUtils NekMeshUtils)
SET(UnitTestSubDirs UnitTests)
SET(DemoSubDirs Demos)
SET(TimingsSubDirs Timings)
......
SET(FieldUtilsHeaders
Module.h
Field.hpp
Interpolator.h
InputModules/InputDat.h
InputModules/InputFld.h
InputModules/InputXml.h
InputModules/InputPts.h
OutputModules/OutputInfo.h
OutputModules/OutputTecplot.h
OutputModules/OutputVtk.h
OutputModules/OutputFld.h
OutputModules/OutputStdOut.h
OutputModules/OutputPts.h
OutputModules/OutputXml.h
ProcessModules/ProcessAddFld.h
ProcessModules/ProcessBoundaryExtract.h
ProcessModules/ProcessCombineAvg.h
ProcessModules/ProcessConcatenateFld.h
ProcessModules/ProcessDeform.h
ProcessModules/ProcessDisplacement.h
ProcessModules/ProcessEquiSpacedOutput.h
ProcessModules/ProcessGrad.h
ProcessModules/ProcessHomogeneousPlane.h
ProcessModules/ProcessHomogeneousStretch.h
ProcessModules/ProcessInnerProduct.h
ProcessModules/ProcessInterpField.h
ProcessModules/ProcessInterpPoints.h
ProcessModules/ProcessInterpPointDataToFld.h
ProcessModules/ProcessIsoContour.h
ProcessModules/ProcessJacobianEnergy.h
ProcessModules/ProcessMapping.h
ProcessModules/ProcessNumModes.h
ProcessModules/ProcessMeanMode.h
ProcessModules/ProcessPointDataToFld.h
ProcessModules/ProcessPrintFldNorms.h
ProcessModules/ProcessScaleInFld.h
ProcessModules/ProcessSurfDistance.h
ProcessModules/ProcessVorticity.h
ProcessModules/ProcessScalGrad.h
ProcessModules/ProcessMultiShear.h
ProcessModules/ProcessWSS.h
ProcessModules/ProcessC0Projection.h
ProcessModules/ProcessQCriterion.h
ProcessModules/ProcessQualityMetric.h
)
SET(FieldUtilsSources
Module.cpp
Interpolator.cpp
InputModules/InputDat.cpp
InputModules/InputFld.cpp
InputModules/InputXml.cpp
InputModules/InputPts.cpp
OutputModules/OutputInfo.cpp
OutputModules/OutputTecplot.cpp
OutputModules/OutputVtk.cpp
OutputModules/OutputFld.cpp
OutputModules/OutputStdOut.cpp
OutputModules/OutputPts.cpp
OutputModules/OutputXml.cpp
ProcessModules/ProcessAddFld.cpp
ProcessModules/ProcessBoundaryExtract.cpp
ProcessModules/ProcessCombineAvg.cpp
ProcessModules/ProcessConcatenateFld.cpp
ProcessModules/ProcessDeform.cpp
ProcessModules/ProcessDisplacement.cpp
ProcessModules/ProcessEquiSpacedOutput.cpp
ProcessModules/ProcessGrad.cpp
ProcessModules/ProcessHomogeneousPlane.cpp
ProcessModules/ProcessHomogeneousStretch.cpp
ProcessModules/ProcessInnerProduct.cpp
ProcessModules/ProcessInterpField.cpp
ProcessModules/ProcessInterpPoints.cpp
ProcessModules/ProcessInterpPointDataToFld.cpp
ProcessModules/ProcessIsoContour.cpp
ProcessModules/ProcessJacobianEnergy.cpp
ProcessModules/ProcessMapping.cpp
ProcessModules/ProcessNumModes.cpp
ProcessModules/ProcessMeanMode.cpp
ProcessModules/ProcessPointDataToFld.cpp
ProcessModules/ProcessPrintFldNorms.cpp
ProcessModules/ProcessScaleInFld.cpp
ProcessModules/ProcessVorticity.cpp
ProcessModules/ProcessScalGrad.cpp
ProcessModules/ProcessSurfDistance.cpp
ProcessModules/ProcessMultiShear.cpp
ProcessModules/ProcessWSS.cpp
ProcessModules/ProcessC0Projection.cpp
ProcessModules/ProcessQCriterion.cpp
ProcessModules/ProcessQualityMetric.cpp
)
ADD_NEKTAR_LIBRARY(FieldUtils lib ${NEKTAR_LIBRARY_TYPE} ${FieldUtilsSources} ${FieldUtilsHeaders})
TARGET_LINK_LIBRARIES(FieldUtils LINK_PUBLIC GlobalMapping)
ADD_DEFINITIONS(-DFIELD_UTILS_EXPORTS)
INSTALL(DIRECTORY ./ DESTINATION ${NEKTAR_INCLUDE_DIR}/FieldUtils COMPONENT dev FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
......@@ -33,102 +33,106 @@
//
////////////////////////////////////////////////////////////////////////////////
#ifndef FIELDUTILS_FIELD
#define FIELDUTILS_FIELD
#include <boost/shared_ptr.hpp>
#include <LibUtilities/BasicUtils/NekFactory.hpp>
#include <LibUtilities/BasicUtils/PtsIO.h>
#include <LibUtilities/BasicUtils/PtsField.h>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/BasicUtils/PtsIO.h>
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ContField1D.h>
#include <MultiRegions/ExpList2DHomogeneous1D.h>
#include <MultiRegions/ContField3DHomogeneous1D.h>
#include <MultiRegions/ContField3DHomogeneous2D.h>
#include <MultiRegions/ContField2D.h>
#include <MultiRegions/ContField3D.h>
#include <MultiRegions/ContField3DHomogeneous1D.h>
#include <MultiRegions/ContField3DHomogeneous2D.h>
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ExpList2DHomogeneous1D.h>
#include <MultiRegions/DisContField1D.h>
#include <MultiRegions/DisContField3DHomogeneous1D.h>
#include <MultiRegions/DisContField3DHomogeneous2D.h>
#include <MultiRegions/DisContField2D.h>
#include <MultiRegions/DisContField3D.h>
#include <MultiRegions/DisContField3DHomogeneous1D.h>
#include <MultiRegions/DisContField3DHomogeneous2D.h>
#include "FieldUtilsDeclspec.h"
using namespace std;
namespace Nektar
{
namespace Utilities
namespace FieldUtils
{
struct Field {
Field() : m_verbose(false),
m_declareExpansionAsContField(false),
m_declareExpansionAsDisContField(false),
m_requireBoundaryExpansion(false),
m_writeBndFld(false),
m_fldToBnd(false),
m_addNormals(false),
m_setUpEquiSpacedFields(false),
m_fieldPts(LibUtilities::NullPtsField){}
~Field()
struct Field
{
FIELD_UTILS_EXPORT Field()
: m_verbose(false), m_declareExpansionAsContField(false),
m_declareExpansionAsDisContField(false),
m_requireBoundaryExpansion(false), m_writeBndFld(false),
m_fldToBnd(false), m_addNormals(false),
m_setUpEquiSpacedFields(false), m_fieldPts(LibUtilities::NullPtsField)
{
}
FIELD_UTILS_EXPORT ~Field()
{
if (m_comm)
{
m_comm->Finalise();
}
}
bool m_verbose;
bool m_verbose;
vector<LibUtilities::FieldDefinitionsSharedPtr> m_fielddef;
vector<vector<double> > m_data;
vector<MultiRegions::ExpListSharedPtr> m_exp;
vector<vector<double> > m_data;
vector<MultiRegions::ExpListSharedPtr> m_exp;
bool m_declareExpansionAsContField;
bool m_declareExpansionAsDisContField;
bool m_declareExpansionAsContField;
bool m_declareExpansionAsDisContField;
bool m_requireBoundaryExpansion;
bool m_requireBoundaryExpansion;
bool m_useFFT;
bool m_useFFT;
LibUtilities::CommSharedPtr m_comm;
LibUtilities::SessionReaderSharedPtr m_session;
SpatialDomains::MeshGraphSharedPtr m_graph;
LibUtilities::FieldIOSharedPtr m_fld;
LibUtilities::PtsIOSharedPtr m_ptsIO;
map<string, vector<string> > m_inputfiles;
LibUtilities::CommSharedPtr m_comm;
LibUtilities::SessionReaderSharedPtr m_session;
SpatialDomains::MeshGraphSharedPtr m_graph;
LibUtilities::FieldIOSharedPtr m_fld;
LibUtilities::PtsIOSharedPtr m_ptsIO;
map<string, vector<string> > m_inputfiles;
bool m_writeBndFld;
vector<unsigned int> m_bndRegionsToWrite;
bool m_fldToBnd;
bool m_addNormals;
bool m_writeBndFld;
vector<unsigned int> m_bndRegionsToWrite;
bool m_fldToBnd;
bool m_addNormals;
bool m_setUpEquiSpacedFields;
bool m_setUpEquiSpacedFields;
LibUtilities::PtsFieldSharedPtr m_fieldPts;
LibUtilities::PtsFieldSharedPtr m_fieldPts;
MultiRegions::AssemblyMapCGSharedPtr m_locToGlobalMap;
MultiRegions::AssemblyMapCGSharedPtr m_locToGlobalMap;
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap;
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap;
MultiRegions::ExpListSharedPtr SetUpFirstExpList(int NumHomogeneousDir,
bool fldfilegiven = false)
FIELD_UTILS_EXPORT MultiRegions::ExpListSharedPtr SetUpFirstExpList(
int NumHomogeneousDir, bool fldfilegiven = false)
{
MultiRegions::ExpListSharedPtr exp;
// Set up expansion list
int expdim = m_graph->GetMeshDimension();
int expdim = m_graph->GetMeshDimension();
bool dealiasing = false;
m_session->MatchSolverInfo("USEFFT", "FFTW", m_useFFT, false);
switch (expdim)
{
case 1:
case 1:
{
ASSERTL0(NumHomogeneousDir <= 2,
"Quasi-3D approach is only set up for 1 or 2 "
......@@ -143,7 +147,7 @@ struct Field {
NekDouble ly;
LibUtilities::BasisType btype;
if(fldfilegiven)
if (fldfilegiven)
{
nplanes = m_fielddef[0]->m_numModes[1];
ly = m_fielddef[0]->m_homogeneousLengths[0];
......@@ -152,43 +156,40 @@ struct Field {
else
{
m_session->LoadParameter("HomModesZ", nplanes);
m_session->LoadParameter("LY",ly);
m_session->LoadParameter("LY", ly);
btype = LibUtilities::eFourier;
}
// Choose points to be at evenly spaced points at
// nplanes points
const LibUtilities::PointsKey
Pkey(nplanes, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::PointsKey Pkey(
nplanes, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::BasisKey Bkey(btype, nplanes, Pkey);
if(m_declareExpansionAsContField||
m_declareExpansionAsDisContField)
if (m_declareExpansionAsContField ||
m_declareExpansionAsDisContField)
{
ASSERTL0(false,"ContField2DHomogeneous1D or "
"DisContField2DHomogenenous1D has "
"not been implemented");
ASSERTL0(false, "ContField2DHomogeneous1D or "
"DisContField2DHomogenenous1D has "
"not been implemented");
}
Exp2DH1 = MemoryManager<MultiRegions::
ExpList2DHomogeneous1D>::
AllocateSharedPtr(m_session, Bkey, ly,
m_useFFT, dealiasing,
m_graph);
Exp2DH1 =
MemoryManager<MultiRegions::ExpList2DHomogeneous1D>::
AllocateSharedPtr(m_session, Bkey, ly, m_useFFT,
dealiasing, m_graph);
exp = Exp2DH1;
}
else if (NumHomogeneousDir == 2)
{
MultiRegions::ExpList3DHomogeneous2DSharedPtr Exp3DH2;
int nylines,nzlines;
NekDouble ly,lz;
LibUtilities::BasisType btype1,btype2;
int nylines, nzlines;
NekDouble ly, lz;
LibUtilities::BasisType btype1, btype2;
if(fldfilegiven)
if (fldfilegiven)
{
nylines = m_fielddef[0]->m_numModes[1];
nzlines = m_fielddef[0]->m_numModes[2];
......@@ -201,47 +202,44 @@ struct Field {
{
m_session->LoadParameter("HomModesY", nylines);
m_session->LoadParameter("HomModesZ", nzlines);
m_session->LoadParameter("LY",ly);
m_session->LoadParameter("LZ",lz);
m_session->LoadParameter("LY", ly);
m_session->LoadParameter("LZ", lz);
btype1 = LibUtilities::eFourier;
btype2 = LibUtilities::eFourier;
}
// Choose points to be at evenly spaced points at
// nplanes points
const LibUtilities::PointsKey
PkeyY(nylines, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::PointsKey PkeyY(
nylines, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::BasisKey BkeyY(btype1, nylines, PkeyY);
const LibUtilities::PointsKey
PkeyZ(nzlines, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::PointsKey PkeyZ(
nzlines, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::BasisKey BkeyZ(btype2, nzlines, PkeyZ);
if(m_declareExpansionAsContField)
if (m_declareExpansionAsContField)
{
Exp3DH2 = MemoryManager<MultiRegions::
ContField3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ,
ly, lz, m_useFFT, dealiasing,
m_graph,
Exp3DH2 = MemoryManager<
MultiRegions::ContField3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ, ly, lz,
m_useFFT, dealiasing, m_graph,
m_session->GetVariable(0));
}
else if(m_declareExpansionAsDisContField)
else if (m_declareExpansionAsDisContField)
{
Exp3DH2 = MemoryManager<MultiRegions::
DisContField3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ,
ly, lz, m_useFFT, dealiasing,
m_graph,
Exp3DH2 = MemoryManager<
MultiRegions::DisContField3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ, ly, lz,
m_useFFT, dealiasing, m_graph,
m_session->GetVariable(0));
}
else
{
Exp3DH2 = MemoryManager<MultiRegions::
ExpList3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ,
ly, lz, m_useFFT, dealiasing,
m_graph);
Exp3DH2 = MemoryManager<
MultiRegions::ExpList3DHomogeneous2D>::
AllocateSharedPtr(m_session, BkeyY, BkeyZ, ly, lz,
m_useFFT, dealiasing, m_graph);
}
exp = Exp3DH2;
......@@ -250,29 +248,29 @@ struct Field {
{
MultiRegions::ExpList1DSharedPtr Exp1D;
if(m_declareExpansionAsContField)
if (m_declareExpansionAsContField)
{
Exp1D = MemoryManager<MultiRegions::ContField1D>
::AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
Exp1D = MemoryManager<MultiRegions::ContField1D>::
AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
}
else if(m_declareExpansionAsDisContField)
else if (m_declareExpansionAsDisContField)
{
Exp1D = MemoryManager<MultiRegions::DisContField1D>
::AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
Exp1D = MemoryManager<MultiRegions::DisContField1D>::
AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
}
else
{
Exp1D = MemoryManager<MultiRegions::ExpList1D>
::AllocateSharedPtr(m_session, m_graph);
Exp1D = MemoryManager<MultiRegions::ExpList1D>::
AllocateSharedPtr(m_session, m_graph);
}
exp = Exp1D;
}
}
break;
case 2:
case 2:
{
ASSERTL0(NumHomogeneousDir <= 1,
"NumHomogeneousDir is only set up for 1");
......@@ -286,16 +284,17 @@ struct Field {
NekDouble lz;
LibUtilities::BasisType btype;
if(fldfilegiven)
if (fldfilegiven)
{
nplanes = m_fielddef[0]->m_numModes[2];
nplanes = m_fielddef[0]->m_numModes[2];
lz = m_fielddef[0]->m_homogeneousLengths[0];
btype = m_fielddef[0]->m_basis[2];
if (btype == LibUtilities::eFourierSingleMode)
{
btype = LibUtilities::eFourier;
m_fielddef[0]->m_basis[2] = LibUtilities::eFourierSingleMode;
m_fielddef[0]->m_basis[2] =
LibUtilities::eFourierSingleMode;
if (nplanes <= 2)
{
nplanes = 4;
......@@ -305,38 +304,37 @@ struct Field {
else
{
m_session->LoadParameter("HomModesZ", nplanes);
m_session->LoadParameter("LZ",lz);
m_session->LoadParameter("LZ", lz);
btype = LibUtilities::eFourier;
}
// Choose points to be at evenly spaced points at
// nplanes points
const LibUtilities::PointsKey
Pkey(nplanes, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::PointsKey Pkey(
nplanes, LibUtilities::eFourierEvenlySpaced);
const LibUtilities::BasisKey Bkey(btype, nplanes, Pkey);
const LibUtilities::BasisKey Bkey(btype, nplanes, Pkey);
if(m_declareExpansionAsContField)
if (m_declareExpansionAsContField)
{
Exp3DH1 = MemoryManager<MultiRegions::
ContField3DHomogeneous1D>::
Exp3DH1 = MemoryManager<
MultiRegions::ContField3DHomogeneous1D>::
AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
dealiasing, m_graph,
m_session->GetVariable(0));
}
else if (m_declareExpansionAsDisContField)
{
Exp3DH1 = MemoryManager<MultiRegions::
DisContField3DHomogeneous1D>::
AllocateSharedPtr(m_session,
Bkey, lz, m_useFFT,
Exp3DH1 = MemoryManager<
MultiRegions::DisContField3DHomogeneous1D>::
AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
dealiasing, m_graph,
m_session->GetVariable(0));
}
else
{
Exp3DH1 = MemoryManager<MultiRegions::
ExpList3DHomogeneous1D>::
Exp3DH1 = MemoryManager<
MultiRegions::ExpList3DHomogeneous1D>::
AllocateSharedPtr(m_session, Bkey, lz, m_useFFT,
dealiasing, m_graph);
}
......@@ -346,66 +344,66 @@ struct Field {
{
MultiRegions::ExpList2DSharedPtr Exp2D;
if(m_declareExpansionAsContField)
if (m_declareExpansionAsContField)
{
Exp2D = MemoryManager<MultiRegions::ContField2D>
::AllocateSharedPtr(m_session,m_graph,
m_session->GetVariable(0));
Exp2D = MemoryManager<MultiRegions::ContField2D>::
AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
}
else if(m_declareExpansionAsDisContField)
else if (m_declareExpansionAsDisContField)
{
Exp2D = MemoryManager<MultiRegions::DisContField2D>
::AllocateSharedPtr(m_session,m_graph,
m_session->GetVariable(0));
Exp2D = MemoryManager<MultiRegions::DisContField2D>::
AllocateSharedPtr(m_session, m_graph,
m_session->GetVariable(0));
}
else