Go to the documentation of this file.
22 DAResidual::DAResidual(
47 if (
daOption.getAllOptions().lookupOrDefault<label>(
"debug", 0))
49 Info <<
"Selecting " << modelType <<
" for DAResidual" << endl;
52 dictionaryConstructorTable::iterator cstrIter =
53 dictionaryConstructorTablePtr_->find(modelType);
56 if (cstrIter == dictionaryConstructorTablePtr_->end())
67 <<
"Unknown DAResidual type "
68 << modelType << nl << nl
69 <<
"Valid DAResidual types:" << endl
70 << dictionaryConstructorTablePtr_->sortedToc()
75 return autoPtr<DAResidual>(
82 const dictionary& options,
120 VecZeroEntries(resVec);
124 label updateState = options.getLabel(
"updateState");
126 label updateMesh = options.getLabel(
"updateMesh");
128 label setResVec = options.getLabel(
"setResVec");
143 daModel.updateIntermediateVariables();
149 daModel.calcResiduals(options);
virtual void correctBoundaryConditions()=0
update the boundary condition for all the states in the selected solver
virtual void updateIntermediateVariables()=0
update any intermdiate variables that are dependent on state variables and are used in calcResiduals
DAOption daOption(mesh, pyOptions_)
DAField daField_
DAField object.
defineRunTimeSelectionTable(DAFvSource, dictionary)
static autoPtr< DAResidual > New(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
void correctBoundaryConditions()
correct boundary conditions for model states
void stateVec2OFField(const Vec stateVec) const
assign the fields in OpenFOAM based on the state vector
const DAModel & daModel_
DAModel object.
void masterFunction(const dictionary &options, const Vec xvVec, const Vec wVec, Vec resVec)
the master function that compute the residual vector given the state and point vectors
void ofResField2ResVec(Vec resVec) const
assign the residual vector based on the residual field in OpenFOAM
defineTypeNameAndDebug(DAFvSource, 0)
DAModel daModel(mesh, daOption)
void pointVec2OFMesh(const Vec xvVec) const
assign the points in fvMesh of OpenFOAM based on the point vector
DAIndex daIndex(mesh, daOption, daModel)
void specialBCTreatment()
apply special treatment for boundary conditions
virtual void calcResiduals(const dictionary &options)=0
compute residuals