|
| 1 | +#------------------------------------------------------------------------------- |
| 2 | +# ASPHClassicSmoothingScale |
| 3 | +#------------------------------------------------------------------------------- |
| 4 | +from PYB11Generator import * |
| 5 | +from SmoothingScaleBase import * |
| 6 | + |
| 7 | +@PYB11template("Dimension") |
| 8 | +class ASPHClassicSmoothingScale(SmoothingScaleBase): |
| 9 | + |
| 10 | + PYB11typedefs = """ |
| 11 | + using Scalar = typename %(Dimension)s::Scalar; |
| 12 | + using Vector = typename %(Dimension)s::Vector; |
| 13 | + using Tensor = typename %(Dimension)s::Tensor; |
| 14 | + using SymTensor = typename %(Dimension)s::SymTensor; |
| 15 | + using ThirdRankTensor = typename %(Dimension)s::ThirdRankTensor; |
| 16 | + using TimeStepType = typename Physics<%(Dimension)s>::TimeStepType; |
| 17 | +""" |
| 18 | + |
| 19 | + #........................................................................... |
| 20 | + # Constructors |
| 21 | + def pyinit(self, |
| 22 | + HUpdate = "HEvolutionType", |
| 23 | + W = "const TableKernel<%(Dimension)s>&"): |
| 24 | + "ASPHClassicSmoothingScale constructor" |
| 25 | + |
| 26 | + #........................................................................... |
| 27 | + # Virtual methods |
| 28 | + @PYB11virtual |
| 29 | + def initializeProblemStartup(self, |
| 30 | + dataBase = "DataBase<%(Dimension)s>&"): |
| 31 | + """An optional hook to initialize once when the problem is starting up. |
| 32 | +Typically this is used to size arrays once all the materials and NodeLists have |
| 33 | +been created. It is assumed after this method has been called it is safe to |
| 34 | +call Physics::registerState for instance to create full populated State objects.""" |
| 35 | + return "void" |
| 36 | + |
| 37 | + @PYB11virtual |
| 38 | + def registerDerivatives(self, |
| 39 | + dataBase = "DataBase<%(Dimension)s>&", |
| 40 | + derivs = "StateDerivatives<%(Dimension)s>&"): |
| 41 | + "Register the derivatives/change fields for updating state." |
| 42 | + return "void" |
| 43 | + |
| 44 | + @PYB11virtual |
| 45 | + @PYB11const |
| 46 | + def evaluateDerivatives(self, |
| 47 | + time = "const Scalar", |
| 48 | + dt = "const Scalar", |
| 49 | + dataBase = "const DataBase<%(Dimension)s>&", |
| 50 | + state = "const State<%(Dimension)s>&", |
| 51 | + derivs = "StateDerivatives<%(Dimension)s>&"): |
| 52 | + "Increment the derivatives." |
| 53 | + return "void" |
| 54 | + |
| 55 | + @PYB11virtual |
| 56 | + @PYB11const |
| 57 | + def label(self): |
| 58 | + return "std::string" |
| 59 | + |
| 60 | + @PYB11virtual |
| 61 | + @PYB11const |
| 62 | + def dumpState(self, file="FileIO&", pathName="const std::string&"): |
| 63 | + "Serialize under the given path in a FileIO object" |
| 64 | + return "void" |
| 65 | + |
| 66 | + @PYB11virtual |
| 67 | + def restoreState(self, file="const FileIO&", pathName="const std::string&"): |
| 68 | + "Restore state from the given path in a FileIO object" |
| 69 | + return "void" |
| 70 | + |
| 71 | + #........................................................................... |
| 72 | + # Attributes |
| 73 | + WT = PYB11property("const TableKernel<%(Dimension)s>&", "WT", doc="The interpolation kernel") |
| 74 | + zerothMoment = PYB11property("const FieldList<%(Dimension)s, Scalar>&", "zerothMoment", doc="The zeroth moment storage FieldList") |
| 75 | + firstMoment = PYB11property("const FieldList<%(Dimension)s, Vector>&", "firstMoment", doc="The first moment storage FieldList") |
| 76 | + secondMoment = PYB11property("const FieldList<%(Dimension)s, SymTensor>&", "secondMoment", doc="The second moment storage FieldList") |
0 commit comments