36 #ifndef UTILITIES_NEKMESH_NODEOPTI
37 #define UTILITIES_NEKMESH_NODEOPTI
61 std::map<LibUtilities::ShapeType, DerivUtilSharedPtr> d,
66 for (
int i = 0; i < e.size(); i++)
68 m_data[e[i]->GetEl()->GetShapeType()].push_back(e[i]);
72 size_t storageCount = 0;
73 std::map<LibUtilities::ShapeType, std::vector<ElUtilSharedPtr> >
76 for (typeIt =
m_data.begin(); typeIt !=
m_data.end(); typeIt++)
79 const int nElmt = typeIt->second.size();
81 storageCount = std::max(storageCount,
83 typeIt->second.size());
87 DerivArray(boost::extents[dim][nElmt][dim][pts])));
108 std::map<LibUtilities::ShapeType, std::vector<ElUtilSharedPtr> >
m_data;
111 boost::unordered_map<LibUtilities::ShapeType, DerivArray>
m_derivs;
149 std::map<LibUtilities::ShapeType, DerivUtilSharedPtr> d,
151 : NodeOpti(n, e, r, d, o, 3)
161 NodeSharedPtr n, std::vector<ElUtilSharedPtr> e, ResidualSharedPtr r,
162 std::map<LibUtilities::ShapeType, DerivUtilSharedPtr> d,
optiType o)
175 std::map<LibUtilities::ShapeType, DerivUtilSharedPtr> d,
177 : NodeOpti(n, e, r, d, o, 2)
187 NodeSharedPtr n, std::vector<ElUtilSharedPtr> e, ResidualSharedPtr r,
188 std::map<LibUtilities::ShapeType, DerivUtilSharedPtr> d,
optiType o)
NodeOptiFactory & GetNodeOptiFactory()
int IsIndefinite()
Returns 1 if Hessian matrix is indefinite and 0 otherwise.
static NekDouble alphaTol()
NodeOptiJob(NodeOpti *no)
void MinEigen(NekDouble &val)
Calculates minimum eigenvalue of Hessian matrix.
LibUtilities::NekFactory< int, NodeOpti, NodeSharedPtr, std::vector< ElUtilSharedPtr >, ResidualSharedPtr, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr >, optiType > NodeOptiFactory
Array< OneD, NekDouble > m_grad
std::map< LibUtilities::ShapeType, std::vector< ElUtilSharedPtr > > m_data
boost::shared_ptr< Residual > ResidualSharedPtr
boost::unordered_map< LibUtilities::ShapeType, DerivArray > m_derivs
std::vector< NekDouble > m_tmpStore
NodeOpti2D2D(NodeSharedPtr n, std::vector< ElUtilSharedPtr > e, ResidualSharedPtr r, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > d, optiType o)
boost::shared_ptr< Node > NodeSharedPtr
boost::multi_array< NekDouble, 4 > DerivArray
boost::shared_ptr< NodeOpti > NodeOptiSharedPtr
NekDouble GetFunctional(NekDouble &minJacNew, bool gradient=true)
Evaluate functional for elements connected to a node.
NodeOpti(NodeSharedPtr n, std::vector< ElUtilSharedPtr > e, ResidualSharedPtr r, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > d, optiType o, int dim)
static NodeOptiSharedPtr create(NodeSharedPtr n, std::vector< ElUtilSharedPtr > e, ResidualSharedPtr r, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > d, optiType o)
virtual void Optimise()=0
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
Base class for tasks to be sent to the ThreadManager to run.
static NodeOptiSharedPtr create(NodeSharedPtr n, std::vector< ElUtilSharedPtr > e, ResidualSharedPtr r, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > d, optiType o)
NodeOpti3D3D(NodeSharedPtr n, std::vector< ElUtilSharedPtr > e, ResidualSharedPtr r, std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > d, optiType o)
static boost::mutex mutex
static NekDouble gradTol()
std::map< LibUtilities::ShapeType, DerivUtilSharedPtr > m_derivUtils
Provides a generic Factory class.