This file contains the "parsing" functions to create, modify and analyze a finite element model provided in JSON format. More...
#include <stdio.h>#include <stdlib.h>#include <cstring>#include <fstream>#include <iostream>#include <algorithm>#include "Viscous1DLinear.hpp"#include "Elastic1DLinear.hpp"#include "Hertzian1DLinear.hpp"#include "Elastic2DPlaneStress.hpp"#include "Elastic2DPlaneStrain.hpp"#include "PlasticPlaneStrainJ2.hpp"#include "PlasticPlaneStrainBA.hpp"#include "Elastic3DLinear.hpp"#include "Plastic1DJ2.hpp"#include "Plastic3DJ2.hpp"#include "Plastic3DBA.hpp"#include "Elastic1DGap.hpp"#include "Plastic1DGap.hpp"#include "Elastic1DFiber.hpp"#include "Steel1DFiber.hpp"#include "Concrete1DFiber.hpp"#include "Lin2DRectangular.hpp"#include "Lin3DRectangular.hpp"#include "Lin2DAngle.hpp"#include "Lin3DAngle.hpp"#include "Lin2DChannel.hpp"#include "Lin3DChannel.hpp"#include "Lin2DTee.hpp"#include "Lin3DTee.hpp"#include "Lin2DWideFlange.hpp"#include "Lin3DWideFlange.hpp"#include "Lin2DCircular.hpp"#include "Lin3DCircular.hpp"#include "Lin2DRectangularTube.hpp"#include "Lin3DRectangularTube.hpp"#include "Lin2DCircularTube.hpp"#include "Lin3DCircularTube.hpp"#include "Lin3DThinArea.hpp"#include "Lin2DUserDefined.hpp"#include "Lin3DUserDefined.hpp"#include "Fib3DLineSection.hpp"#include "ZeroLength1D.hpp"#include "lin2DTruss2.hpp"#include "kin2DTruss2.hpp"#include "lin3DTruss2.hpp"#include "kin3DTruss2.hpp"#include "lin2DTruss3.hpp"#include "lin3DTruss3.hpp"#include "lin2DFrame2.hpp"#include "kin2DFrame2.hpp"#include "lin3DFrame2.hpp"#include "lin2DTria3.hpp"#include "lin2DTria6.hpp"#include "lin2DQuad4.hpp"#include "lin2DQuad8.hpp"#include "PML2DQuad4.hpp"#include "kin2DQuad4.hpp"#include "PML2DQuad8.hpp"#include "lin3DShell4.hpp"#include "lin3DTetra4.hpp"#include "lin3DTetra10.hpp"#include "lin3DHexa8.hpp"#include "kin3DHexa8.hpp"#include "PML3DHexa8.hpp"#include "lin3DHexa20.hpp"#include "EQlin2DQuad4.hpp"#include "TIEQlin2DQuad4.hpp"#include "UnxBoucWen2DLink.hpp"#include "UnxBoucWen3DLink.hpp"#include "HDRBYamamoto2DLink.hpp"#include "HDRBYamamoto3DLink.hpp"#include "null2DFrame2.hpp"#include "null3DFrame2.hpp"#include "StaticAnalysis.hpp"#include "DynamicAnalysis.hpp"#include "Linear.hpp"#include "NewtonRaphson.hpp"#include "QuasiStatic.hpp"#include "NewmarkBeta.hpp"#include "CompositeBathe.hpp"#include "CentralDifference.hpp"#include "ExtendedNewmarkBeta.hpp"#include "EigenSolver.hpp"#include "MumpsSolver.hpp"#include "PetscSolver.hpp"#include "RSJparser.hpp"#include "Definitions.hpp"#include "Profiler.hpp"Go to the source code of this file.
Functions | |
| template<typename T > | |
| void | sortVector (std::vector< T > &v) |
| Sorts a vector of tag number form smaller to larger. More... | |
| template<typename T > | |
| std::vector< T > | setOperation (std::vector< T > &v1, std::vector< T > &v2, std::string op) |
| Performs union, difference or intersection operation between two vectors. More... | |
| template<typename T > | |
| std::vector< T > | GetIDsFromJSON (RSJresource &jsonFile, std::string Name) |
| Query the JSON file and obtains the Identifier list. More... | |
| template<typename T > | |
| std::vector< T > | GetIDsFromMESH (std::shared_ptr< Mesh > &mesh, std::string Name) |
| Query the MESH object and obtains the Identifier list. More... | |
| template<typename T > | |
| std::map< std::string, std::vector< T > > | Entities2Update (std::shared_ptr< Mesh > &mesh, RSJresource &jsonFile, std::string Name) |
| The Entities indexes to be updated. More... | |
| std::string | GetPartitionName (std::string theFile, int k, bool cond) |
| Sets the partition subdomain tag number. More... | |
| std::string | GetSpacedName (std::string theFile, std::string toReplace) |
| Fix blank spaces provided by user in path (if any). More... | |
| void | UpdateNodes (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Node Entities in Mesh Object. More... | |
| void | UpdateMasses (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Masses in Mesh Object. More... | |
| void | UpdateConstraints (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Constraint Entities in Mesh Object. More... | |
| void | UpdateSupportMotion (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Support Motions in Mesh Object. More... | |
| void | UpdateMaterials (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Material Entities in Mesh Object. More... | |
| void | UpdateSections (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Section Entities in Mesh Object. More... | |
| void | UpdateElements (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Element Entities in Mesh Object. More... | |
| void | UpdateDampings (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Damping Entities in Mesh Object. More... | |
| void | UpdateLoads (std::shared_ptr< Mesh > &theMesh, RSJresource &jsonFile) |
| Updates the Loads Entities in Mesh Object. More... | |
| bool | UpdateAnalysis (std::shared_ptr< Mesh > &theMesh, std::unique_ptr< Analysis > &theAnalysis, std::vector< std::shared_ptr< Recorder > > &Recorders, std::map< unsigned int, std::shared_ptr< LoadCombo > > &LoadCombos, std::string InputFile) |
| Creates a new Analysis object from the json file. More... | |
| void | UpdateRecorders (std::vector< std::shared_ptr< Recorder > > &Recorders, std::string InputFile) |
| Updates the Recorder Entities required for the Analysis. More... | |
| void | UpdateCombinations (std::map< unsigned int, std::shared_ptr< LoadCombo > > &LoadCombos, std::string InputFile) |
| Updates the Combination Entities required for the Analysis. More... | |
| bool | UpdateMesh (std::shared_ptr< Mesh > &theMesh, std::string InputFile) |
| Populate the Mesh object with the json provided entities. More... | |
| void | RunDriverFile () |
| Runs the User's JSON Input file. More... | |
This file contains the "parsing" functions to create, modify and analyze a finite element model provided in JSON format.
| std::map<std::string, std::vector<T> > Entities2Update | ( | std::shared_ptr< Mesh > & | mesh, |
| RSJresource & | jsonFile, | ||
| std::string | Name | ||
| ) |
The Entities indexes to be updated.
| mesh | Pointer to the Mesh container. |
| jsonFile | json file where mesh entities will be readden. |
| Name | name of the entity to be readden from json file. |
| std::vector<T> GetIDsFromJSON | ( | RSJresource & | jsonFile, |
| std::string | Name | ||
| ) |
Query the JSON file and obtains the Identifier list.
| jsonFile | json file where mesh entities will be readden. |
| Name | name of the entity to be readden from json file. |
| std::vector<T> GetIDsFromMESH | ( | std::shared_ptr< Mesh > & | mesh, |
| std::string | Name | ||
| ) |
| std::string GetPartitionName | ( | std::string | theFile, |
| int | k, | ||
| bool | cond | ||
| ) |
Sets the partition subdomain tag number.
| theFile | file that contains a character to be replaced. |
| k | the number to be replaced with. |
| cond | condition to return full path of the file or just the file name. |
| std::string GetSpacedName | ( | std::string | theFile, |
| std::string | toReplace | ||
| ) |
Fix blank spaces provided by user in path (if any).
| theFile | file that contains a character to be replaced. |
| toReplace | the character to be replaced with. |
| void RunDriverFile | ( | ) |
Runs the User's JSON Input file.
| std::vector<T> setOperation | ( | std::vector< T > & | v1, |
| std::vector< T > & | v2, | ||
| std::string | op | ||
| ) |
Performs union, difference or intersection operation between two vectors.
| v1 | vector with the identifiers in json file |
| v1 | vector with the identifiers in Mesh object |
| op | operation to be performed between these two sets |
| void sortVector | ( | std::vector< T > & | v | ) |
Sorts a vector of tag number form smaller to larger.
| v | vector with the data to be sorted |
| bool UpdateAnalysis | ( | std::shared_ptr< Mesh > & | theMesh, |
| std::unique_ptr< Analysis > & | theAnalysis, | ||
| std::vector< std::shared_ptr< Recorder > > & | Recorders, | ||
| std::map< unsigned int, std::shared_ptr< LoadCombo > > & | LoadCombos, | ||
| std::string | InputFile | ||
| ) |
Creates a new Analysis object from the json file.
| theAnalysis | Pointer to the analysis to be created from json file. |
| Recorders | Pointer to the recorder vector to be parsed. |
| LoadCombos | Pointer to the load combination to be parsed. |
| InputFile | json file where mesh entities will be readden. |
| void UpdateCombinations | ( | std::map< unsigned int, std::shared_ptr< LoadCombo > > & | LoadCombos, |
| std::string | InputFile | ||
| ) |
Updates the Combination Entities required for the Analysis.
| LoadCombos | Pointer to the load combination to be parsed. |
| InputFile | json file where mesh entities will be readden. |
| void UpdateConstraints | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
Updates the Constraint Entities in Mesh Object.
| theMesh | Pointer to the Mesh container. |
| jsonFile | json file where mesh entities will be readden. |
| void UpdateDampings | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateElements | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateLoads | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateMasses | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateMaterials | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| bool UpdateMesh | ( | std::shared_ptr< Mesh > & | theMesh, |
| std::string | InputFile | ||
| ) |
| void UpdateNodes | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateRecorders | ( | std::vector< std::shared_ptr< Recorder > > & | Recorders, |
| std::string | InputFile | ||
| ) |
| void UpdateSections | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |
| void UpdateSupportMotion | ( | std::shared_ptr< Mesh > & | theMesh, |
| RSJresource & | jsonFile | ||
| ) |