![]() |
AnalyticalProcess
The GeMA Analytical Process Plugin
|
Basic class for the Analytical solving process. More...
#include <gmpAnalyticalSolver.h>

Public Member Functions | |
| GmpAnalyticalSolver (GmMesh *srcMesh, GmMesh *resultMesh, const GmpAnalyticalSolverOptions *options, GmSimulationData *simulation, const GmLogCategory &logger) | |
| Constructor. Stores the source and destination meshes, together with the solver options on the object. Further validations and initializations are delayed until the call to init() since it can return errors. | |
| ~GmpAnalyticalSolver (void) | |
| Destructor. | |
| bool | init () |
| Init the solver. Returns true on success. On errors, logs a message and returns false. | |
| bool | solve () |
| Executes the solver. Returns true on success, false on error. | |
Private Member Functions | |
| bool | setupBurialData () |
| Prepares the data needed for calculating burial depths. If the user has given us a sea floor mesh, we have to create the associated projected mesh and its spatial index to allow for easy querying which sea floor mesh cell contains a given x-y coordinate. If the user has given us a mean sea level depth, we might need to convert it to meters depending on the given data unit. Returns true on success, false otherwise (logging the appropriate error message). | |
| bool | buildProjectedSeaFloorMesh () |
| Creates a new auxiliar 2D mesh where every 3D quad or triangle from the source sea floor mesh is projected on the x-y plane. This auxiliar 2D mesh, and associated spatial index, can be used to easily find the cell containing a given x-y coordinate. | |
| bool | burialDepth (const GmVector &point, double *depth) |
| Given a x,y,z coordinate (in "m"), returns the burial depth of that point, defined as the depth from that point to the sea level floor. If a sea floor mesh was given, and the point is outside of the mesh projection in the x-y plane, returns false. | |
| GmValueAccessor * | getOrCreateNodeAttributeAccessor (GmMesh *mesh, QString stdAttributeName, QString msgDescription, Unit desiredUnit, bool required, int type=-1, int nlin=-1, int ncol=-1, int history=-1, bool canBeFunction=true, bool create=false, QString createFormat="", int createHistory=-1, bool ignoreWarnings=false) |
| Similar in purpose (and implementation) to GmPhysics::nodeAttributeAccessor(). The main differences is that it does not get an attribute name translation table. It also queries both node attributes and state vars, but if a creation is needed, a node attribute will be created. | |
Private Attributes | |
| GmSimulationData * | _simulation |
| Simulation Data. | |
| GmMesh * | _srcMesh |
| Mesh with pressure and/or temperature node data. | |
| GmMesh * | _dstMesh |
| Result mesh with displacement and/or stress node data to be filled. | |
| const GmpAnalyticalSolverOptions * | _options |
| Solver options. | |
| const GmLogCategory & | _logger |
| Logger for eventual messages. | |
| GmValueAccessor * | _srcCoordAc |
| A node data accessor for _srcMesh node coordinates. Values in 'm'. | |
| GmValueAccessor * | _dstCoordAc |
| A node data accessor for _dstMesh node coordinates. Values in 'm'. | |
| GmValueAccessor * | _pAc |
| A node data accessor for pressure data from _srcMesh. Values in 'kPa'. | |
| GmValueAccessor * | _tAc |
| A node data accessor for temperature data from _srcMesh. Values in 'K'. | |
| GmValueAccessor * | _uAc |
| A node data accessor for displacement data from _dstMesh. Values in 'm'. | |
| GmValueAccessor * | _sAc |
| A node data accessor for stress data from _dstMesh. Values in 'kPa'. | |
| GmValueAccessor * | _eAc |
| A node data accessor for strain data from _dstMesh. | |
| GmCellMesh * | _seaFloorMesh |
| The optional mesh with the sea floor geometry. Can be NULL. | |
| GmValueAccessor * | _seaFloorCoordAc |
| A node data accessor for the (unprojected) sea floor mesh node coordinates. Values in 'm'. Exists only if _seaFloorMesh is not null. | |
| GmCellMesh * | _projSeaFloorMesh |
| The auxiliar mesh with a x-y projection of the sea floor mesh. Exists only if _seaFloorMesh is not null. | |
| GmSpatialIndex * | _projSeaFloorIndex |
| Spatial index for the projected sea floor mesh. Exists only if _seaFloorMesh is not null. | |
| double | _meanSeaLevelDepth |
| The mean sea level depth. Used when _seaFloorMesh is NULL. Value in 'm' (unlike the value in _options, which can be in other units). | |
Basic class for the Analytical solving process.
| GmpAnalyticalSolver::GmpAnalyticalSolver | ( | GmMesh * | srcMesh, |
| GmMesh * | resultMesh, | ||
| const GmpAnalyticalSolverOptions * | options, | ||
| GmSimulationData * | simulation, | ||
| const GmLogCategory & | logger ) |
Constructor. Stores the source and destination meshes, together with the solver options on the object. Further validations and initializations are delayed until the call to init() since it can return errors.
| srcMesh | The 3D node mesh storing the pressure and/or temperature values needed for the calculation. Can be a simples GmMesh (point cloud). |
| resultMesh | The 3D node mesh where the calculated results (displacement, stress and/or strain) will be saved. Can be a simples GmMesh (point cloud). It can be the same mesh as srcMesh or a different one. |
| options | An object storing several simulation options controlling the solver behaviour. This includes the sea floor definition. The solver takes ownership of the given options object and is responsible for deleting it at its destructor. |
| simulation | The simulation data object |
| logger | The logger that should be used to log any required messages to the user |
|
private |
Similar in purpose (and implementation) to GmPhysics::nodeAttributeAccessor(). The main differences is that it does not get an attribute name translation table. It also queries both node attributes and state vars, but if a creation is needed, a node attribute will be created.
IMPORTANT: This (re)implementation here is really NOT the best solution. We should really move the set of functions that check, and possibly create, node, cell and Gauss accessors from the GmPhysics (and GmpFemPhysics) class to static methods of the corresponding meshes. The main difficulty is the use of a createGaussAttributeAccessor() virtual function by GmpFemPhysics on behalf of the XFem plugin.