Skip to content
Snippets Groups Projects
Commit 416748c7 authored by Mohsen Lahooti's avatar Mohsen Lahooti
Browse files

Merge branch 'fix/wallNormalData' into 'master'

Fix bug & Update the user guide with a sample script

See merge request nektar/nektar!1663
parents f2e98d8f 70503886
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ v5.5.0
- Update AssemblyMap to reduce verbosity when using parallel-in-time (!1651)
- Tidy-up of Collection library (!1622)
- Tidy-up of I/O in BasicUtils (!1623)
- Fix a minor bug in ProcessWallNormalData (!1663)
**CardiacEPSolver**
- Fix cell model history point filter output after base class change (!1342)
......@@ -40,6 +41,7 @@ v5.5.0
**Miscellaneous**
- Add a particle tracker utilitiy using equation system infrastructure (!1310)
- Remove deprecated fs::copy_directory function call (!1662)
- Added a sample python script for wallnormaldata module (!1663)
v5.4.0
------
......
......@@ -1461,6 +1461,30 @@ and save the result in test.pts.
points to be interpolated.}
\end{center}
\end{figure}
In practice, it is convenient to use this module interactively to find/visualize/adjust profile distributions.
This can be achieved by using the NekPy interface. A sample Pyhton script is provieded in the following
\begin{lstlisting}[style=C++Style, language=Python]
import sys
from NekPy.FieldUtils import *
field = Field(sys.argv, forceoutput=True, error=True)
InputModule.Create("xml", field, "mesh.xml","session.xml").Run()
InputModule.Create("fld", field, "field.fld").Run() # e.g. x,y,u,v,p
ProcessModule.Create("wallNormalData", field,
bnd=str(bnd), xorig=str(xorig), projDir=str(projDir),
maxDist=str(maxDist), distH=str(distH), nptsH=str(nptsH),
d=str(d)).Run()
# Get data arrays from interpolation
y = field.GetPts(1)
u = field.GetPts(2)
\end{lstlisting}
%
%
%
......
......@@ -84,8 +84,11 @@ ProcessWallNormalData::ProcessWallNormalData(FieldSharedPtr f)
in (0,0.95] gives controled points; d in (0.95,inf) \
gives evenly spaced points");
// To allow some functions called somewhere else outside Process()
m_spacedim = m_f->m_exp[0]->GetCoordim(0) + m_f->m_numHomogeneousDir;
// To allow some functions called somewhere else outside Process(),
// m_spacedim should be defined while it cannot be defined here in the
// constructor because f->m_exp[0]->GetCoordim(0) and
// f->m_graph->GetMeshDimension() has not been defeind yet
// *It is defeind in m_f->SetUpExp(vm), where vm is necessary.
}
ProcessWallNormalData::~ProcessWallNormalData()
......@@ -121,7 +124,8 @@ void ProcessWallNormalData::v_Process(po::variables_map &vm)
const int nfields = m_f->m_variables.size();
const int nCoordDim = m_f->m_exp[0]->GetCoordim(0);
const int nBndLcoordDim = nCoordDim - 1;
const int totVars = m_spacedim + nfields;
m_spacedim = m_f->m_exp[0]->GetCoordim(0) + m_f->m_numHomogeneousDir;
const int totVars = m_spacedim + nfields;
// Initialize the sampling parameters
std::vector<NekDouble> xorig, searchDir;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment