rsvs3D  0.0.0
Codes for the c++ implementation of the 3D RSVS
RSVScalctools.hpp File Reference

Provides internal tools for RSVS calc. More...

#include <Eigen>
#include <vector>
#include "arraystructures.hpp"
#include "mesh.hpp"
#include "vectorarray.hpp"

Go to the source code of this file.

Functions

grid::coordlist TrianglePointerCoordinates (const triangle &triIn, const triangulation &triRSVS)
 Get all the coordinates needed to define a triangle. More...
 
HashedVector< int, int > TriangleActiveDesignVariables (const triangle &triIn, const triangulation &triRSVS, const HashedVector< int, int > &objDvMap, bool useSurfCentreDeriv=true)
 Get the active design variables defined by a triangle object. More...
 
void TrianglePositionDerivatives (const triangle &triIn, const triangulation &triRSVS, const HashedVector< int, int > &dvListMap, Eigen::MatrixXd &dPos, Eigen::MatrixXd &HPos, bool useSurfCentreDeriv=true, bool useSurfCentreHessian=false)
 Calculate the positional derivatives of a triangle object. More...
 
void AssignConstraintDerivativesFullMath (RSVScalc &calc, const triangle &triIn, const HashedVector< int, int > &dvListMap, const Eigen::MatrixXd &dConstrPart, const Eigen::MatrixXd &HConstrPart, int constrPos, int cellTarg)
 
void AssignConstraintDerivativesSparseMath (RSVScalc &calc, const triangle &triIn, const HashedVector< int, int > &dvListMap, const Eigen::MatrixXd &dConstrPart, const Eigen::MatrixXd &HConstrPart, int constrPos, int cellTarg)
 

Detailed Description

Provides internal tools for RSVS calc.

Definition in file RSVScalctools.hpp.

Function Documentation

◆ TriangleActiveDesignVariables()

HashedVector<int, int> TriangleActiveDesignVariables ( const triangle triIn,
const triangulation triRSVS,
const HashedVector< int, int > &  objDvMap,
bool  useSurfCentreDeriv = true 
)

Get the active design variables defined by a triangle object.

Parameters
[in]triInThe triangle object.
[in]triRSVSThe triangulation containing the triangle.
[in]objDvMapThe calculation (RSVScalc) object's design variable map.
[in]useSurfCentreDerivThe Use the surface centroid derivative in the calculation of dPos and HPos.
Returns
A hashed vector of the active design variables from the triangle object.

Definition at line 43 of file RSVScalctools.cpp.

◆ TrianglePointerCoordinates()

grid::coordlist TrianglePointerCoordinates ( const triangle triIn,
const triangulation triRSVS 
)

Get all the coordinates needed to define a triangle.

Parameters
[in]triInThe triangle object to be analysed.
[in]triRSVSThe triangulation object containing the triangle.
Returns
A vector of constant coordinate vectors, these allow the data to be read but not edited.

Definition at line 18 of file RSVScalctools.cpp.

◆ TrianglePositionDerivatives()

void TrianglePositionDerivatives ( const triangle triIn,
const triangulation triRSVS,
const HashedVector< int, int > &  dvListMap,
Eigen::MatrixXd &  dPos,
Eigen::MatrixXd &  HPos,
bool  useSurfCentreDeriv = true,
bool  useSurfCentreHessian = false 
)

Calculate the positional derivatives of a triangle object.

This computes the partial derivatives $\frac{\partial coord}{\partial d}$ derivatives of snaxels and pseudo-centroids.

Parameters
[in]triInThe triangle for which the quantities need to be computed.
[in]triRSVSThe triangulation object from which this object is part.
[in]dvListMapA hashed vector containing a list of active design variables in the otriangle object as defined by function TriangeActiveDesignVariables().
dPosThe jacobian of the position derivatives.
HPosThe Hessian of the position derivatives.
[in]useSurfCentreDerivThe Use the surface centroid derivative in the calculation of dPos and HPos.