# proteus.mprans.MoveMeshMonitor module¶

class proteus.mprans.MoveMeshMonitor.Coefficients(func, he_min, he_max, ME_MODEL, LS_MODEL=None, nd=2, fixedNodeMaterialTypes=None, fixedElementMaterialTypes=None, noNodeVelocityNodeMaterialTypes=None, nSmoothOut=0, nSmoothIn=0, epsFact_density=0, epsTimeStep=1.0, ntimes_solved=1, grading=1.1, grading_type=0, resetNodeVelocityArray=True, scale_with_nd=False, do_firstStep=True, nullSpace='ConstantNullSpace')[source]

Coefficients for deforming the mesh according to an area function

Parameters: func (function) – function of x defining element area he_min (double) – minimum characteristic element size he_max (double) – maximum characteristic element size ME_MODEL (int) – index of this model LS_MODEL (int) – index of LS model for retrieving phi values and refine around free surface nd (int) – number of dimensions fixedNodeMaterialTypes (int[:]) – array of length of all domain node material types, with indexes corresponding to the material type set as: 0 -> not fixed, 1 -> fixed. e.g. if nodes of material type 3 should be fixed: fixedNodeMaterialTypes[3]=1 (!) must be integers fixedElementMaterialTypes (int[:]) – array of length of all domain element material types, with indexes corresponding to the material type set as: 0 -> not fixed, 1 -> fixed. all nodes that have at least one element with fixed material type around them will be fixed noNodeVelocityNodeMaterialTypes (int[:]) – array of length of all domain node material types, with indexes corresponding to the material type set as: 0 -> not fixed, 1 -> fixed. e.g. if nodes of material type 3 should not have a node velocity: fixedNodeMaterialTypes[3]=1 (!) must be integers nSmoothOut (int) – number of smoothing steps after finishing pseudo time stepping nSmoothIn (int) – number of smoothing steps after finishing pseudo time stepping epsFact_density (double) – epsFact*he_min where refinement is the same epsTimeStep (double) – pseudo time step size (0 < epsTimeStep <= 1) grading (double) – grading of mesh with distance function. 1.-> no grading, 1.1->10% increase (!) if using grading, func must be a distance function otherwise func is an area function grading_type (int) – type of grading: 0 -> no grading 1 -> hyperbolic 2 -> log resetNodeVelocityArray (bool) – reset nodeVelocityArray to zero during prestep if true, otherwise adds up velocity to the existing node velocity. Can be used as False if this model is used in conjunction with another moving mesh model.
initializeMesh(mesh)[source]

Give the TC object access to the mesh for any mesh-dependent information.

attachModels(modelList)[source]

Give the TC object access to other models in a loosely coupled split operator formulation (e.g. a transport equation for concentration might get velocity from a flow equation)

preStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself before the time step.

postStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself after the time step.

uOfX(x, eN=None)[source]

reaction term

search element containing containing coords x starting with a guessed nearest node

Parameters: x (array_like) – coordinates node (int) – first guess of the nearest node
evaluateFunAtX(x, ls_phi=None, debug=False)[source]

reaction term

evaluateFunAtNodes()[source]
evaluateFunAtQuadraturePoints()[source]
getGradientValue(eN, xi)[source]
getAreaValue(eN, xi)[source]
getLevelSetValue(eN, xi)[source]
proteus.mprans.MoveMeshMonitor.calculate_areas(x, detJ, weights)[source]
proteus.mprans.MoveMeshMonitor.calculate_area(x, detJ, weights)[source]