proteus
1.8.1
C/C++/Fortran libraries
|
Go to the documentation of this file.
4 #include <apfNumbering.h>
26 int loadMeshForAnalytic(
const char* meshFile,
double* boxDim,
double* sphereCenter,
double radius);
43 int transferModelInfo(
int*numGeomEntities,
int*edges,
int*faces,
int*mVertex2Model,
int*mEdgeVertex2Model,
int*mBoundary2Model,
int nMaxSegments);
54 int transferPropertiesToPUMI(
double* rho_p,
double* nu_p,
double* g_p,
double deltaT,
double deltaT_next,
double T_simulation,
double interfaceBandSize);
56 int setAdaptProperties(std::vector<std::string> sizeInputs,
bool in_adapt,
double in_hmax,
double in_hmin,
double in_hphi,
int in_numAdaptSteps,
double in_targetError,
double in_gradingFactor,
bool in_logging,
int in_numIterations);
84 double getMPvalue(
double field_val,
double val_0,
double val_1);
120 void computeDiffusiveFlux(apf::Mesh*m,apf::Field* voff, apf::Field* visc,apf::Field* pref, apf::Field* velf);
121 void getBoundaryFlux(apf::Mesh* m, apf::MeshEntity* ent,
double * endflux);
156 int comm_size, comm_rank;
169 apf::MeshTag* diffFlux;
170 apf::GlobalNumbering* global[4];
171 apf::Numbering* local[4];
173 apf::Field* vmsErrH1;
174 apf::Field* errRho_reg;
175 apf::Field* errRel_reg;
176 apf::Field* error_reference;
179 apf::Field* size_iso;
181 apf::Field* size_scale;
182 apf::Field* size_frame;
185 std::queue<apf::Field*> sizeFieldList;
186 void isotropicIntersect();
188 int constructGlobalNumbering(
Mesh& mesh);
189 int constructGlobalStructures(
Mesh& mesh);
191 int constructElements(
Mesh& mesh);
192 int constructNodes(
Mesh& mesh);
193 int constructBoundaries(
Mesh& mesh);
194 int constructEdges(
Mesh& mesh);
195 int constructMaterialArrays(
Mesh& mesh);
197 void freeField(apf::Field*&
f);
198 void freeNumbering(apf::Numbering*&
n);
200 static void averageToEntity(apf::Field* ef, apf::Field* vf,
201 apf::MeshEntity* ent);
202 void volumeAverageToEntity(apf::Field* ef, apf::Field* vf,
203 apf::MeshEntity* ent);
204 static void minToEntity(apf::Field* ef, apf::Field* vf,
205 apf::MeshEntity* ent);
209 int target_element_count;
int * modelVertexMaterial
int updateMaterialArrays(Mesh &mesh, int dim, int bdryID, int GeomTag)
int constructFromSerialPUMIMesh(Mesh &mesh)
void updateSphereCoordinates(double *sphereCenter)
void predictiveInterfacePropagation()
void get_local_error(double &total_error)
This function aims to compute error at each element via an Element Residual Method.
int willErrorAdapt_reference()
int getSimmetrixBC()
Function used to read in diffusive flux BC from Simmetrix Model.
int transferFieldToPUMI(const char *name, double const *inArray, int nVar, int nN)
Convert Proteus fields to something PUMI can understand.
int calculateAnisoSizeField()
Class that handles the interface between SCOREC tools and Proteus.
int localNumber(apf::MeshEntity *e)
double getMPvalue(double field_val, double val_0, double val_1)
Function primarily used to get the VOF-weighted average of physical properties at a given point.
int getERMSizeField(double err_total)
gmi_model * createSphereInBox(double *boxDim, double *sphereCenter, double radius)
double getMinimumQuality()
Function used to get the worst element quality in the mesh.
int * modelBoundaryMaterial
void writeMesh(const char *meshFile)
apf::Field * getViscosityField(apf::Field *voff)
Function used to derive a viscosity field from a VOF field.
double getTotalMass()
Function to track total mass of the domain.
int * exteriorGlobaltoLocalElementBoundariesArray
void set_nAdapt(int numberAdapt)
int loadModelAndMesh(const char *modelFile, const char *meshFile)
Load the mesh and model for SCOREC libraries.
int transferModelInfo(int *numGeomEntities, int *edges, int *faces, int *mVertex2Model, int *mEdgeVertex2Model, int *mBoundary2Model, int nMaxSegments)
int loadMeshForAnalytic(const char *meshFile, double *boxDim, double *sphereCenter, double radius)
int adaptPUMIMesh(const char *input)
Function used to trigger adaptation.
int constructFromParallelPUMIMesh(Mesh &mesh, Mesh &subdomain_mesh)
int willErrorAdapt()
Looks at the estimated error and determines if mesh adaptation is necessary.
int transferFieldToProteus(const char *name, double *outArray, int nVar, int nN)
Convert PUMI fields to something Proteus can understand.
void computeDiffusiveFlux(apf::Mesh *m, apf::Field *voff, apf::Field *visc, apf::Field *pref, apf::Field *velf)
Function used to compute the diffusive flux at interelement boundaries and stores the values as tags ...
std::string size_field_config
int transferPropertiesToPUMI(double *rho_p, double *nu_p, double *g_p, double deltaT, double deltaT_next, double T_simulation, double interfaceBandSize)
Transfer material properties to the MeshAdaptPUMI class.
void get_VMS_error(double &total_error_out)
int setAdaptProperties(std::vector< std::string > sizeInputs, bool in_adapt, double in_hmax, double in_hmin, double in_hphi, int in_numAdaptSteps, double in_targetError, double in_gradingFactor, bool in_logging, int in_numIterations)
int calculateSizeField(double L_band)
int updateMaterialArrays2(Mesh &mesh)
apf::MeshTag * fluxtag[4]
std::string logging_config
int transferElementFieldToProteus(const char *name, double *outArray, int nVar, int nN)
Convert PUMI fields to something Proteus can understand.
int testIsotropicSizeField()
int num_quadrature_boundary
void getBoundaryFlux(apf::Mesh *m, apf::MeshEntity *ent, double *endflux)
This function reads in the stored tags and computes the boundary flux according to the RHS formulatio...
std::string adapt_type_config
int reconstructFromProteus(Mesh &mesh, Mesh &globalMesh, int hasModel)
int * modelRegionMaterial
int gradeMesh(double gradationFactor)
int reconstructFromProteus2(Mesh &mesh, int *isModelVert, int *bFaces)
void removeBCData()
Function used to remove the BC tags that were created during the computeDiffusiveFlux() function.