Commit 8fcc2608 authored by renchao.lu's avatar renchao.lu

Test.

parent ca48bbe5
......@@ -318,6 +318,17 @@ public:
if (it != _builder.end())
{
auto const num_local_dof = _dof_table.getNumberOfElementDOF(id);
auto const varIDs = _dof_table.getElementVariableIDs(id);
bool const isPressureDeactivated = (varIDs.front() != 0);
std::vector<int> involved_varIDs; // including deactived elements
involved_varIDs.reserve(varIDs.size() + 1);
if (isPressureDeactivated)
{
involved_varIDs.push_back(0); // always pressure come in
}
involved_varIDs.insert(involved_varIDs.end(), varIDs.begin(),
varIDs.end());
data_ptr = it->second(mesh_item, num_local_dof,
std::forward<ConstructorArgs>(args)...);
}
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<meshes>
<mesh>HybridModel.vtu</mesh>
<mesh>HybridModel_0.5.vtu</mesh>
<mesh>HybridModel_1.0.vtu</mesh>
<mesh>HybridModel_upstream.vtu</mesh>
<mesh>HybridModel_downstream.vtu</mesh>
</meshes>
<processes>
<process>
<name>hc</name>
<type>ComponentTransport</type>
<integration_order>2</integration_order>
<coupling_scheme>staggered</coupling_scheme>
<process_variables>
<concentration>H</concentration>
<pressure>pressure</pressure>
</process_variables>
<specific_body_force>0 0</specific_body_force>
<secondary_variables>
<secondary_variable internal_name="darcy_velocity" output_name="darcy_velocity"/>
</secondary_variables>
</process>
</processes>
<media>
<medium id="0">
<phases>
<phase>
<type>AqueousLiquid</type>
<components>
<component>
<name>H</name>
<properties>
<property>
<name>molecular_diffusion</name>
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
<property>
<name>decay_rate</name>
<type>Parameter</type>
<parameter_name>decay</parameter_name>
</property>
</properties>
</component>
</components>
<properties>
<property>
<name>density</name>
<type>Constant</type>
<value>1e3</value>
</property>
<property>
<name>viscosity</name>
<type>Constant</type>
<value>1e-3</value>
</property>
</properties>
</phase>
</phases>
<properties>
<property>
<name>permeability</name>
<type>Parameter</type>
<parameter_name>kappa</parameter_name>
</property>
<property>
<name>porosity</name>
<type>Parameter</type>
<parameter_name>porosity</parameter_name>
</property>
<property>
<name>longitudinal_dispersivity</name>
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>transversal_dispersivity</name>
<type>Constant</type>
<value>0</value>
</property>
</properties>
</medium>
<medium id="1">
<phases>
<phase>
<type>AqueousLiquid</type>
<components>
<component>
<name>H</name>
<properties>
<property>
<name>molecular_diffusion</name>
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
<property>
<name>decay_rate</name>
<type>Parameter</type>
<parameter_name>decay</parameter_name>
</property>
</properties>
</component>
</components>
<properties>
<property>
<name>density</name>
<type>Constant</type>
<value>1e3</value>
</property>
<property>
<name>viscosity</name>
<type>Constant</type>
<value>1e-3</value>
</property>
</properties>
</phase>
</phases>
<properties>
<property>
<name>permeability</name>
<type>Parameter</type>
<parameter_name>kappa</parameter_name>
</property>
<property>
<name>porosity</name>
<type>Parameter</type>
<parameter_name>porosity</parameter_name>
</property>
<property>
<name>longitudinal_dispersivity</name>
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>transversal_dispersivity</name>
<type>Constant</type>
<value>0</value>
</property>
</properties>
</medium>
</media>
<time_loop>
<global_process_coupling>
<max_iter>6</max_iter>
<convergence_criteria>
<!-- convergence criterion for the first process (P) -->
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<reltol>1e-14</reltol>
</convergence_criterion>
<!-- convergence criterion for the second process (H) -->
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<reltol>1e-14</reltol>
</convergence_criterion>
</convergence_criteria>
</global_process_coupling>
<processes>
<!-- convergence criterion for hydraulic equation -->
<process ref="hc">
<nonlinear_solver>basic_picard</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<reltol>1e-14</reltol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial>0.0</t_initial>
<t_end>21000</t_end>
<timesteps>
<pair>
<repeat>210</repeat>
<delta_t>100</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
<!-- convergence criterion for component transport equation (H) -->
<process ref="hc">
<nonlinear_solver>basic_picard</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<reltol>1e-14</reltol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial>0.0</t_initial>
<t_end>21000</t_end>
<timesteps>
<pair>
<repeat>210</repeat>
<delta_t>100</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>HybridModel</prefix>
<suffix>_ts_{:timestep}_t_{:time}</suffix>
<timesteps>
<pair>
<repeat>5</repeat>
<each_steps>42</each_steps>
</pair>
</timesteps>
<variables>
<variable>H</variable>
<variable>pressure</variable>
<variable>darcy_velocity</variable>
</variables>
</output>
</time_loop>
<parameters>
<parameter>
<name>kappa</name>
<type>Constant</type>
<values>1e-12</values>
</parameter>
<parameter>
<name>porosity</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>p0</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>p_upstream</name>
<type>Constant</type>
<value>1e5</value>
</parameter>
<parameter>
<name>p_downstream_Neumann</name>
<type>Constant</type>
<value>-1e-2</value>
</parameter>
<parameter>
<name>c0_H</name>
<type>Constant</type>
<!--pH=7-->
<value>1e-7</value>
</parameter>
<parameter>
<name>c_H</name>
<type>Constant</type>
<!--pH=7-->
<value>1e-7</value>
</parameter>
</parameters>
<process_variables>
<process_variable>
<name>pressure</name>
<components>1</components>
<order>1</order>
<initial_condition>p0</initial_condition>
<deactivated_subdomains>
<deactivated_subdomain>
<time_interval>
<start>0</start>
<end>21000</end>
</time_interval>
<material_ids>0</material_ids>
</deactivated_subdomain>
</deactivated_subdomains>
<boundary_conditions>
<!--boundary_condition>
<mesh>HybridModel_upstream</mesh>
<type>Dirichlet</type>
<parameter>p_upstream</parameter>
</boundary_condition-->
<boundary_condition>
<mesh>HybridModel_0.5</mesh>
<type>Dirichlet</type>
<parameter>p_upstream</parameter>
</boundary_condition>
<boundary_condition>
<mesh>HybridModel_1.0</mesh>
<type>Neumann</type>
<parameter>p_downstream_Neumann</parameter>
</boundary_condition>
<!--boundary_condition>
<mesh>HybridModel_downstream</mesh>
<type>Neumann</type>
<parameter>p_downstream_Neumann</parameter>
</boundary_condition-->
</boundary_conditions>
</process_variable>
<process_variable>
<name>H</name>
<components>1</components>
<order>1</order>
<initial_condition>c0_H</initial_condition>
<boundary_conditions>
<boundary_condition>
<mesh>HybridModel_0.5</mesh>
<type>Dirichlet</type>
<parameter>c_H</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
<nonlinear_solvers>
<nonlinear_solver>
<name>basic_picard</name>
<type>Picard</type>
<max_iter>10</max_iter>
<linear_solver>general_linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<lis>-i cg -p jacobi -tol 1e-16 -maxiter 20000</lis>
<eigen>
<solver_type>BiCGSTAB</solver_type>
<precon_type>ILUT</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-14</error_tolerance>
</eigen>
<petsc>
<prefix>hc</prefix>
<parameters>-hc_ksp_type bcgs -hc_pc_type bjacobi -hc_ksp_rtol 1e-8 -hc_ksp_max_it 20000</parameters>
</petsc>
</linear_solver>
</linear_solvers>
<!--test_definition>
<vtkdiff>
<regex>1d_isofrac_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
<field>pressure</field>
<absolute_tolerance>1e-6</absolute_tolerance>
<relative_tolerance>1e-10</relative_tolerance>
</vtkdiff>
<vtkdiff>
<regex>1d_isofrac_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
<field>Synthetica</field>
<absolute_tolerance>1e-10</absolute_tolerance>
<relative_tolerance>1e-16</relative_tolerance>
</vtkdiff>
<vtkdiff>
<regex>1d_isofrac_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
<field>Syntheticb</field>
<absolute_tolerance>1e-10</absolute_tolerance>
<relative_tolerance>1e-16</relative_tolerance>
</vtkdiff>
<vtkdiff>
<regex>1d_isofrac_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
<field>H</field>
<absolute_tolerance>1e-10</absolute_tolerance>
<relative_tolerance>1e-16</relative_tolerance>
</vtkdiff>
</test_definition-->
</OpenGeoSysProject>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32">
<UnstructuredGrid>
<Piece NumberOfPoints="16" NumberOfCells="15" >
<PointData>
</PointData>
<CellData>
<DataArray type="Int32" Name="MaterialIDs" format="appended" RangeMin="0" RangeMax="1" offset="0" />
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="appended" RangeMin="0" RangeMax="1.5" offset="88" />
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="608" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="936" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="1104" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==gAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPg/AAAAAAAAAAAAAAAAAAAAAD5bmZmZmbk/AAAAAAAAAAAAAAAAAAAAAFhRmZmZmck/AAAAAAAAAAAAAAAAAAAAABUOMzMzM9M/AAAAAAAAAAAAAAAAAAAAAAmHmZmZmdk/AAAAAAAAAAAAAAAAAAAAADMzMzMzM+M/AAAAAAAAAAAAAAAAAAAAAGZmZmZmZuY/AAAAAAAAAAAAAAAAAAAAAJqZmZmZmek/AAAAAAAAAAAAAAAAAAAAAM3MzMzMzOw/AAAAAAAAAAAAAAAAAAAAAJqZmZmZmfE/AAAAAAAAAAAAAAAAAAAAADMzMzMzM/M/AAAAAAAAAAAAAAAAAAAAAM3MzMzMzPQ/AAAAAAAAAAAAAAAAAAAAAGZmZmZmZvY/AAAAAAAAAAAAAAAAAAAAAA==8AAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABwAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAAAoAAAAAAAAACgAAAAAAAAALAAAAAAAAAAsAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAwAAAAAAAAADAAAAAAAAAANAAAAAAAAAA0AAAAAAAAADgAAAAAAAAAOAAAAAAAAAA8AAAAAAAAADwAAAAAAAAADAAAAAAAAAA==eAAAAAIAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAgAAAAAAAAACgAAAAAAAAAMAAAAAAAAAA4AAAAAAAAAEAAAAAAAAAASAAAAAAAAABQAAAAAAAAAFgAAAAAAAAAYAAAAAAAAABoAAAAAAAAAHAAAAAAAAAAeAAAAAAAAAA==DwAAAAMDAwMDAwMDAwMDAwMDAw==
</AppendedData>
</VTKFile>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32">
<UnstructuredGrid>
<FieldData>
<DataArray type="UInt64" Name="bulk_element_ids" NumberOfTuples="2" format="appended" RangeMin="4" RangeMax="5" offset="0" />
</FieldData>
<Piece NumberOfPoints="1" NumberOfCells="1" >
<PointData>
<DataArray type="UInt64" Name="bulk_node_ids" format="appended" RangeMin="1" RangeMax="1" offset="28" />
</PointData>
<CellData>
<DataArray type="UInt64" Name="number_bulk_elements" format="appended" RangeMin="2" RangeMax="2" offset="44" />
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="appended" RangeMin="0.5" RangeMax="0.5" offset="60" />
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="100" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="116" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="132" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_EAAAAAQAAAAAAAAABQAAAAAAAAA=CAAAAAEAAAAAAAAACAAAAAIAAAAAAAAAGAAAAAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAA==CAAAAAAAAAAAAAAACAAAAAEAAAAAAAAAAQAAAAE=
</AppendedData>
</VTKFile>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32">
<UnstructuredGrid>
<FieldData>
<DataArray type="UInt64" Name="bulk_element_ids" NumberOfTuples="2" format="appended" RangeMin="9" RangeMax="10" offset="0" />
</FieldData>
<Piece NumberOfPoints="1" NumberOfCells="1" >
<PointData>
<DataArray type="UInt64" Name="bulk_node_ids" format="appended" RangeMin="2" RangeMax="2" offset="28" />
</PointData>
<CellData>
<DataArray type="UInt64" Name="number_bulk_elements" format="appended" RangeMin="2" RangeMax="2" offset="44" />
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="appended" RangeMin="1" RangeMax="1" offset="60" />
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="100" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="116" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="132" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_EAAAAAkAAAAAAAAACgAAAAAAAAA=CAAAAAIAAAAAAAAACAAAAAIAAAAAAAAAGAAAAAAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAA==CAAAAAAAAAAAAAAACAAAAAEAAAAAAAAAAQAAAAE=
</AppendedData>
</VTKFile>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32">
<UnstructuredGrid>
<Piece NumberOfPoints="1" NumberOfCells="1" >
<PointData>
<DataArray type="UInt64" Name="bulk_node_ids" format="appended" RangeMin="3" RangeMax="3" offset="0" />
</PointData>
<CellData>
<DataArray type="UInt64" Name="bulk_element_ids" format="appended" RangeMin="14" RangeMax="14" offset="16" />
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="appended" RangeMin="1.5" RangeMax="1.5" offset="32" />
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="72" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="88" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="104" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_CAAAAAMAAAAAAAAACAAAAA4AAAAAAAAAGAAAAAAAAAAAAPg/AAAAAAAAAAAAAAAAAAAAAA==CAAAAAAAAAAAAAAACAAAAAEAAAAAAAAAAQAAAAE=
</AppendedData>
</VTKFile>
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32">
<UnstructuredGrid>
<Piece NumberOfPoints="1" NumberOfCells="1" >
<PointData>
<DataArray type="UInt64" Name="bulk_node_ids" format="appended" RangeMin="0" RangeMax="0" offset="0" />
</PointData>
<CellData>
<DataArray type="UInt64" Name="bulk_element_ids" format="appended" RangeMin="0" RangeMax="0" offset="16" />
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="appended" RangeMin="0" RangeMax="0" offset="32" />
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="appended" RangeMin="" RangeMax="" offset="72" />
<DataArray type="Int64" Name="offsets" format="appended" RangeMin="" RangeMax="" offset="88" />
<DataArray type="UInt8" Name="types" format="appended" RangeMin="" RangeMax="" offset="104" />
</Cells>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="base64">
_CAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==CAAAAAAAAAAAAAAACAAAAAEAAAAAAAAAAQAAAAE=
</AppendedData>
</VTKFile>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment