Memosa-FVM  0.2
FractureBC.h
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #include "FloatVarDict.h"
6 #include "AMG.h"
7 
8 template<class T>
9 struct FractureBC : public FloatVarDict<T>
10 {
12  {
13  this->defineVar("specifiedPhaseFieldValue",T(1.0));
14  this->defineVar("specifiedPhaseFieldFlux",T(0.0));
15  //this->defineVar("convectiveCoefficient", T(0.0));
16  //this->defineVar("farFieldTemperature", T(300.0));
17  }
18  string bcType;
19 };
20 
21 template<class T>
22 struct FractureVC : public FloatVarDict<T>
23 {
25  {
26  this->defineVar("fractureConductivity",T(1.0));
27  this->defineVar("fractureSource", T(0.0));
28  this->defineVar("fractureSourceCoef", T(0.0));
29 
30  }
31  string vcType;
32 };
33 
34 template<class T>
36 {
38  {
39  this->defineVar("initialPhaseFieldValue",T(1.0));
40  this->defineVar("timeStep", T(1e-7));
41  this->relativeTolerance=1e-8;
42  this->absoluteTolerance=1e-16;
43  this->linearSolver = 0;
44  this->useCentralDifference=false;
45  this->transient=false;
46  this->timeDiscretizationOrder = 1;
47  }
52  bool transient;
54 #ifndef SWIG
56  {
57  if (this->linearSolver == 0)
58  {
59  LinearSolver* ls(new AMG());
60  ls->relativeTolerance = 1e-1;
61  ls->nMaxIterations = 20;
62  ls->verbosity=0;
63  this->linearSolver = ls;
64  }
65  return *this->linearSolver ;
66  }
67 #endif
68 };
69 
double relativeTolerance
Definition: FractureBC.h:48
Definition: AMG.h:27
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
string vcType
Definition: FractureBC.h:31
double absoluteTolerance
Definition: FractureBC.h:49
int nMaxIterations
Definition: LinearSolver.h:31
double relativeTolerance
Definition: LinearSolver.h:33
string bcType
Definition: FractureBC.h:18
LinearSolver * linearSolver
Definition: FractureBC.h:51
LinearSolver & getLinearSolver()
Definition: FractureBC.h:55