61 "Creates curved edge information using a function y=f(x) (2D only).");
69 "Expression of the curve: y = f(x).");
71 "Pts file containing coordinates (x,y).");
73 "Number of iterations to perform to obtain evenly distribution of points.");
75 "Relaxation parameter.");
114 int niter =
m_config[
"niter"].as<
int>();
117 edge->m_edgeNodes.resize(nq - 2);
120 if (
m_config[
"function"].as<string>().compare(
"NotSet") != 0)
123 "Function and file cannot be defined at the same time.");
125 std::string fstr =
m_config[
"function"].as<
string>();
132 "Need to define either function or file.");
133 std::string inFile =
m_config[
"file"].as<
string>();
159 Vmath::Sadd(nq-1, (n2->m_x - n1->m_x) / (nq-1), dx, 1, dx, 1);
162 for (
int s = 0; s < niter; ++s)
165 for (
int k = 1; k < nq; ++k)
167 x[k] = x[k-1] + dx[k-1] + gamma*s_deviation[k-1];
170 dx[k-1] = x[k] - x[k-1];
171 dy[k-1] = y[k] - y[k-1];
172 ds[k-1] = sqrt(dx[k-1]*dx[k-1] + dy[k-1]*dy[k-1]);
174 s_average = s_average + ds[k-1]/(nq-1);
177 for (
int k = 0; k < nq-1; ++k)
179 s_deviation[k] = (s_average - ds[k])*
185 gamma =
m_config[
"gamma"].as<
double>();
189 for (
int k = 0; k < nq-1; ++k)
191 if( dx[k]*(dx[k]+gamma*s_deviation[k]) < 0.0)
202 for (
int k = 1; k < nq-1; ++k)
205 new Node(0, x[k], y[k], n1->m_z));
#define ASSERTL0(condition, msg)
A class that contains algorithms for interpolation between pts fields, expansions and different meshe...
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
FIELD_UTILS_EXPORT void Interpolate(const LibUtilities::PtsFieldSharedPtr ptsInField, LibUtilities::PtsFieldSharedPtr &ptsOutField)
Interpolate from a pts field to a pts field.
LibUtilities::AnalyticExpressionEvaluator m_fEval
NekDouble Evaluate(const int AnalyticExpression_id)
Evaluation method for expressions depending on parameters only.
pair< ModuleType, string > ModuleKey
CommFactory & GetCommFactory()
boost::shared_ptr< PtsField > PtsFieldSharedPtr
1D Evenly-spaced points using Lagrange polynomial
virtual ~ProcessCurve()
Destructor.
LibUtilities::PtsFieldSharedPtr m_fieldPts
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Represents a command-line configuration option.
boost::shared_ptr< Node > NodeSharedPtr
std::map< std::string, ConfigOption > m_config
List of configuration values.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
boost::shared_ptr< PtsIO > PtsIOSharedPtr
void v_GenerateEdgeNodes(NekMeshUtils::EdgeSharedPtr edge)
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
int DefineFunction(const std::string &vlist, const std::string &function)
This function allows one to define a function to evaluate. The first argument (vlist) is a list of va...
boost::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
NekDouble EvaluateCoordinate(NekDouble xCoord)
std::pair< ModuleType, std::string > ModuleKey
ModuleFactory & GetModuleFactory()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.